Участник
Пользователь
- Сообщения
- 391
- Реакции
- 106
- Помог
- 2 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
player out of range (144)
L 10/13/2021 - 00:10:47: [AMXX] Displaying debug trace (plugin "aes_informer.amxx", version "0.5.9 [REAPI]")
L 10/13/2021 - 00:10:47: [AMXX] Run time error 10: native error (native "aes_get_player_exp")
L 10/13/2021 - 00:10:47: [AMXX] [0] aes_informer.sma::Show_Hud_Informer (line 624)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5293
- Билд
-
ReHLDS version: 3.10.0.761-dev
- ReGamedll
-
ReGameDLL version: 5.21.0.534-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini Start Never
[ 2] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 3] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 4] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 6] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 7] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 8] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[ 9] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5293 ini Start ANY
[10] YaPB RUN - yapb.so v4.2.623 ini Chlvl ANY
[11] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[13] MySQL RUN - mysql_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl9 ANY Never
[15] ReAPI RUN - reapi_amxx_i386.so v5.20.0.231-dev pl9 ANY Never
[16] Engine RUN - engine_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[17] AuthEmu RUN - authemu_amxx_i386.so v5.2.12.525-dev+m pl9 ANY Never
[18] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[20] CSX RUN - csx_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
[21] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5293 pl9 ANY ANY
21 plugins, 21 running
- Список плагинов
-
amxx plugins
12] DevMs BlackList 1.5.1 gyxoBka DevMs_BlackList debug
[ 13] [GS] Models Replacemen 1.14041 AlexandrFiner gs_usermodels.a running
[ 14] [ReAPI] Custom Models 1.6 neugomon custom_models_f running
[ 15] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 16] AES: StatsX 0.6 Dev-CS serfreeman1337/s aes_statsx_cstr running
[ 17] Ultimate Chats Control 5.2(b) neygomon ucc.amxx debug
[ 18] UCC Addon: VoteGAG 1.2 neygomon ucc_votegag.amx running
[ 19] Time for info 1.0 neugomon time_for_info.a running
[ 20] Knife WarnUP 2.0 Alik & Inline & knife_warnupAli stopped
[ 21] [190] Screen Player 20.06.06 SKAJIbnEJIb screen_player.a running
[ 22] [CS] Dead Alltalk 0.1 Allied dead_alltalk.am running
[ 23] Vampire 1.0 AlexandrFiner vampire_pro.amx running
[ 24] Maps Menu 1.4.1 neugomon mapsmenu_stalin running
[ 25] menu_votemap_admin 1.0 stalin_alex menu_mapm_start running
[ 26] [190] Blind RBS 20.06.06 SKAJIbnEJIb blind_rbs.amxx running
[ 27] TimeProjector 0.1 ST4life timeprojector.a running
[ 28] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 29] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 30] CS Misc. Stats 1.9.0.5221 AMXX Dev Team miscstats.amxx running
[ 31] CSXSQL: Onlinetime Awa 0.2 serfreeman1337 csstatsx_playti running
[ 32] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 33] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 34] Menus Front-End 1.5 untest neugomon menufront_end.a running
[ 35] Players Menu 1.7 neugomon players_menu.am running
[ 36] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 37] Admin Votes 1.9.0.5234 AMXX Dev Team adminvote.amxx running
[ 38] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 39] [190] DemoRecorder RBS 20.06.06 SKAJIbnEJIb demorecorder_rb running
[ 40] Advert Messages 1.2.2 neygomon adverts_dead.am running
[ 41] GameName Changer 1.0 neugomon gamename_change running
[ 42] LogsRemove 1.0 melo4 logsremove.amxx running
[ 43] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 44] List Of Admins Online 1.0.8 wellasgood List_Of_Admins_ running
[ 45] [190] AfkKicker RBS 20.08.02 SKAJIbnEJIb afkkicker_rbs.a running
[ 46] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 47] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 48] Ping Control 1.31 neygomon Ping_Control.am running
[ 49] Chat Manager 1.1.2-16 Mistrick chatmanager_ski running
[ 50] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 51] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 52] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 53] Parachute Lite [ReAPI] 11.0 Leo_[BH] parachute_lite. running
[ 54] Block Spawn For Reconn 0.3 Bos93, Subb98 block_spawn_for running
[ 55] Block Change Name 1.0 DJ_WEST block_change_na running
[ 56] precashe 1.0 stalin precashe.amxx running
[ 57] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 58] MapBalance 1.0 BlackSignature MapBalance.amxx running
[ 59] GameRules Info 1.2 shadow GameRulesInfo.a running
[ 60] SlayNoobs 1.0 neygomon slay_noobs.amxx running
[ 61] Bomb Taker 0.0.1b Vaqtincha bomb_taker.amxx stopped
[ 62] sky by mapname 0.2 mx?! sky_by_mapname. running
[ 63] MENU 1.5 AmFeTaM1n menu.amxx running
[ 64] [ReAPI] Kills Counter 0.3 serfreeman1337 kills_counter2. running
[ 65] ReTalisman 1.4.2 gyxoBka ReTalisman.amxx running
[ 66] Nice Killer 1.7 Got Milk? / HoHo nice_killer.amx running
[ 67] [190] Analizator 20.06.06 SKAJIbnEJIb analizator.amxx running
[ 68] PM 0.01b AlexandrFiner PrivateMessage. running
[ 69] Name History 1.0 AlexandrFiner name_history.am debug
[ 70] Master Servers Check 4.8 Javekson ms_check.amxx running
[ 71] Auto-Give Privileges 1.0 SerGrib night_vips.amxx stopped
[ 72] Block Key 0.1 Stimul / SaRiOVe block_key.amxx running
[ 73] Flash Bug Fix 1.0.0 F@nt0M flash_fix.amxx running
[ 74] Crosshair Menu 1.2.5 KriTo & PurposeL crosshairmenu.a running
[ 75] Style C4 Timer 3.1 OciXCrom crx_c4timer.amx running
[ 76] [GRENADE] Molotov 1.0.2 medusa grenade_molotov running
[ 77] Top killer 1.3.2.1 uMk0 topkiller.amxx running
[ 78] Remove Defuse Kit 1.0 Stimul delete_kit2.amx running
[ 79] Bot Features 0.0.5 Vaqtincha BotFeatures.amx running
[ 80] Lite VoteBan 1.4 neygomon lite_voteban.am debug
[ 81] Lie Flat Optimized 1.1 Nomexous lie_flat_optimi running
[ 82] Lucky Defuser 1.0.2 iPlague lucky_defuser.a stopped
[ 83] Revive Players 2.0.1 Emma Jule ReAPI_Revive_Te running
[ 84] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 85] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 86] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 87] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom debug
[ 88] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 89] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 90] Map Manager: Effects 0.0.10 Mistrick map_manager_eff running
[ 91] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 92] Map Manager: Advanced 0.0.5 Mistrick map_manager_adv running
[ 93] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 94] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 95] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am debug
[ 96] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste stopped
[ 97] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri stopped
[ 98] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 99] DevMs Flag 1.0 gyxoBka DevMs_Flag.amxx running
[100] unknown unknown unknown weaponremover.a running
100 plugins, 94 running
- Автор плагина
- serfreeman1337/sonyx
- Версия плагина
- 0.5.9 [REAPI]
- Исходный код
-
/*
Advanced Experience System
by serfreeman1337 http://gf.hldm.org/
*/
/*
HUD Informer
*/
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#define CSSTATSX_SQL // расскомментируйте для поддержки CSstatsX SQL (http://1337.uz/csstatsx-sql/)
#include <aes_v>
#if defined CSSTATSX_SQL
#include <csstatsx_sql>
#endif
#define PLUGIN "AES: Informer"
#define VERSION "0.5.9 [REAPI]"
#define AUTHOR "serfreeman1337/sonyx"
#define LASTUPDATE "12, March (03), 2018"
#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
#define MAX_NAME_LENGTH 32
#define MAX_PLAYERS 32
#define client_disconnected client_disconnect
#endif
#define PLAYER_HUD_OFFSET 86444
/* - CVARS - */
enum _:cvars_num {
CVAR_HUD_UPDATE,
CVAR_HUD_INFO_DEFAULT,
CVAR_HUD_INFO_TYPE,
CVAR_HUD_INFO_COLOR,
CVAR_HUD_INFO_POS,
CVAR_HUD_INFO_TYPE_D,
CVAR_HUD_INFO_COLOR_D,
CVAR_HUD_INFO_POS_D,
CVAR_TPL_MODE,
CVAR_HUD_ANEW_TYPE,
CVAR_HUD_ANEW_POS,
CVAR_HUD_ANEW_COLOR,
CVAR_CHAT_NEW_LEVEL
}
new cvar[cvars_num];
/* - CACHED VALUES - */
// кеш от души
new Float:hudUpdateInterval;
new bool:hudInfoOn, Float:hudInfoxPos,Float:hudInfoyPos,hudInfoColor[3],bool:hudInfoColorRandom;
new bool:hudDeadOn, Float:hudDeadxPos, Float:hudDeadyPos,hudDeadColor[3],bool:hudDeadColorRandom;
new bool:hudaNewOn, Float:hudaNewxPos,Float:hudaNewyPos,hudaNewColor[3];
new chatLvlUpStyle,bonusEnabledPointer,bool:isTplMode,aesMaxLevel,g_trackmode;
new playerLevel[MAX_PLAYERS + 1][AES_MAX_LEVEL_LENGTH],playerWatchLevel[MAX_PLAYERS + 1];
/* - SYNC HUD OBJ - */
new informerSyncObj,aNewSyncObj;
/* - FILE STORAGE - */
new Trie:g_DisabledInformer;
#if AMXX_VERSION_NUM < 183
new Array:g_ADisabledInformer;
#endif
#if defined CSSTATSX_SQL
new const g_skill_letters[][] = {
"L-",
"L",
"L+",
"M-",
"M",
"M+",
"H-",
"H",
"H+",
"P-",
"P",
"P+",
"G"
}
new g_cvar_skill;
new Float:g_skill_opt[sizeof g_skill_letters];
#endif
enum _:tplInfo {
INF_EXP,
INF_LEVELEXP,
INF_NEEDEXP,
INF_LEVEL,
INF_MAXLEVEL,
INF_RANK,
INF_NAME,
INF_STEAMID,
INF_BONUS,
#if defined CSSTATSX_SQL
INF_SKILL,
#endif
INF_EXF,
INF_LXF,
INF_NXF
}
new const tplKeys[tplInfo][] = {
"<exp>",
"<levelexp>",
"<needexp>",
"<level>",
"<maxlevel>",
"<rank>",
"<name>",
"<steamid>",
"<bonus>",
#if defined CSSTATSX_SQL
"<skill>",
#endif
"<exf>",
"<lxf>",
"<nxf>"
}
enum _:tplVario {
TPL_INF,
TPL_INF_D,
TPL_UP,
TPL_UP_ALL
}
new tplBitSum[tplVario]
new const teamColor[] = {
print_team_grey,
print_team_red,
print_team_blue
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
cvar[CVAR_TPL_MODE] = register_cvar("aes_informer_tpl","0");
cvar[CVAR_HUD_UPDATE] = register_cvar("aes_hud_update","1.5");
cvar[CVAR_HUD_INFO_DEFAULT] = register_cvar("aes_hud_info_default","1");
cvar[CVAR_HUD_INFO_TYPE] = register_cvar("aes_hud_info_type","1");
cvar[CVAR_HUD_INFO_COLOR] = register_cvar("aes_hud_info_color","100 100 100");
cvar[CVAR_HUD_INFO_POS] = register_cvar("aes_hud_info_pos","0.01 0.13");
cvar[CVAR_HUD_ANEW_TYPE] = register_cvar("aes_hud_anew_type","0");
cvar[CVAR_HUD_ANEW_COLOR] = register_cvar("aes_hud_anew_color","100 100 100");
cvar[CVAR_HUD_ANEW_POS] = register_cvar("aes_hud_anew_pos","-1.0 0.90");
cvar[CVAR_CHAT_NEW_LEVEL] = register_cvar("aes_newlevel_chat","2");
register_event("HLTV", "round_new", "a", "1=0", "2=0")
cvar[CVAR_HUD_INFO_TYPE_D] = register_cvar("aes_hud_info_default_d","1");
cvar[CVAR_HUD_INFO_COLOR_D] = register_cvar("aes_hud_info_color_d","60 60 60");
cvar[CVAR_HUD_INFO_POS_D] = register_cvar("aes_hud_info_pos_d","0.01 0.15");
#if defined CSSTATSX_SQL
g_cvar_skill = register_cvar("aes_statsx_skill","60.0 75.0 85.0 100.0 115.0 130.0 140.0 150.0 165.0 180.0 195.0 210.0");
#endif
register_clcmd("say /aenable","Informer_Switch",0,"- switch experience informer on/off");
}
public plugin_cfg()
{
#if defined CSSTATSX_SQL
new levelString[512], stPos, ePos, rawPoint[20], cnt;
get_pcvar_string(g_cvar_skill, 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++;
// narkoman wole suka
if(cnt > charsmax(g_skill_letters))
break;
} while (ePos != -1)
#endif
bonusEnabledPointer = get_cvar_pointer("aes_bonus_enable");
hudUpdateInterval = get_pcvar_float(cvar[CVAR_HUD_UPDATE]);
hudInfoOn = get_pcvar_num(cvar[CVAR_HUD_INFO_DEFAULT]) > 0 ? true : false;
hudDeadOn = get_pcvar_num(cvar[CVAR_HUD_INFO_TYPE_D]) > 0 ? true : false;
hudaNewOn = get_pcvar_num(cvar[CVAR_HUD_ANEW_TYPE]) > 0 ? true : false;
chatLvlUpStyle = get_pcvar_num(cvar[CVAR_CHAT_NEW_LEVEL]);
isTplMode = get_pcvar_num(cvar[CVAR_TPL_MODE]) > 0 ? true : false;
if(!bonusEnabledPointer)
hudaNewOn = false;
new temp[15],sColor[3][6];
if(hudInfoOn){
get_pcvar_string(cvar[CVAR_HUD_INFO_COLOR],temp,14);
if(strcmp(temp,"random") != 0)
{
parse(temp,sColor[0],3,sColor[1],3,sColor[2],3);
hudInfoColor[0] = str_to_num(sColor[0]);
hudInfoColor[1] = str_to_num(sColor[1]);
hudInfoColor[2] = str_to_num(sColor[2]);
}
else
hudInfoColorRandom = true;
get_pcvar_string(cvar[CVAR_HUD_INFO_POS],temp,14);
parse(temp,sColor[0],5,sColor[1],5);
hudInfoxPos = str_to_float(sColor[0]);
hudInfoyPos = str_to_float(sColor[1]);
informerSyncObj = CreateHudSyncObj();
if(isTplMode){ // sum
new tplString[256];
formatex(tplString,charsmax(tplString),"%L",LANG_SERVER,"AES_HUD_TPL");
for(new i ; i < tplInfo ; i++)
{
if(contain(tplString,tplKeys[i]) != -1)
tplBitSum[TPL_INF] |= (1<<i);
}
}
}
if(hudDeadOn)
{
get_pcvar_string(cvar[CVAR_HUD_INFO_COLOR_D],temp,14);
if(strcmp(temp,"random") != 0)
{
parse(temp,sColor[0],3,sColor[1],3,sColor[2],3);
hudDeadColor[0] = str_to_num(sColor[0]);
hudDeadColor[1] = str_to_num(sColor[1]);
hudDeadColor[2] = str_to_num(sColor[2]);
}
else
hudDeadColorRandom = true;
get_pcvar_string(cvar[CVAR_HUD_INFO_POS_D],temp,14);
parse(temp,sColor[0],5,sColor[1],5);
hudDeadxPos = str_to_float(sColor[0]);
hudDeadyPos = str_to_float(sColor[1]);
if(!informerSyncObj)
informerSyncObj = CreateHudSyncObj();
if(isTplMode)
{ // sum
new tplString[256];
formatex(tplString,charsmax(tplString),"%L",LANG_SERVER,"AES_HUD_TPL_D");
for(new i ; i < tplInfo ; i++)
{
if(contain(tplString,tplKeys[i]) != -1)
tplBitSum[TPL_INF_D] |= (1<<i);
}
}
}
if(isTplMode)
{ // bit sum for chat notify messages
switch(chatLvlUpStyle )
{
case 1:
{
new tplString[256];
formatex(tplString,charsmax(tplString),"%L",LANG_SERVER,"AES_NEWLEVEL_TPL");
for(new i ; i < tplInfo ; i++)
{
if(contain(tplString,tplKeys[i]) != -1)
tplBitSum[TPL_UP] |= (1<<i);
}
}
case 2:
{
new tplString[256];
formatex(tplString,charsmax(tplString),"%L",LANG_SERVER,"AES_NEWLEVEL_TPL");
for(new i ; i < tplInfo ; i++)
{
if(contain(tplString,tplKeys[i]) != -1)
tplBitSum[TPL_UP] |= (1<<i);
}
formatex(tplString,charsmax(tplString),"%L",LANG_SERVER,"AES_NEWLEVEL_ALL_TPL");
for(new i ; i < tplInfo ; i++)
{
if(contain(tplString,tplKeys[i]) != -1)
tplBitSum[TPL_UP_ALL] |= (1<<i);
}
}
}
}
if(hudaNewOn)
{
get_pcvar_string(cvar[CVAR_HUD_ANEW_COLOR],temp,14);
parse(temp,sColor[0],3,sColor[1],3,sColor[2],3);
hudaNewColor[0] = str_to_num(sColor[0]);
hudaNewColor[1] = str_to_num(sColor[1]);
hudaNewColor[2] = str_to_num(sColor[2]);
get_pcvar_string(cvar[CVAR_HUD_ANEW_POS],temp,14);
parse(temp,sColor[0],5,sColor[1],5);
hudaNewxPos = str_to_float(sColor[0]);
hudaNewyPos = str_to_float(sColor[1]);
aNewSyncObj = CreateHudSyncObj();
}
aesMaxLevel = aes_get_max_level() - 1;
g_trackmode = get_cvar_num("aes_track_mode");
g_DisabledInformer = TrieCreate();
#if AMXX_VERSION_NUM < 183
g_ADisabledInformer = ArrayCreate(36);
#endif
new fPath[256],len;
// TODO: directory autocreate
len += get_datadir(fPath,charsmax(fPath));
len += formatex(fPath[len],charsmax(fPath) - len,"/aes/informer.ini");
new f = fopen(fPath,"r");
if(f)
{
new buffer[512];
while(!feof(f))
{
fgets(f,buffer,511);
trim(buffer);
if(!strlen(buffer) || buffer[0] == ';')
continue;
remove_quotes(buffer);
TrieSetCell(g_DisabledInformer,buffer,true);
#if AMXX_VERSION_NUM < 183
ArrayPushString(g_ADisabledInformer,buffer);
#endif
}
fclose(f);
}
}
public plugin_end()
{
new fPath[256],len;
len += get_datadir(fPath,charsmax(fPath));
len += formatex(fPath[len],charsmax(fPath) - len,"/aes/informer.ini");
#if AMXX_VERSION_NUM < 183
if(ArraySize(g_ADisabledInformer))
{
new f = fopen(fPath,"w+");
fprintf(f,"; %s^n; by %s^n^n; Disable informer for SteamID^n",PLUGIN,AUTHOR);
new trackId[36];
for(new i ; i < ArraySize(g_ADisabledInformer) ; ++i)
{
ArrayGetString(g_ADisabledInformer,i,trackId,35);
if(!TrieKeyExists(g_DisabledInformer,trackId))
continue;
fprintf(f,"^n^"%s^"",trackId);
}
fclose(f);
}
#else
new Snapshot:trieIterator = TrieSnapshotCreate(g_DisabledInformer);
if(TrieSnapshotLength(trieIterator))
{
new f = fopen(fPath,"w+");
fprintf(f,"; %s^n; by %s^n^n; Disable informer for SteamID^n",PLUGIN,AUTHOR);
new trackId[36];
for(new i,trieSize = TrieSnapshotLength(trieIterator) ; i < trieSize ; i++)
{
TrieSnapshotGetKey(trieIterator,i,trackId,charsmax(trackId));
fprintf(f,"^n^"%s^"",trackId);
}
fclose(f);
}
#endif
else
{
if(file_exists(fPath))
delete_file(fPath);
}
#if AMXX_VERSION_NUM >= 183
TrieSnapshotDestroy(trieIterator);
#endif
}
public Informer_Switch(id)
{
if(!hudInfoOn && !hudDeadOn)
return 0;
new trackId[36];
if(!get_player_trackid(id,trackId,charsmax(trackId)))
return 0;
if(!TrieKeyExists(g_DisabledInformer,trackId))
{
TrieSetCell(g_DisabledInformer,trackId,1);
#if AMXX_VERSION_NUM < 183
if(!CheckStringInArray(g_ADisabledInformer,trackId))
ArrayPushArray(g_ADisabledInformer,trackId);
#endif
client_print_color(id,print_team_red,"%L %L",id,"AES_TAG",id,"AES_INFORMER_DISABLED");
remove_task(PLAYER_HUD_OFFSET + id);
}
else
{
TrieDeleteKey(g_DisabledInformer,trackId);
set_task(hudUpdateInterval,"Show_Hud_Informer",PLAYER_HUD_OFFSET + id,.flags="b");
client_print_color(id,print_team_blue,"%L %L",id,"AES_TAG",id,"AES_INFORMER_ENABLED");
}
return 0;
}
#if AMXX_VERSION_NUM < 183
CheckStringInArray(Array:which,string[])
{
new str[64];
for(new i,arrSize = ArraySize(which) ; i < arrSize ; ++i)
{
ArrayGetString(which,i,str,charsmax(str));
if(strcmp(string,str) == 0)
return true;
}
return false;
}
#endif
public client_putinserver(id)
{
if((hudInfoOn || hudaNewOn) && !is_user_bot(id))
{
new trackId[36];
get_player_trackid(id,trackId,charsmax(trackId));
if(!TrieKeyExists(g_DisabledInformer,trackId))
set_task(hudUpdateInterval,"Show_Hud_Informer",PLAYER_HUD_OFFSET + id,.flags="b");
}
}
public client_disconnected(id)
{
if((hudInfoOn || hudaNewOn) &&!is_user_bot(id))
remove_task(PLAYER_HUD_OFFSET + id);
}
public aes_player_levelup(id,newlevel,oldlevel)
{
new levelName[AES_MAX_LEVEL_LENGTH];
switch(chatLvlUpStyle)
{
case 1:
{
aes_get_level_name(newlevel,levelName,charsmax(levelName),id);
if(!isTplMode)
client_print_color(id,print_team_default,"%L %L",id,"AES_TAG",id,"AES_NEWLEVEL_ID",levelName);
else
{
new msg[191],len;
tplFormatNewLevel(id,msg,len,"AES_NEWLEVEL_TPL",id,TPL_UP);
client_print_color(id,print_team_default,msg);
}
}
case 2:
{
new pls[32],pnum,name[32];
get_players(pls,pnum,"c");
get_user_name(id,name,charsmax(name));
new upTeam = get_user_team(id);
if(!(0 <= upTeam < sizeof teamColor))
upTeam = 0;
for(new i,player; i < pnum ; ++i)
{
player = pls[i];
aes_get_level_name(newlevel,levelName,charsmax(levelName),player);
if(player != id)
{
if(!isTplMode)
client_print_color(player,teamColor[upTeam],"%L %L",player,"AES_TAG",player,"AES_NEWLEVEL_ALL",name,levelName);
else
{
new msg[191],len;
tplFormatNewLevel(id,msg,len,"AES_NEWLEVEL_ALL_TPL",player,TPL_UP_ALL);
client_print_color(player,teamColor[upTeam],msg);
}
}
else
{
if(!isTplMode)
client_print_color(id,teamColor[upTeam],"%L %L",id,"AES_TAG",id,"AES_NEWLEVEL_ID",levelName)
else
{
new msg[191],len;
tplFormatNewLevel(id,msg,len,"AES_NEWLEVEL_TPL",id,TPL_UP);
client_print_color(id,teamColor[upTeam],msg);
}
}
}
}
default: return;
}
}
public tplFormatNewLevel(id,msg[],len,tplKey[],idLang,tplType)
{
new Float:player_exp = aes_get_player_exp(id);
new Float:player_reqexp = aes_get_player_reqexp(id);
new player_level = aes_get_player_level(id);
new player_bonus = aes_get_player_bonus(id);
len = formatex(msg[len],190-len,"%L ",idLang,"AES_TAG");
len += parse_informer_tpl(
id,id,msg,len,190,tplKey,tplType,idLang,
player_exp,
player_level,
player_reqexp,
player_bonus
);
return len;
}
public Show_Hud_Informer(taskId)
{
new id = taskId - PLAYER_HUD_OFFSET;
new watchId = id;
new isAlive = is_user_alive(id);
if(informerSyncObj != 0)
ClearSyncHud(id,informerSyncObj);
if(!isAlive){
watchId = get_entvar(id, var_iuser2);
if(!watchId)
return;
}
new hudMessage[256],len;
new Float:player_exp = aes_get_player_exp(watchId);
new Float:player_reqexp = aes_get_player_reqexp(watchId);
new player_level = aes_get_player_level(watchId);
new player_bonus = aes_get_player_bonus(watchId);
new bool:status = true;
if(player_exp == -1.0)
status = false;
if(hudInfoOn){
ClearSyncHud(id,informerSyncObj);
if(status)
{
if(!isTplMode)
{
if(playerWatchLevel[id] != player_level || !playerLevel[id][0])
{
aes_get_level_name(player_level,playerLevel[id],charsmax(playerLevel[]),id);
playerWatchLevel[id] = player_level;
}
if(watchId != id)
{
new watchName[32];
get_user_name(watchId,watchName,charsmax(watchName));
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L^n",id,"AES_INFORMER0",watchName);
}
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L^n",id,"AES_INFORMER1",playerLevel[id]);
if(player_reqexp != -1.0)
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L",id,"AES_INFORMER2",player_exp,player_reqexp);
else
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L",id,"AES_PLAYER_XP_MAX");
}
else
{
if(isAlive)
{
len += parse_informer_tpl(
id,watchId,
hudMessage,len,charsmax(hudMessage),"AES_HUD_TPL",TPL_INF,id,
player_exp,
player_level,
player_reqexp,
player_bonus
);
}
else if(!isAlive && hudDeadOn)
{
len += parse_informer_tpl(
id,watchId,
hudMessage,len,charsmax(hudMessage),"AES_HUD_TPL_D",TPL_INF_D,id,
player_exp,
player_level,
player_reqexp,
player_bonus
);
}
}
}
else
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L",id,"AES_INFORMER_FAIL");
if(isAlive)
{
if(hudInfoColorRandom)
{
hudInfoColor[0] = random(255);
hudInfoColor[1] = random(255);
hudInfoColor[2] = random(255);
}
set_hudmessage(hudInfoColor[0], hudInfoColor[1], hudInfoColor[2], hudInfoxPos , hudInfoyPos,.holdtime = hudUpdateInterval,.channel = 3);
}
else if(!isAlive && hudDeadOn)
{
if(hudDeadColorRandom)
{
hudDeadColor[0] = random(255);
hudDeadColor[1] = random(255);
hudDeadColor[2] = random(255);
}
set_hudmessage(hudDeadColor[0],hudDeadColor[1],hudDeadColor[2],hudDeadxPos,hudDeadyPos,0,.holdtime = hudUpdateInterval,.channel = 3);
}
replace_all(hudMessage,charsmax(hudMessage),"\n","^n");
ShowSyncHudMsg(id,informerSyncObj,hudMessage);
len = 0;
hudMessage[0] = 0;
}
if(hudaNewOn && get_pcvar_num(bonusEnabledPointer) == 1 && player_bonus > 0 && watchId == id)
{
ClearSyncHud(id,aNewSyncObj);
len += formatex(hudMessage[len],charsmax(hudMessage) - len,"%L",id,"AES_ANEW_HUD",player_bonus);
replace_all(hudMessage,charsmax(hudMessage),"\n","^n");
set_hudmessage(hudaNewColor[0],hudaNewColor[1],hudaNewColor[2],hudaNewxPos,hudaNewyPos,0,.holdtime = hudUpdateInterval);
ShowSyncHudMsg(id,aNewSyncObj,hudMessage);
}
}
public round_new(id)
{
if(get_pcvar_num(bonusEnabledPointer) == 1)
{
client_print_color( id, print_team_default, "[^4AES^1] Меню бонусов ^4/anew")
}
}
public parse_informer_tpl(id,watchId,string[],len,maxLen,tplKey[],tplType,idLang,Float:player_exp,player_level,Float:player_reqexp,player_bonus)
{
static tpl[256],tmp[AES_MAX_LEVEL_LENGTH],i;
tpl[0] = 0;
tmp[0] = 0;
formatex(tpl,charsmax(tpl),"%L",idLang,tplKey);
player_exp = _:player_exp >= 0 ? player_exp + 0.005 : player_exp - 0.005;
player_reqexp = _:player_reqexp >= 0 ? player_reqexp + 0.005 : player_reqexp - 0.005;
for(i = 0; i < tplInfo ; i++)
{
if(tplBitSum[tplType] & (1 << i))
{
tmp[0] = 0;
switch(i)
{
case INF_EXP: formatex(tmp,charsmax(tmp),"%.0f",player_exp);
case INF_LEVELEXP:
{
if(player_reqexp >= 0)
formatex(tmp,charsmax(tmp),"%.0f",player_reqexp);
else
formatex(tmp,charsmax(tmp),"MAX");
}
case INF_NEEDEXP:
{
if(player_reqexp >= 0)
formatex(tmp,charsmax(tmp),"%.0f",player_reqexp - player_exp);
else
formatex(tmp,charsmax(tmp),"-");
}
case INF_LEVEL: formatex(tmp,charsmax(tmp),"%d",player_level + 1);
case INF_MAXLEVEL: formatex(tmp,charsmax(tmp),"%d",aesMaxLevel);
case INF_RANK:
{
if(playerWatchLevel[id] != player_level || !playerLevel[id][0])
{
aes_get_level_name(player_level,playerLevel[id],charsmax(playerLevel[]),idLang);
playerWatchLevel[id] = player_level;
}
copy(tmp,charsmax(tmp),playerLevel[id]);
}
case INF_NAME: get_user_name(watchId,tmp,charsmax(tmp));
case INF_STEAMID: get_user_authid(watchId,tmp,charsmax(tmp));
case INF_BONUS: formatex(tmp,charsmax(tmp),"%d",player_bonus);
#if defined CSSTATSX_SQL
case INF_SKILL: statsx_get_user_skill_name(watchId, tmp, charsmax(tmp));
#endif
case INF_EXF: formatex(tmp,charsmax(tmp),"%.2f",player_exp);
case INF_LXF: formatex(tmp,charsmax(tmp),"%.2f",player_reqexp);
case INF_NXF: formatex(tmp,charsmax(tmp),"%.2f",player_reqexp - player_exp);
}
if(tmp[0])
replace(tpl,charsmax(tpl),tplKeys[i],tmp);
}
}
len += formatex(string[len],maxLen-len,tpl);
return len;
}
get_player_trackid(id,trackId[],trackLen)
{
switch(g_trackmode)
{
case 0: get_user_name(id,trackId,trackLen);
case 1:
{
get_user_authid(id,trackId,trackLen);
if(!strcmp(trackId,"STEAM_ID_LAN") || !strcmp(trackId,"VALVE_ID_LAN") || !strcmp(trackId,"BOT") || !strcmp(trackId,"HLTV"))
return 0;
}
case 2: get_user_ip(id,trackId,trackLen,1);
}
return 1;
}
#if defined CSSTATSX_SQL
statsx_get_user_skill_name(id, name[], len)
{
new tmp[10],Float:skill;
get_user_skill(id, skill);
new skill_id = statsx_get_skill_id(skill);
formatex(tmp,charsmax(tmp),"%s %.2f",g_skill_letters[skill_id], skill);
copy(name, len, tmp);
}
statsx_get_skill_id(Float:skill)
{
for(new i = 0; i < sizeof(g_skill_opt); i++)
{
if(skill < g_skill_opt[i])
return i;
}
return charsmax(g_skill_opt);
}
#endif
Возможно после обновления компонентов сервера появилась ошибка. Ранее таковой не было...
Вложения
-
19 KB Просмотры: 126