Участник
Пользователь
- Сообщения
- 290
- Реакции
- 28
- Помог
- 2 раз(а)
- Ошибка
-
Top awards plugin doesn't issue the flags after mapchange all the time
- ОС
- Linux
- Amx Mod X
-
amxx version
AMX Mod X 1.9.0.5291 (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: Sep 17 2021 04:23:28
Built from: https://github.com/alliedmodders/amxmodx/commit/8817f3e
Build ID: 5291:8817f3e
Core mode: JIT+ASM32
- Билд
-
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.767-dev
Build date: 03:13:55 Oct 25 2021 (2753)
Build from: https://github.com/dreamstalker/rehlds/commit/471158b
- ReGamedll
-
game version
ReGameDLL version: 5.21.0.546-dev
Build date: 15:32:48 Dec 28 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/09a6c61
- Версия Metamod
-
meta version
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
- Список метамодулей
-
meta list
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5291 ini Start ANY
[ 2] Print Center Fix RUN - printcenterfix_mm_i386.so v2.0.1 ini ANY ANY
[ 3] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 7] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl1 ANY ANY
[ 8] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl1 ANY ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl1 ANY Never
[10] Orpheu RUN - orpheu_amxx_i386.so v2.6.3 pl1 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[12] MySQL RUN - mysql_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[17] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[18] Fun RUN - fun_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[19] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
19 plugins, 19 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] Top Awards 1.2.0 szawesome top_awards.amxx running
[ 2] Status and Ping blocke 1.0 Shadows Adi block_status_pi running
[ 3] AntiIdleBot 2.0.0 mx?! antiindlebot.am running
[ 4] Lista admini (amx_who) cs.darkeli Kobra cwhobun.amxx running
[ 5] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 6] No Name Change 2.1 OciXCrom crx_nonamechang running
[ 7] Advanced Mute 2.1 OciXCrom crx_advmute.amx running
[ 8] [ReAPI] VIP System 1.3.1 pUzzlik re_vip_system.a running
[ 9] Check Vip 2.0 Leo_[BH] check.amxx running
[ 10] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 11] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 12] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 13] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 14] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 15] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 16] AES Bonus: Flags 0.1 Sonyx aes_bonus_flags running
[ 17] FreshBans 1.4.5b kanagava fresh_bans_145- running
[ 18] WebHS 0.1 kanagava fb_web_online.a running
[ 19] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 20] Access Manager 1.0.0 mx?! AccessManager.a debug
[ 21] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 22] Write MS 0.1 ill log_ms.amxx running
[ 23] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 24] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 25] Private Message: Core 1.5 Denzer private_message running
[ 26] Private Message: Loggi 1.3 Denzer private_message running
[ 27] Admin Commands 1.9.0.5291 AMXX Dev Team admincmd.amxx running
[ 28] Admin Help 1.9.0.5291 AMXX Dev Team adminhelp.amxx running
[ 29] Multi-Lingual System 1.9.0.5291 AMXX Dev Team multilingual.am running
[ 30] Menus Front-End 1.9.0.5291 AMXX Dev Team menufront.amxx running
[ 31] Commands Menu 1.9.0.5291 AMXX Dev Team cmdmenu.amxx running
[ 32] Players Menu 1.7 neugomon players_menu.am running
[ 33] Plugin Menu 1.9.0.5291 AMXX Dev Team pluginmenu.amxx running
[ 34] Pause Plugins 1.9.0.5291 AMXX Dev Team pausecfg.amxx running
[ 35] Stats Configuration 1.9.0.5291 AMXX Dev Team statscfg.amxx running
[ 36] Items Restrict 1.1 s1lent items_restrict. running
[ 37] Ping Faker 1.0 Hattrick pingfaker2.amxx running
[ 38] AFK Bomb Transfer 0.4 VEN afkBMB.amxx running
[ 39] unknown unknown unknown flash.amxx running
[ 40] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 41] Unlimited Choose Team 1.0 Javekson unlimited_choos running
[ 42] Parachute 1.3 Fixed KRoT@L/JTP10181 parasuta.amxx running
[ 43] Last Maps Time 0.0.1 Exolent last_maps_time. running
[ 44] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 45] Advanced Spam Nick Cha 0.2 Fullserver advanced_spam_n running
[ 46] unknown unknown unknown fake.amxx running
[ 47] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 48] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 49] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 50] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 51] Reklama 09.07.2019 mx?! reklama.amxx running
[ 52] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 53] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 54] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 55] Admin Commands Log 1.2 w0w admin_commands_ running
[ 56] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 57] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 58] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 59] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 60] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 61] Voiceserver Connect 1.1.015 Nextra voiceserver_con running
[ 62] Hide 1.1 xPaw hidexpaw.amxx running
[ 63] Say Me And HP 1.0 Javekson sayme.amxx running
[ 64] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 65] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 66] [ReAPI] Block 'Fire in 0.0.1 sergrib simpleblockfith running
[ 67] Online Logger 1.0.3 mx?! online_logger.a running
[ 68] 49 44 49 20 4E 41 58 59 49 ausermsg.amxx running
[ 69] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 70] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 71] Trial Access 1.0.0 mx?! trial_access.am running
[ 72] Map Manager: Core 3.1.4 Mistrick map_manager_cor running
[ 73] Map Manager: Scheduler 0.1.9 Mistrick map_manager_sch running
[ 74] Admin Mapmenu 0.5.3 d3m37r4 admin_mapmenu.a running
[ 75] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 76] Map Manager: Nominatio 0.2.0 Mistrick map_manager_nom running
[ 77] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 78] Map Manager: Online so 0.0.4 Mistrick map_manager_onl running
[ 79] Map Manager: Effects 0.1.0 Mistrick map_manager_eff running
[ 80] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 81] Map Manager: Advanced 0.1.0 Mistrick map_manager_adv running
[ 82] Map Manager: Priority 0.0.2 Mistrick map_manager_pri running
[ 83] ChatAdditions: Core v1.8.1 Sergey Shorokhov ChatAdditions_C running
[ 84] ChatAdditions: CSBans v1.8.1 Sergey Shorokhov CA_Storage_CSBa running
[ 85] CA: Gag v1.8.1 Sergey Shorokhov CA_Gag.amxx running
[ 86] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 87] [SQL] Chat Manager 1.1.1-13 Mistrick chatmask.amxx running
[ 88] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 89] Mode 2x2 2.5re s1lent mode.amxx running
[ 90] AWP Restrictions 1.5.1 Radius awp_restriction running
[ 91] Style C4 Timer 3.0 OciXCrom crx_c4timer.amx running
[ 92] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 93] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. running
[ 94] WalkGuard 1.3.2 mogel walkguard.amxx running
94 plugins, 94 running
- Автор плагина
- szawesome
- Версия плагина
- 1.2.0
- Исходный код
-
#include <amxmodx>
#include <reapi>
/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ */
#define AUTO_CFG // автоматическое создание конфига с кварами
// #define CSSTATS_MYSQL // раскомментируйте если на сервере установлена статистика CsStats MySQL от SKAJIbnEJIb
#define CSSTATSX_SQL // раскомментируйте если на сервере установлена статистика CSstatsX SQL от serfreeman1337
// #define CMSSTATS_MYSQL // раскомментируйте если на сервере установлена статистика CMSStats MySQL от zhorzh78
/*
Если закомментировать все сразу #define CSSTATS_MYSQL и #define CSSTATSX_SQL и #define CMSSTATS_MYSQL
то плагин будет работать со стандартной статистикой CSX (cstrike/addons/amxmodx/data/csstats.dat)
*/
/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ */
#if defined CSSTATS_MYSQL
native csstats_get_user_stats(id, stats[22]);
#elseif defined CSSTATSX_SQL
native get_user_stats_sql(index, stats[8], bodyhits[8]);
#elseif defined CMSSTATS_MYSQL
native cmsstats_get_user_stats(id, stats[8], bodyhits[8]);
#else
#include <csstats>
#endif
enum any:CVARS {
COUNT,
FLAGS[32],
FLAGS_BIT,
ALERT[192],
ALERT_COLOR[12],
ALERT_COLOR_R,
ALERT_COLOR_G,
ALERT_COLOR_B,
ALERT_COORDS[32],
Float:ALERT_COORDS_X,
Float:ALERT_COORDS_Y,
ALERT_SOUND[64]
};
enum bool:PLAYER_DATA {
IS_TOP,
IS_ALERT_SHOWED
};
new cvar[CVARS], player[MAX_CLIENTS + 1][PLAYER_DATA];
public plugin_init() {
register_plugin("Top Awards", "1.2.0", "szawesome");
if(strlen(cvar[ALERT])) {
RegisterHookChain(RG_CBasePlayer_OnSpawnEquip, "CBasePlayer_OnSpawnEquip_Post", true);
}
}
public plugin_precache() {
RegisterCvars();
ValueCvars();
if(strlen(cvar[ALERT_SOUND])) {
precache_sound(cvar[ALERT_SOUND]);
}
}
public client_putinserver(id) {
player[id][IS_TOP] = false;
player[id][IS_ALERT_SHOWED] = false;
set_task(0.5, "CheckStats", id);
}
public CheckStats(id) {
new pFlags = get_user_flags(id);
if(pFlags & cvar[FLAGS_BIT] || pFlags & cvar[FLAGS_BIT] == cvar[FLAGS_BIT]) {
return HC_CONTINUE;
}
if(cvar[COUNT] <= 0) {
return HC_CONTINUE;
}
#if defined CSSTATS_MYSQL
new pStats[22];
#else
new pStats[8], pBodyHits[8];
#endif
#if defined CSSTATS_MYSQL
new pRank = csstats_get_user_stats(id, pStats);
#elseif defined CSSTATSX_SQL
new pRank = get_user_stats_sql(id, pStats, pBodyHits);
#elseif defined CMSSTATS_MYSQL
new pRank = cmsstats_get_user_stats(id, pStats, pBodyHits);
#else
new pRank = get_user_stats(id, pStats, pBodyHits);
#endif
if(pRank && 0 < pRank <= cvar[COUNT]) {
set_user_flags(id, pFlags | cvar[FLAGS_BIT]);
player[id][IS_TOP] = true;
}
return HC_CONTINUE;
}
public CBasePlayer_OnSpawnEquip_Post(id, bool:addDefault, bool:equipGame) {
if(is_user_alive(id) && !is_user_bot(id) && player[id][IS_TOP] && !player[id][IS_ALERT_SHOWED]) {
screen_fade(id, cvar[ALERT_COLOR_R], cvar[ALERT_COLOR_G], cvar[ALERT_COLOR_B], 100, 1);
set_dhudmessage(cvar[ALERT_COLOR_R], cvar[ALERT_COLOR_G], cvar[ALERT_COLOR_B], cvar[ALERT_COORDS_X], cvar[ALERT_COORDS_Y], 2, _, 5.0, 0.07);
show_dhudmessage(id, cvar[ALERT]);
if(strlen(cvar[ALERT_SOUND])) {
rg_send_audio(id, cvar[ALERT_SOUND]);
}
player[id][IS_ALERT_SHOWED] = true;
}
}
RegisterCvars() {
bind_pcvar_num(
create_cvar(
.name = "top_awards_count",
.string = "3",
.flags = FCVAR_NONE,
.description = "Выдавать флаги TOP-N игрокам",
.has_min = true,
.min_val = 1.0
),
cvar[COUNT]
);
bind_pcvar_string(
create_cvar(
.name = "top_awards_flags",
.string = "t",
.flags = FCVAR_NONE,
.description = "Выдаваемые флаги. Можно сочитать, например: bt"
),
cvar[FLAGS],
charsmax(cvar[FLAGS])
);
bind_pcvar_string(
create_cvar(
.name = "top_awards_alert",
.string = "Бесплатная VIP активирована\nТы в ТОП-\d лучших игроков сервера",
.flags = FCVAR_NONE,
.description = "Выводить сообщение о активации привилегии?^nОставьте пустым чтобы не выводить^n\n - перенос строки^n\d - число из квара top_awards_count"
),
cvar[ALERT],
charsmax(cvar[ALERT])
);
bind_pcvar_string(
create_cvar(
.name = "top_awards_alert_color",
.string = "255 255 0",
.flags = FCVAR_NONE,
.description = "Цвет сообщения и затемнения экрана. Формат: R G B"
),
cvar[ALERT_COLOR],
charsmax(cvar[ALERT_COLOR])
);
bind_pcvar_string(
create_cvar(
.name = "top_awards_alert_coords",
.string = "-1.0 -0.29",
.flags = FCVAR_NONE,
.description = "Координаты сообщения. Формат: X Y^nУказывается % смещения разделённый на 100^n-1.0 - по центру"
),
cvar[ALERT_COORDS],
charsmax(cvar[ALERT_COORDS])
);
bind_pcvar_string(
create_cvar(
.name = "top_awards_alert_sound",
.string = "fvox/bell.wav",
.flags = FCVAR_NONE,
.description = "Воспроизводить звук при активации привилегии?^nОставьте пустым чтобы не воспроизводить^nЗвук должен лежать в папке sound"
),
cvar[ALERT_SOUND],
charsmax(cvar[ALERT_SOUND])
);
#if defined AUTO_CFG
AutoExecConfig();
#endif
}
ValueCvars() {
// FLAGS BITS
cvar[FLAGS_BIT] = read_flags(cvar[FLAGS]);
// FORMAT ALERT MESSAGE
if(strlen(cvar[ALERT])) {
new cvCount[16]; num_to_str(cvar[COUNT], cvCount, sizeof cvCount);
replace_all(cvar[ALERT], charsmax(cvar[ALERT]), "\n", "^n");
replace_all(cvar[ALERT], charsmax(cvar[ALERT]), "\d", cvCount);
}
// PARSE COLORS
new red[4], green[4], blue[4];
parse(cvar[ALERT_COLOR], red, charsmax(red), green, charsmax(green), blue, charsmax(blue));
cvar[ALERT_COLOR_R] = str_to_num(red);
cvar[ALERT_COLOR_G] = str_to_num(green);
cvar[ALERT_COLOR_B] = str_to_num(blue);
// PARSE COORDS
new coord_x[16], coord_y[16];
parse(cvar[ALERT_COORDS], coord_x, charsmax(coord_x), coord_y, charsmax(coord_y));
cvar[ALERT_COORDS_X] = str_to_float(coord_x);
cvar[ALERT_COORDS_Y] = str_to_float(coord_y);
}
stock screen_fade(id, red, green, blue, alfa, durration) {
if(!is_user_connected(id) || is_user_bot(id)) {
return;
}
if(bool:(Float:get_member(id, m_blindStartTime) + Float:get_member(id, m_blindFadeTime) >= get_gametime())) {
return;
}
new dUnits = clamp((durration * (1 << 12)), 0, 0xFFFF);
static userMessage_ScreenFade;
if(userMessage_ScreenFade > 0 || (userMessage_ScreenFade = get_user_msgid("ScreenFade"))) {
message_begin(MSG_ONE_UNRELIABLE, userMessage_ScreenFade, .player = id);
write_short(dUnits);
write_short(dUnits/2);
write_short(0x0000);
write_byte(red);
write_byte(green);
write_byte(blue);
write_byte(alfa);
message_end();
}
}
Sometimes ,after mapchange , the plugin does not give the players from top positions the specified flags and they need to retry once or several times to get the flags.