- Ошибка
-
Использую данный плагин с настройками, приведенными ниже. По стандарту стоит всегда показывать сообщение в начале раунда. Проблема в том, что на некоторых сборках не показывает сообщение пока не пропишешь /inforank. На STEAM работает сразу, все хорошо, как только зашел на сервак, прописывать ничего не надо. А вот к примеру на сборке от T-B и GS-M нужно прописывать в чат /inforank.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5235
- Билд
-
ReHLDS version: 3.4.0.668-dev
- ReGamedll
-
ReGameDLL version: 5.7.0.318-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5235 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 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] VTC AMXX API RUN - VoiceTranscoderApiProvider_amxx_i386.so v2017 RC pl5 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.6.0.161-dev pl5 ANY Never
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[12] MySQL RUN - mysql_amxx_i386.so v1.9.0.5235 pl5 ANY ANY
[13] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5235 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5235 pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5235 pl5 ANY ANY
[16] Engine RUN - engine_amxx_i386.so v1.9.0.5235 pl5 ANY ANY
16 plugins, 16 running
- Список плагинов
-
[ 1] Admin Loader 3.5 neygomon admin_loader.am running
[ 2] DopBan 3.0.3b kanagava dop_ban.amxx running
[ 3] FreshBans 1.4.0b kanagava fresh_bans_140. running
[ 4] ScreenMaker 1.1 neygomon screen_maker.am running
[ 5] WebHS 0.1 kanagava fb_web_online.a running
[ 6] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 7] Ultimate Chats Control 4.7 neygomon ucc.amxx running
[ 8] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 9] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 10] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 11] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 12] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 13] Info Rank 0.4.5 ConnorMcLeod info_rank.amxx running
[ 14] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 15] Test Vip 0.1 ill testvip_sql.amx running
[ 16] [ReAPI]Vip Weapons 3.5.1 ill Vip_Weapons.amx running
[ 17] Vip drop take block 1.3 bionext vip_drop_take_b running
[ 18] Night Damager_Parashut 1.0 ill NightLiteVip.am stopped
[ 19] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. stopped
[ 20] No Players Map 0.1 X-factor no_players_map. stopped
[ 21] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 22] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 23] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 24] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 25] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 26] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 27] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 28] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 29] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 30] MM block ext 0.0.1 dev-cs map_manager_blo running
[ 31] Hide HUD/Menu on Vote 1.2.1 d3m37r4 hide_hud_and_me running
[ 32] Menus Front-End 1.5 neugomon menufront_end.a running
[ 33] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 34] Players Menu 1.7 neugomon players_menu.am running
[ 35] Maps Menu 1.4.1+1 neugomon mapsmenu.amxx running
[ 36] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 37] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 38] CS Stats Logging 1.9.0.5235 AMXX Dev Team stats_logging.a running
[ 39] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 40] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 41] Ping Control 1.31 neygomon Ping_Control.am running
[ 42] Admin Models 1.2 pUzzlik admin_models_v1 running
[ 43] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 44] Weapon Restrict 1.7 s1lent weapon_rest.amx running
[ 45] Advert Messages 1.22 neygomon adverts.amxx running
[ 46] Auto Demo Recorder 2.3 F@nt0M demo_recorder.a running
[ 47] Kills Counter 1.0 Safety1st killscounter.am running
[ 48] SF Warn Menu 0.1.4f serfreeman1337 sf_admin_warns. running
[ 49] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 50] Block Advert 1.4 neygomon block_advert.am running
[ 51] Flash Control 2.2 neygomon flash_control.a running
[ 52] [ReAPI] Round Balancer 1.1 neygomon round_balancer. debug
[ 53] GameName Changer 1.0 neugomon gamename_change running
[ 54] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx debug
[ 55] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 56] Yet Another Voteban 1.7 AndrewZ/voed/wop yet_another_vot running
[ 57] block ip 0.2 legenda amx_blockip.amx running
[ 58] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
[ 59] Custom Smoke 1.05 bionext custom_smoke.am running
[ 60] Lite Translit 2.8+3 neygomon lite_translit.a running
[ 61] Time Pause Plugins 1.0 maFFyoZZyk & Mak time_pause_plug running
61 plugins, 58 running
- Автор плагина
- ConnorMcLeod
- Версия плагина
- 0.4.5
- Исходный код
-
/* Added Skill letter and vallue from seerfreeman`s plugin aes_statsx_cstrike */
/* Configuration */
#define ENABLED_BY_DEFAULT 1
#define NVAULT_MAX_DAYS_SAVE 10
/* DON'T CHANGE ANYTHING BELOW */
#include <amxmodx>
#include <nvault>
#include <csstatsx_sql>
// User stats parms id
#define STATS_KILLS 0
#define STATS_DEATHS 1
#define STATS_HS 2
#define STATS_TKS 3
#define STATS_SHOTS 4
#define STATS_HITS 5
#define STATS_DAMAGE 6
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#define print_team_default DontChange
#define print_team_grey Grey
#define print_team_red Red
#define print_team_blue Blue
#endif
#define VERSION "0.4.5"
#define MAX_PLAYERS 32
#define A_DAY_IN_SECONDS 86400 // 60 * 60 * 24
#define CHECK_DELAY 0.5
new g_iOldRank[MAX_PLAYERS+1]
new playerbitStatsEnabled
#define EnablePlayerStats(%0) playerbitStatsEnabled |= 1<<(%0&31)
#define DisablePlayerStats(%0) playerbitStatsEnabled &= ~(1<<(%0&31))
#define ArePlayerStatsEnabled(%0) playerbitStatsEnabled & 1<<(%0&31)
#define TogglePlayerStats(%0) playerbitStatsEnabled ^= 1<<(%0&31)
new playerbitDisplayStats
//#define DisplayStatsOnNextResetHUDEvent(%0) playerbitDisplayStats |= 1<<(%0&31)
#define DontDisplayStatsOnNextResetHUDEvent(%0) playerbitDisplayStats &= ~(1<<(%0&31))
#define ShouldDisplayStatsOnNextResetHUDEvent(%0) playerbitDisplayStats & 1<<(%0&31)
new g_iEnabledByDefault = ENABLED_BY_DEFAULT
new g_iNvault
new g_pCvarInfoRank
new const g_skill_letters[][] = {
"L-",
"L",
"L+",
"M-",
"M",
"M+",
"H-",
"H",
"H+",
"P-",
"P",
"P+",
"G"
}
new Float:g_skill_opt[sizeof g_skill_letters]
public plugin_init()
{
register_plugin("Info Rank", VERSION, "ConnorMcLeod")
register_dictionary("inforank.txt")
g_pCvarInfoRank = register_cvar("amx_inforank", "1")
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
register_event("ResetHUD", "Event_ResetHUD", "b")
register_clcmd("say /inforank", "ClientCommand_InfoRank", 0, "- enable/disable info rank messages")
register_clcmd("say_team /inforank", "ClientCommand_InfoRank", 0, "- enable/disable info rank messages")
g_iNvault = nvault_open("inforank")
nvault_prune(g_iNvault, 0, get_systime(-(A_DAY_IN_SECONDS * NVAULT_MAX_DAYS_SAVE)) )
}
public plugin_cfg()
{
new levelString[512],stPos,ePos,rawPoint[20],cnt
new g_pCvarSkill = get_cvar_pointer("aes_statsx_skill")
get_pcvar_string(g_pCvarSkill,levelString,charsmax(levelString))
// парсер значений для скилла
do {
ePos = strfind(levelString[stPos]," ")
formatex(rawPoint,ePos,levelString[stPos])
g_skill_opt[cnt] = str_to_float(rawPoint)
stPos += ePos + 1
cnt++
if(cnt > sizeof g_skill_letters - 1)
break
} while (ePos != -1)
}
public client_putinserver(id) {
set_task( CHECK_DELAY, "CheckStats", id ) // we need to use delay otherwise we will get rank = 0
}
public CheckStats(id)
{
if( is_user_connected(id) )
{
new szSteamId[32]
get_user_authid(id, szSteamId, charsmax(szSteamId))
if( szSteamId[0] == 'S' ) // skip bots
{
new mOsef[8]
g_iOldRank[id] = get_user_stats_sql(id, mOsef, mOsef)
new szPlayerSettings[2]
nvault_get(g_iNvault,szSteamId, szPlayerSettings, charsmax(szPlayerSettings))
switch( szPlayerSettings[0] )
{
case '0': DisablePlayerStats(id)
case '1': EnablePlayerStats(id)
default: g_iEnabledByDefault ? (EnablePlayerStats(id)) : (DisablePlayerStats(id))
}
}
else
{
DisablePlayerStats(id)
}
}
}
public plugin_end()
{
nvault_close(g_iNvault)
}
public Event_HLTV_New_Round()
{
if( get_pcvar_num(g_pCvarInfoRank) )
{
playerbitDisplayStats = 0xFFFFFFFF // set everyone enabled
}
}
public Event_ResetHUD(id)
{
if( ShouldDisplayStatsOnNextResetHUDEvent(id) && ArePlayerStatsEnabled(id) )
{
DontDisplayStatsOnNextResetHUDEvent(id)
set_task(0.3, "DisplayStats", id)
}
}
public DisplayStats(id)
{
if( is_user_connected(id) )
{
new Stats[8], BodyHits[8], iRank, iOldRank
new Float:skill, skill_id
iRank = get_user_stats_sql(id, Stats, BodyHits)
get_user_skill(id, skill)
skill_id = aes_statsx_get_skill_id(skill)
iOldRank = g_iOldRank[id]
if( iOldRank && iOldRank != iRank )
{
g_iOldRank[id] = iRank
iOldRank - iRank > 0 ? client_print_color(id, print_team_blue, "%L", id, "IR_GOOD", iRank, get_statsnum_sql(), Stats[STATS_KILLS], Stats[STATS_DEATHS], g_skill_letters[skill_id], skill)
: client_print_color(id, print_team_red, "%L", id, "IR_BAD", iRank, get_statsnum_sql(), Stats[STATS_KILLS], Stats[STATS_DEATHS], g_skill_letters[skill_id], skill);
}
else
client_print_color(id, print_team_blue, "%L", id, "IR_RANK", iRank, get_statsnum_sql(), Stats[STATS_KILLS], Stats[STATS_DEATHS], g_skill_letters[skill_id], skill)
}
}
aes_statsx_get_skill_id(Float:skill)
{
for(new i ; i < sizeof g_skill_opt ; i++)
{
if(skill < g_skill_opt[i])
{
return i
}
}
return (sizeof g_skill_opt - 1)
}
public ClientCommand_InfoRank(id)
{
if( get_pcvar_num(g_pCvarInfoRank) )
{
new szSteamId[32]
get_user_authid(id, szSteamId, charsmax(szSteamId))
TogglePlayerStats(id)
if( ArePlayerStatsEnabled(id) )
{
nvault_set(g_iNvault, szSteamId, "1")
client_print_color(id, id, "^4%L", id, "IR_ENABLE")
}
else
{
nvault_set(g_iNvault, szSteamId, "0")
client_print_color(id, print_team_red, "^3%L", id, "IR_DISABLE")
}
}
return PLUGIN_CONTINUE
}
Мне не нужна эта функция вкл/выкл. Может проще ее вообще вырезать отсюда? Я попытался это сделать, но захожу на сервак, и в чат нет сообщения, а включить уже никак не могу (скорее всего неправильно вырезаю). Помогите, плиз, решить проблему.