Top round damage plugin error

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
L 03/20/2019 - 08:08:13: [ReAPI] rg_add_account: player 1 is not connected
L 03/20/2019 - 08:08:13: [AMXX] Displaying debug trace (plugin "damage.amxx", version "1.0.1 ReAPI")
L 03/20/2019 - 08:08:13: [AMXX] Run time error 10: native error (native "rg_add_account")
L 03/20/2019 - 08:08:13: [AMXX] [0] damage.sma::fnCompareDamage (line 327)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5241 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jan 30 2019 07:09:07
Built from: https://github.com/alliedmodders/amxmodx/commit/2110037
Build ID: 5241:2110037
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.322-dev
Build date: 11:41:14 Jan 13 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7398bb7
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5241 ini Start ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.8.0.163-dev pl4 ANY Never
[10] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl4 ANY ANY
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[12] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl4 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[16] MySQL RUN - mysql_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[17] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[18] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
19 plugins, 19 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Damager Advanced 1.1.2 Radius (based on damager_advance running
[ 2] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 3] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 4] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 5] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 6] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste paused
[ 7] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
[ 8] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 9] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 10] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 11] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 12] Lista admini (amx_who) www.play-a Un Biban whobun.amxx running
[ 13] RE Me&HP 1.1 neygomon, AcE re_sayhp.amxx running
[ 14] unknown unknown unknown flash.amxx running
[ 15] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 16] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 17] Admin Base 1.9.0.5241 AMXX Dev Team admin.amxx running
[ 18] Admin Commands 1.9.0.5241 AMXX Dev Team admincmd.amxx debug
[ 19] Commands Menu 1.9.0.5241 AMXX Dev Team cmdmenu.amxx running
[ 20] Menus Front-End 1.9.0.5241 AMXX Dev Team menufront.amxx running
[ 21] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 22] Players Menu 1.9.0.5241 AMXX Dev Team plmenu.amxx running
[ 23] Pause Plugins 1.9.0.5241 AMXX Dev Team pausecfg.amxx running
[ 24] Admin Help 1.9.0.5241 AMXX Dev Team adminhelp.amxx running
[ 25] Multi-Lingual System 1.9.0.5241 AMXX Dev Team multilingual.am running
[ 26] Plugin Menu 1.9.0.5241 AMXX Dev Team pluginmenu.amxx running
[ 27] Admin Votes 1.9.0.5241 AMXX Dev Team adminvote.amxx running
[ 28] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 29] Private Message 0.5 Denzer pm.amxx running
[ 30] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 31] CSXSQL: Onlinetime Awa 0.2 serfreeman1337 csstatsx_playti running
[ 32] Items Restrict Ultimat 0.0.4 Vaqtincha items_restrict_ running
[ 33] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 34] Best Player MOTD 1.2.1 OciXCrom crx_bestplayer. running
[ 35] Simple Menu 2.1.1 OciXCrom crx_simplemenu. debug
[ 36] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 37] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 38] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 39] Advanced Lottery 0.5 Nordic Warrior advanced_lotter running
[ 40] Restricted Names 1.1 Hattrick JM3Ch3R nick.amxx running
[ 41] Stats Configuration 1.9.0.5241 AMXX Dev Team statscfg.amxx running
[ 42] Advertising Manager 2.0 Javekson advertising_man running
[ 43] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 44] Bomb Count Down HUD/Vo 0.2 RuS Mawe4ka117 bcd_hudvoice_ti running
[ 45] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 46] unknown unknown unknown fake.amxx running
[ 47] Ultimele Harti 1.0 M@$t3r_@dy harti.amxx running
[ 48] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 49] Top Round Damage 1.0.1 ReAP Dager* *.* -G- damage.amxx paused
[ 50] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 51] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 52] Game Description Advan 1.0 fl0wer gamedesc_advanc running
[ 53] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 54] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[ 55] Dead Messages 1.1 maFFyoZZyk deadmessages.am running
[ 56] Activitate Admini 2.0c Askhanar activitate.amxx running
[ 57] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 58] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 59] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 60] Drop Pistols on Death 0.0.4 Vaqtincha reapi_dead_pist running
[ 61] Simple Online Logger 10.04.18 mx?! simple_online_l running
[ 62] Trial Access 10.04.18 mx?! trial_access.am running
[ 63] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 64] VIP Menu [CS.PLAYARENA 0.15 Leo_[BH](tradus vip_reapi.amxx running
[ 65] Color Flash Screen 1.6.4 Radius (Stimul i color_flash_scr running
[ 66] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 67] Ultimate Fire in the H 2.0 OciXCrom crx_fireintheho running
[ 68] Check Admin & Vip 2.2 Leo_[BH] check_admin_vip running
[ 69] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 70] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 71] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 72] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 73] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 74] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 75] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 76] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 77] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 78] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 79] Hide HUD/Menu on Vote 1.2.2 d3m37r4 hide_hud_and_me running
[ 80] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 81] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 82] Force Gag 1.2 zorken zilla_gag.amxx running
[ 83] Parachute 1.1 maeStro | neygom parachute.amxx running
[ 84] [ReAPI:AMXX] Buy Nades 0.1 F@nt0M Buy_Nades_Timeo running
[ 85] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx running
85 plugins, 83 running
Автор плагина
Dager* *.* -G-
Версия плагина
1.0.1 ReAPI
Исходный код
/*****************************************************************************

ВозможноÑти:

1. ÐаÑтроить Ñколько игроков выводить в ÑпиÑок

2. ÐаÑтроить минимальное количеÑтво игроков Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð°

3. ÐаÑтроить Ñ ÐºÐ°ÐºÐ¾Ð³Ð¾ раунда выводить

4. Ð’Ñ€ÐµÐ¼Ñ Ð¿Ð¾ÐºÐ°Ð·Ð°

5. Мгновенное закрытие меню по нажатию на клавиши цифр

6. Отключение показа через команду /damage , реализовано через setinfo

7. Помимо урона Ñ€Ñдом выводит также количеÑтво убийÑтв

8. ÐŸÑ€ÐµÑ„Ð¸ÐºÑ Ð¿ÐµÑ€ÐµÐ´ Ñообщением в чате

9. ÐаÑтроить Ñколько денег давать лучшему игроку раунда



Только на реапи, без реапи делать не буду, не вижу ÑмыÑла



*****************************************************************************/



#include <amxmodx>

#include <reapi>



#if AMXX_VERSION_NUM < 183

#include <colorchat>

#endif



#define PLUGIN "Top Round Damage"

#define VERSION "1.0.1 ReAPI"

#define AUTHOR "Dager* *.* -G-"



#if !defined MAX_PLAYERS

#define MAX_PLAYERS 32

#endif



#if !defined MAX_NAME_LENGTH

#define MAX_NAME_LENGTH 32

#endif



#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)

#define ClearArr(%1) arrayset(_:%1, _:0.0, sizeof(%1))

#define Keys (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)



/* наÑтройки */

#define PREFIX "^4[CS]" // префикÑ

#define TOP_PLAYERS 5 // количеÑтво выводимых игроков в топ по дамагу [больше 10 нет ÑмыÑла указывать]

#define MIN_PLAYERS 2 // минимальное количеÑтво игроков Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° топа

#define ROUND_NUMBER 2 // Ñ ÐºÐ°ÐºÐ¾Ð³Ð¾ раунда выводить

#define SHOW_TIME 3 // через Ñколько Ñекунд закроетÑÑ Ð¼ÐµÐ½ÑŽ лучших игроков по дамагу за раунд [целое чиÑло]

#define GIVE_MONEY 500 // Ñколько денег давать лучшему игроку



/* не трогать вÑÑ‘ что ниже*/



enum _:ePlayerData

{

PLAYER_ID,

Float:DAMAGE,

KILLS

};



new g_arrData[MAX_PLAYERS + 1][ePlayerData];

new Float:g_flPlayerDmg[MAX_PLAYERS + 1];

new g_iPlayerKills[MAX_PLAYERS + 1];

new g_iRoundCounter;

new g_iMaxPlayers;

new g_bShow = true;

new g_isSwitch[MAX_PLAYERS + 1] = {0, ...};

new g_szText[3] = "";



public plugin_init()

{

register_plugin(PLUGIN, VERSION, AUTHOR);



register_clcmd("say /damage", "cmdTopDamageSwitch");

register_clcmd("say_team /damage", "cmdTopDamageSwitch");



RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound_Pre", false);

RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage", true);

RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed", true);

RegisterHookChain(RG_RoundEnd, "RoundEnd", true);



register_menucmd(register_menuid("TopDmg"), Keys, "fnTopDmgHandler");



g_iMaxPlayers = get_member_game(m_nMaxPlayers);

}



public client_putinserver(id)

{

if(g_bShow)

{

get_user_info(id, "_topdamage", g_szText, charsmax(g_szText));

g_isSwitch[id] = (g_szText[0]) ? str_to_num(g_szText) : 1;

}

else

g_isSwitch[id] = 0;



g_flPlayerDmg[id] = 0.0;

g_iPlayerKills[id] = 0;

}



public cmdTopDamageSwitch(id)

{

g_isSwitch[id] = (g_isSwitch[id]) ? 0 : 1;

num_to_str(g_isSwitch[id], g_szText, charsmax(g_szText));

client_cmd(id, "setinfo _topdamage %s", g_szText);



new szSwitch[20];

formatex(szSwitch, charsmax(szSwitch), "%s", g_isSwitch[id] ? "включили" : "отключили");



client_print_color(id, print_team_default,

"%s ^1Ð’Ñ‹ %s ^4TOP-%d DAMAGE PROVOCAT ^1IN ACEASTA RUNDA",

PREFIX, szSwitch, TOP_PLAYERS

);



return PLUGIN_CONTINUE;

}



public CSGameRules_RestartRound_Pre()

{

if(get_member_game(m_bCompleteReset))

g_iRoundCounter = 0;



g_iRoundCounter++;

ClearArr(g_flPlayerDmg);

ClearArr(g_iPlayerKills);



for(new i = 1; i <= g_iMaxPlayers; i++)

arrayset(g_arrData[i], 0, ePlayerData);

}



public CBasePlayer_TakeDamage(const pevVictim, pevInflictor, const pevAttacker, Float:flDamage, bitsDamageType)

{

if(pevVictim == pevAttacker || get_member(pevVictim, m_iTeam) == get_member(pevAttacker, m_iTeam) || bitsDamageType & DMG_BLAST)

return HC_CONTINUE;



if(IsPlayer(pevAttacker) && rg_is_player_can_takedamage(pevVictim, pevAttacker))

g_flPlayerDmg[pevAttacker] += flDamage;



return HC_CONTINUE;

}



public CBasePlayer_Killed(const Victim, Attacker)

{

if(!is_user_connected(Victim) || Victim == Attacker || !IsPlayer(Attacker) || get_member(Victim, m_iTeam) == get_member(Attacker, m_iTeam))

return HC_CONTINUE;



g_iPlayerKills[Attacker]++;

return HC_CONTINUE;

}



public fnCompareDamage()

{

new iPlayers[MAX_PLAYERS], iNum, iPlayer, szName[MAX_NAME_LENGTH];

get_players(iPlayers, iNum, "h");



for(new i = 0; i < iNum; i++)

{

iPlayer = iPlayers[i];



g_arrData[i][PLAYER_ID] = iPlayer;

g_arrData[i][DAMAGE] = _:g_flPlayerDmg[iPlayer];

g_arrData[i][KILLS] = _:g_iPlayerKills[iPlayer];

}



SortCustom2D(g_arrData, sizeof(g_arrData), "SortRoundDamage");



get_user_name(g_arrData[0][PLAYER_ID], szName, charsmax(szName));

rg_add_account(g_arrData[0][PLAYER_ID], GIVE_MONEY, AS_ADD, true);



client_print_color(0, print_team_default,

"%s ^3%s ^1a provocat cel mai mult damage in runda precedenta [^4%0.0f^1] si primeste [^4%d^3$^1].",

PREFIX, szName, g_arrData[0][DAMAGE], GIVE_MONEY

);



return PLUGIN_HANDLED;

}



public SortRoundDamage(const elem1[], const elem2[])

{

return (elem1[DAMAGE] < elem2[DAMAGE]) ? 1 : (elem1[DAMAGE] > elem2[DAMAGE]) ? -1 : 0;

}



public RoundEnd()

{

if(g_iRoundCounter >= ROUND_NUMBER)

{

set_task(0.1, "fnCompareDamage");



new iPlayers[MAX_PLAYERS], iNum, iPlayer;

get_players(iPlayers, iNum, "h");



for(new i = 0; i < iNum; i++)

{

iPlayer = iPlayers[i];

set_task(0.2, "fnShowStats", iPlayer);

}

}

}



public fnShowStats(id)

{

if(!g_isSwitch[id])

return PLUGIN_CONTINUE;



new iPlayers[MAX_PLAYERS], iNum, szMenu[512], szName[MAX_NAME_LENGTH], iLen;

get_players(iPlayers, iNum, "h");



iLen = formatex(szMenu, charsmax(szMenu), "\w#. \r[\yDamage\r] [\yFraguri\r] \win aceasta runda:^n^n");



if(iNum < MIN_PLAYERS)

return PLUGIN_CONTINUE;



if(iNum < TOP_PLAYERS)

{

for(new i = 0; i < iNum; i++)

{

get_user_name(g_arrData[i][PLAYER_ID], szName, charsmax(szName));



if(0.0 <= g_arrData[i][DAMAGE] < 10.0)

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y00%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

else if(10.0 <= g_arrData[i][DAMAGE] < 100.0)

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y0%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

else

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

}

}

else

{

for(new i = 0; i < TOP_PLAYERS; i++)

{

get_user_name(g_arrData[i][PLAYER_ID], szName, charsmax(szName));



if(0.0 <= g_arrData[i][DAMAGE] < 10.0)

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y00%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

else if(10.0 <= g_arrData[i][DAMAGE] < 100.0)

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y0%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

else

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. \r[\y%0.0f\r] [\y%d\r] \w%s^n", i + 1, g_arrData[i][DAMAGE], g_arrData[i][KILLS], szName);

}

}



show_menu(id, Keys, szMenu, SHOW_TIME, "TopDmg");

return PLUGIN_HANDLED;

}



public fnTopDmgHandler(id, iKey)

{

if(iKey >= 0 || iKey <= 9)

return PLUGIN_CONTINUE;



return PLUGIN_HANDLED;

}
I am using this plugin for top 5 damage dealt , if anyone has a better plugin please tell me .
About the error , I got a hunch it has something to do with the spectator bots
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
94
Реакции
64
Помог
5 раз(а)
last version in public is 1.0.4 without errors
 
Сообщения
94
Реакции
64
Помог
5 раз(а)
Kobra, in the same place where you found version 1.0.1
 
Сообщения
94
Реакции
64
Помог
5 раз(а)
Kobra, its really hard to type in google search amxx top damage round
 
Сообщения
290
Реакции
28
Помог
2 раз(а)
Found it , thank you very much !
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу