Top Awards plugin by neygomon problem

Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
Top Awards plugin is not working anymore
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5378 (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: Aug 2 2019 00:48:30
Built from: https://github.com/alliedmodders/amxmodx/commit/0bd6944
Build ID: 5378:0bd6944
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.685-dev
Build date: 16:27:16 Aug 11 2019 (1947)
Build from: https://github.com/dreamstalker/rehlds/commit/5b68568
ReGamedll
ReGameDLL version: 5.9.0.379-dev
Build date: 21:25:38 Aug 13 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/411a028
Версия 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.10.0.5378 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] MySQL RUN - mysql_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.9.0.178-dev pl4 ANY Never
[11] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl4 ANY ANY
[12] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[13] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl4 ANY ANY
[14] Engine RUN - engine_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[15] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[17] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[18] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.10.0.5378 pl4 ANY ANY
19 plugins, 19 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 2] Damager Advanced 1.1.2 Radius (based on damager_advance running
[ 3] Advanced Mute 2.1 OciXCrom crx_advmute.amx running
[ 4] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 5] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 6] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 7] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 8] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 9] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 10] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 11] Top Awards 1.0 neygomon top_awards.amxx running
[ 12] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 13] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 14] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 15] FreshBans 1.4.2b kanagava fresh_bans_142_ running
[ 16] Admin Load 3.9.3 Dev F@nt0M adminload.amxx running
[ 17] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 18] Lista admini (amx_who) cs.area-ga Kobra whobun.amxx running
[ 19] Ultimate SS 1.2 Hack ultimate_ss.amx running
[ 20] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 21] unknown unknown unknown flash.amxx running
[ 22] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 23] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 24] Motd System 1.0 Hypa_[KZ] motd_system.amx running
[ 25] Admin Commands 1.10.0.537 AMXX Dev Team admincmd.amxx running
[ 26] Commands Menu 1.10.0.537 AMXX Dev Team cmdmenu.amxx running
[ 27] Menus Front-End 1.10.0.537 AMXX Dev Team menufront.amxx running
[ 28] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 29] Players Menu 1.7 neugomon players_menu.am running
[ 30] Pause Plugins 1.10.0.537 AMXX Dev Team pausecfg.amxx running
[ 31] Admin Help 1.10.0.537 AMXX Dev Team adminhelp.amxx running
[ 32] Language Menu 1.0 F@nt0M langmenu.amxx running
[ 33] Plugin Menu 1.10.0.537 AMXX Dev Team pluginmenu.amxx running
[ 34] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 35] Private Message: Core 1.4 Denzer private_message running
[ 36] Private Message: Loggi 1.3 Denzer private_message running
[ 37] Items Restrict 1.1 s1lent items_restrict. running
[ 38] Best Player MOTD 1.2.1 OciXCrom crx_bestplayer. running
[ 39] Simple Menu 2.1.1 OciXCrom crx_simplemenu. debug
[ 40] Restricted Names 1.1 Hattrick JM3Ch3R nick.amxx running
[ 41] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 42] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 43] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 44] Bet 2.2 Filip Vilicic bet.amxx running
[ 45] Stats Configuration 1.10.0.537 AMXX Dev Team statscfg.amxx running
[ 46] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 47] Style C4 Timer 2.1 OciXCrom crx_c4timer.amx running
[ 48] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 49] unknown unknown unknown fake.amxx running
[ 50] Ultimele Harti 1.0 M@$t3r_@dy harti.amxx running
[ 51] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 52] [ReAPI] TopRoundDamage 1.0.5 Dager* *.* -G- damage_round.am running
[ 53] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 54] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 55] Objective as GameName 1.1.1 CHEL74 obj_as_gamename running
[ 56] Activitate Admini 2.0c Askhanar activitate.amxx running
[ 57] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 58] Reklama 09.07.2019 mx?! reklama.amxx running
[ 59] Swear Replacement 1.5 kaboomkazoom swear_repl.amxx running
[ 60] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 61] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 62] Simple Online Logger 23.05.19 mx?! simple_online_l running
[ 63] Trial Access 05.07.19 mx?! trial_access.am running
[ 64] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 65] VIP Menu [CS.PLAYARENA 0.15 Leo_[BH](tradus vip_reapi.amxx debug
[ 66] VIP NOU 1.0 test vampire.amxx running
[ 67] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 68] Check Vip 2.0 Leo_[BH] check.amxx running
[ 69] Admin Groups 1.2 OciXCrom crx_admingroups running
[ 70] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 71] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 72] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 73] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 74] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 75] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 76] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 77] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 78] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 79] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 80] FocusOnVotemap 1.2.1 Boec[SpecOPs] focus_on_votema running
[ 81] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 82] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 83] Force Gag 1.2 zorken zilla_gag.amxx running
[ 84] ReParachute 1.1 PurposeLess reparachute.amx running
[ 85] [ReAPI:AMXX] Buy Nades 0.2 F@nt0M Buy_Nades_Timeo debug
[ 86] Voiceserver Connect 1.1.015 Nextra voiceserver_con debug
[ 87] Advanced Kill Assists 0.9 Spection next21_kill_ass running
[ 88] Hide 1.1 xPaw hidexpaw.amxx running
[ 89] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 90] Advanced Eliminate 0.1.5 Askhanar advanced_elimin running
[ 91] Admin Exec 2.0c Askhanar amxexec.amxx running
[ 92] Say Me And HP 1.0 Javekson say_me_hp.amxx running
[ 93] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 94] Admin Spectator ESP 1.3 KoST esp.amxx running
[ 95] Night VIP 1.0 TBONTB vipfreenoaptea. running
[ 96] ReChecker Logging 1.0 custom rc_logging.amxx running
[ 97] Mode 2x2 2.5re s1lent mode.amxx running
[ 98] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
98 plugins, 98 running
Автор плагина
neygomon
Версия плагина
1.0
Исходный код
#include <amxmodx>
#tryinclude <reapi>
#if !defined _reapi_included
#include <hamsandwich>
#endif

#define YOUR_STATS_SYSTEM 2
// Ð˜Ð³Ñ€Ð¾Ð²Ð°Ñ ÑтатиÑтика, уÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ Ð½Ð° Вашем Ñервере
// 0 - CSX
// 1 - CSSTATS MYSQL by SKAJIbnEJIb
// 2 - CSSTATSX SQL by serfreeman1337

#define MAX_TOP_POSITION 10
// Сколько первых человек из ÑтатиÑтики получат флаги из SET_FLAGS

#define SET_FLAGS ADMIN_LEVEL_H
// Выдаваемые флаги доÑтупа

#define IGNORED_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H)
// Флаги, Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ð¼Ð¸ не выдавать флаги

#if YOUR_STATS_SYSTEM == 0
#include <csstats>
#endif
#if YOUR_STATS_SYSTEM == 1
#include <csstats_mysql>
#endif
#if YOUR_STATS_SYSTEM == 2
#include <csstatsx_sql>
#endif

new bool:g_bSetFlags[33];

public plugin_init()
{
register_plugin("Top Awards", "1.0", "neygomon");
#if defined _reapi_included
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true);
#else
RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn_Post", true);
#endif
}

public client_putinserver(id)
g_bSetFlags[id] = false;

public CBasePlayer_Spawn_Post(const id)
{
if(!is_user_connected(id))
return;

if(!is_user_allowed(id))
{
if(g_bSetFlags[id])
{
set_user_flags(id, get_user_flags(id) & ~SET_FLAGS);
client_print(id, print_chat, "Ð’Ñ‹ вылетели из TOP %d Ñервера. Привилегии удалены :(", MAX_TOP_POSITION);
g_bSetFlags[id] = false;
}
}
else
{
set_user_flags(id, get_user_flags(id) | SET_FLAGS);
client_print(id, print_chat, "Ð’Ñ‹ попали в TOP %d Ñервера. Привилегии уÑпешно активированы :)", MAX_TOP_POSITION);
g_bSetFlags[id] = true;
}
}

bool:is_user_allowed(id)
{
if(get_user_flags(id) & IGNORED_FLAGS)
return false;

new myRank = 0;
new bool:bAllowed = false;
new players[32], pnum;
get_players(players, pnum);

#if YOUR_STATS_SYSTEM == 0 || YOUR_STATS_SYSTEM == 2
new st[8], bh[HIT_RIGHTLEG + 1];
#endif
#if YOUR_STATS_SYSTEM == 1
new st[22];
#endif
for(new i, pos; i < pnum; ++i)
{
#if YOUR_STATS_SYSTEM == 0
pos = get_user_stats(id, st, bh);
#endif
#if YOUR_STATS_SYSTEM == 1
pos = csstats_get_user_stats(id, st);
#endif
#if YOUR_STATS_SYSTEM == 2
pos = get_user_stats_sql(id, st, bh);
#endif
if(players[i] == id)
myRank = pos;
else
{
if(0 < pos <= MAX_TOP_POSITION)
{
if(get_user_flags(players[i]) & SET_FLAGS)
{
bAllowed = true;
break;
}
}
}
}

if(bAllowed && myRank == MAX_TOP_POSITION + 1)
return true;
else if(0 < myRank <= MAX_TOP_POSITION)
return true;

return false;
}
Added the plugin like two months ago and it was working perfectly fine but with the time I have updated rehlds,regamedll,amxx etc and now it's not working(running but not issuing privileges) and it seems like I can't find the problem or reproduce the server configuration I had back then...would appreciate if anyone can come up with suggestions
 
Сообщения
290
Реакции
28
Помог
2 раз(а)

Ayk

Сообщения
763
Реакции
478
Помог
19 раз(а)
Try to put it last in plugins.ini list, maybe you get flags ovveride.
 

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

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