- Ошибка
-
L 09/01/2019 - 11:23:12: player out of range (0)
L 09/01/2019 - 11:23:12: [AMXX] Displaying debug trace (plugin "aes_exp_cstrike.amxx", version "0.3")
L 09/01/2019 - 11:23:12: [AMXX] Run time error 10: native error (native "aes_add_player_exp")
L 09/01/2019 - 11:23:12: [AMXX] [0] aes_exp_cstrike.sma::client_death (line 187)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.8.3-Re
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.633-dev
Build date: 10:34:06 Jan 24 2018 (1383)
- ReGamedll
-
ReGameDLL version: 5.3.0.218-dev
- Версия Metamod
-
Metamod v1.21p37
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 2] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 3] Reunion RUN - reunion_mm_i386. v0.1.0.9 ini Start Never
[ 4] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 5] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 6] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 9] MySQL RUN - mysql_amxx_i386. v1.8.3-R pl2 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl2 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R pl2 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl2 ANY Never
[13] Engine RUN - engine_amxx_i386 v1.8.3-R pl2 ANY ANY
[14] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl2 ANY ANY
[15] Fun RUN - fun_amxx_i386.so v1.8.3-R pl2 ANY ANY
15 плагинов, 15 работают
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 2] Admin Loader 3.3 neygomon admin_loader.am running
[ 3] WebHS 0.1 kanagava fb_web_online.a running
[ 4] FreshBans 1.3.8b kanagava fresh_bans_138_ running
[ 5] Plugin Menu 1.8.3-Re AMXX Dev Team pluginmenu.amxx running
[ 6] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 7] Slots Reservation 1.8.3-Re AMXX Dev Team adminslots.amxx running
[ 8] Multi-Lingual System 1.8.3-Re AMXX Dev Team multilingual.am running
[ 9] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 10] Players Menu 1.8.3-Re AMXX Dev Team plmenu.amxx running
[ 11] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 12] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx running
[ 13] Anti Flood 1.8.3-Re AMXX Dev Team antiflood.amxx running
[ 14] Scrolling Message 1.8.3-Re AMXX Dev Team scrollmsg.amxx running
[ 15] Info. Messages 1.8.3-Re AMXX Dev Team imessage.amxx running
[ 16] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 17] AMXX Gag 1.5.0 xPaw & Exolent ( amx_gag.amxx running
[ 18] Pause Plugins 1.8.3-Re AMXX Dev Team pausecfg.amxx running
[ 19] Stats Configuration 1.8.3-Re AMXX Dev Team statscfg.amxx running
[ 20] AES: StatsX 0.3 Beta serfreeman1337 aes_statsx_cstr running
[ 21] AES: Exp CSTRIKE 0.3 serfreeman1337 aes_exp_cstrike debug
[ 22] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 23] StatsX 1.8.3-Re AMXX Dev Team statsx.amxx running
[ 24] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 25] [reAPI] Flash Control 1.1 neugomon flash_control.a running
[ 26] [ReAPI] Best player of 0.6 F@nt0M best_player_of_ running
[ 27] Block TextMsg 1.0 AcE block_textmsg.a running
[ 28] [182] Demo Recorder RB 18.02.08 SKAJIbnEJIb demorecorder_rb running
[ 29] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 30] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 31] AES: CSTRIKE Say Tag 0.1.1 serfreeman1337 aes_say_tag.amx running
[ 32] Advert Messages 1.22 neygomon adverts.amxx running
[ 33] Server AMXMODMENU [INI 1.0 Leo_[BH] amxmodmenu.amxx running
[ 34] New Kick Menu 1.4.2 Radius newkickmenu.amx running
[ 35] [182] High Ping Kicker 17.08.11 SKAJIbnEJIb hpk_rbs.amxx running
[ 36] [182] Map Spawns Edito 17.08.27 iG_os & SKAJIbnE MapSpawnsEditor running
[ 37] Admin_Check 0.1 CepeH9 adminChek.amxx running
[ 38] Reset_Score 1.0 Silenttt Fixed b Resetscore.amxx running
[ 39] Lite Translit 2.8 neygomon lite_translit.a running
[ 40] mute menu 1.0 cheap_suit mutemenu.amxx running
[ 41] Auto-Give Privileges 1.0 SerGrib night_vips.amxx stopped
[ 42] COLORS MENU 1.2 DUKKHAZ0R color.amxx running
[ 43] Kills Counter 1.0 Safety1st killscounter.am running
[ 44] Real Nade Drops 0.4 VEN realnadedrops.a running
[ 45] C4 Timer on roundtime 0.3.3a neygomon c4timer.amxx running
[ 46] Mode 2x2 2.5re s1lent mode.amxx running
[ 47] [ReAPI] AWPoff 1.3 PAffAEJIkA :3 awp_off.amxx running
[ 48] Bullet Damage 1.2 f117bomb|Er0p4uk bullet_damage.a running
[ 49] Weapon Menu 1.0 Mattcook & xerob weaponmenu_ru.a running
[ 50] Admin Spectator ESP 1.3 KoST admin_spec_esp. running
[ 51] Automatic knife duel 0.3 JGHG automatic_knife running
[ 52] No AWP 0.1 ill no_awp.amxx running
[ 53] Lite TeamBalancer 1.20 neygomon lite_balancer.a running
[ 54] Reklama Hud 1.0 Freeman4iK hud_reklama.amx running
[ 55] Afk Control 0.5.1 neygomon afk_control.amx running
[ 56] Silly C4 1.1 Cheap_Suit sillyc4.amxx running
[ 57] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx debug
[ 58] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a debug
[ 59] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx debug
[ 60] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx debug
[ 61] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx debug
[ 62] V.I.P Custom FAMAS 1.0.0 foxstyle custom_famas.am debug
[ 63] V.I.P Custom SCOUT 1.0.0 Vaqtincha custom_scout.am debug
[ 64] V.I.P Custom M3 1.0.0 Vaqtincha custom_m3.amxx debug
[ 65] Advanced Experience Sy 0.4.1 serfreeman1337 aes_main.amxx running
[ 66] AES: Informer 0.2 serfreeman1337 aes_informer.am running
[ 67] AES: Experience Editor 0.1 serfreeman1337 aes_exp_editor. running
[ 68] AES: Bonus System 0.2 serfreeman1337 aes_bonus_syste running
[ 69] AES: Bonus CSTRIKE 0.4 serfreeman1337 aes_bonus_cstri running
69 плагинов, 68 работают
- Автор плагина
- serfreeman1337
- Версия плагина
- 0.3
- Исходный код
-
/*
Advanced Experience System
by serfreeman1337 http://gf.hldm.org/
*/
/*
Experience Collector (CSTRIKE)
*/
#include <amxmodx>
#include <cstrike>
#include <csstats>
#include <csx>
#include <colorchat>
#include <aes_main>
#define PLUGIN "AES: Exp CSTRIKE"
#define VERSION "0.3"
#define AUTHOR "serfreeman1337"
/* - CVARS - */
enum _:cvars_num {
CVAR_XP_KILL,
CVAR_XP_HS,
CVAR_XP_C4_PLANT,
CVAR_XP_C4_EXPLODE,
CVAR_XP_C4_DEFUSED,
CVAR_XP_FFA,
CVAR_XP_HOST_GOT,
CVAR_XP_HOST_RESCUE,
CVAR_XP_VIP_ESCAPED,
CVAR_XP_VIP_KILLED,
CVAR_XP_GOAL_MIN_PLAYERS,
CVAR_XP_DEATH,
CVAR_ANEW_FRAGS,
CVAR_ANEW_HS,
CVAR_ANEW_KNIFE,
CVAR_ANEW_HE,
CVAR_ANEW_REST,
CVAR_LEVEL_BONUS
}
new cvar[cvars_num],bool:isFFA
/* - ADD BONUS - */
enum _:Arrays{
Array:FRAG_ARRAY,
Array:HS_ARRAY,
Array:KNIFE_ARRAY,
Array:HE_ARRAY
}
new Array: g_BonusCvars[Arrays]
new frArrSize,hsArrSize,kfArrSize,heArrSize
new iResetOn,g_maxplayers,g_Players[33][4],bool:isAsMap
new iDbType,iBonusPointer
new map[32]
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR)
register_dictionary_colored("aes.txt")
cvar[CVAR_XP_KILL] = register_cvar("aes_xp_frag","1")
cvar[CVAR_XP_HS] = register_cvar("aes_xp_hs","2")
cvar[CVAR_XP_C4_PLANT] = register_cvar("aes_xp_c4_plant","1")
cvar[CVAR_XP_C4_EXPLODE] = register_cvar("aes_xp_c4_explode","3")
cvar[CVAR_XP_C4_DEFUSED] = register_cvar("aes_xp_c4_defused","4")
cvar[CVAR_XP_HOST_GOT] = register_cvar("aes_xp_hostage_got","1")
cvar[CVAR_XP_HOST_RESCUE] = register_cvar("aes_xp_hostage_rescue","1")
cvar[CVAR_XP_VIP_ESCAPED] = register_cvar("aes_xp_vip_escaped","4")
cvar[CVAR_XP_VIP_KILLED] = register_cvar("aes_xp_vip_killed","4")
cvar[CVAR_XP_GOAL_MIN_PLAYERS] = register_cvar("aes_xp_goal_min_players","4")
cvar[CVAR_XP_FFA] = register_cvar("aes_xp_ffa","0")
cvar[CVAR_ANEW_FRAGS] = register_cvar("aes_anew_frags","10 1 20 2 30 3 40 5")
cvar[CVAR_ANEW_HS] = register_cvar("aes_anew_hs","7 1 14 2 20 3 30 4")
cvar[CVAR_ANEW_KNIFE] = register_cvar("aes_anew_knife","1 1 2 1 3 1 4 1")
cvar[CVAR_ANEW_HE] = register_cvar("aes_anew_he","4 1 5 1 6 1 7 2")
cvar[CVAR_ANEW_REST] = register_cvar("aes_anew_reset","1")
cvar[CVAR_LEVEL_BONUS] = register_cvar("aes_bonus_levelup","3")
cvar[CVAR_XP_DEATH] = register_cvar("aes_xp_death","0")
g_maxplayers = get_maxplayers()
}
public plugin_cfg(){
iDbType = get_cvar_num("aes_db_type")
get_mapname(map,31)
if(iDbType > 0){
if(containi(map,"cs_") == 0){
register_logevent("client_touched_a_hostage",3,"1=triggered","2=Touched_A_Hostage")
register_logevent("client_rescued_a_hostage",3,"1=triggered","2=Rescued_A_Hostage")
}else if(containi(map,"as_") == 0){
isAsMap = true
register_logevent("client_escaped_as_vip",3,"1=triggered","2=Escaped_As_VIP")
}
}
isFFA = get_pcvar_num(cvar[CVAR_XP_FFA]) == 1 ? true : false
iBonusPointer = get_cvar_pointer("aes_bonus_enable")
if(!iBonusPointer)
return
g_BonusCvars[FRAG_ARRAY] = ArrayCreate(2)
g_BonusCvars[HS_ARRAY] = ArrayCreate(2)
g_BonusCvars[KNIFE_ARRAY] = ArrayCreate(2)
g_BonusCvars[HE_ARRAY] = ArrayCreate(2)
new levelString[512]
get_pcvar_string(cvar[CVAR_ANEW_FRAGS],levelString,511)
frArrSize = parse_aes_bonus_values(g_BonusCvars[FRAG_ARRAY],levelString)
get_pcvar_string(cvar[CVAR_ANEW_HS],levelString,511)
hsArrSize = parse_aes_bonus_values(g_BonusCvars[HS_ARRAY],levelString)
get_pcvar_string(cvar[CVAR_ANEW_KNIFE],levelString,511)
kfArrSize = parse_aes_bonus_values(g_BonusCvars[KNIFE_ARRAY],levelString)
get_pcvar_string(cvar[CVAR_ANEW_HE],levelString,511)
heArrSize = parse_aes_bonus_values(g_BonusCvars[HE_ARRAY],levelString)
iResetOn = get_pcvar_num(cvar[CVAR_ANEW_REST])
}
public client_putinserver(id)
if(!iDbType)
set_task(0.1,"loadUserStats",id) // статистика не сразу инициализируется
public loadUserStats(id){
if(!is_user_connected(id))
return
new stats[8],bprelated[4],bh[8]
get_user_stats(id,stats,bh)
get_user_stats2(id,bprelated)
new exp = get_exp_for_stats(stats,bprelated)
new st[3]
st[0] = exp
st[1] = aes_get_level_for_exp(exp)
st[2] = 0
aes_set_player_stats(id,st)
}
get_exp_for_stats(stats[8],bprelated[4]){
stats[0] = stats[0] - stats[2]
new exp = (stats[0] * get_pcvar_num(cvar[CVAR_XP_KILL])) + (stats[2] * get_pcvar_num(cvar[CVAR_XP_HS]))
exp += (bprelated[2] * get_pcvar_num(cvar[CVAR_XP_C4_PLANT])) + (bprelated[3] * get_pcvar_num(cvar[CVAR_XP_C4_EXPLODE]))
exp += bprelated[1] * get_pcvar_num(cvar[CVAR_XP_C4_DEFUSED])
return exp
}
public client_disconnect(id)
if(iBonusPointer)
arrayset(g_Players[id],0,4)
public client_death(killer,victim,wpn,hit,TK){
if(!killer && killer > g_maxplayers || killer == victim)
return
if(TK && !isFFA)
return
aes_add_player_exp(killer,hit != HIT_HEAD ? get_pcvar_num(cvar[CVAR_XP_KILL]) : get_pcvar_num(cvar[CVAR_XP_HS]))
aes_add_player_exp(victim,get_pcvar_num(cvar[CVAR_XP_DEATH]))
// игрок убил VIP
if(isAsMap && cs_get_user_vip(victim)){
if(get_playersnum() >= get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
aes_add_player_exp(killer,get_pcvar_num(cvar[CVAR_XP_VIP_KILLED]))
}
// бонусы не включены или временно не работают
if(!iBonusPointer || !get_pcvar_num(iBonusPointer))
return
g_Players[killer][0] ++
new bonusPoints = 0
bonusPoints += get_current_player_bonuses(killer,frArrSize,0,g_BonusCvars[FRAG_ARRAY])
if(hit == HIT_HEAD){
g_Players[killer][1] ++
bonusPoints += get_current_player_bonuses(killer,hsArrSize,1,g_BonusCvars[HS_ARRAY])
}
if(wpn == CSW_KNIFE){
g_Players[killer][2] ++
bonusPoints += get_current_player_bonuses(killer,kfArrSize,2,g_BonusCvars[KNIFE_ARRAY])
}
if(wpn == CSW_HEGRENADE){
g_Players[killer][3] ++
bonusPoints += get_current_player_bonuses(killer,heArrSize,3,g_BonusCvars[HE_ARRAY])
}
if(iResetOn == 1)
arrayset(g_Players[victim],0,4)
if(bonusPoints){
client_print_color(killer,0,"%L %L",killer,"AES_TAG",killer,"AES_ANEW_GAIN",bonusPoints)
aes_add_player_bonus(killer,bonusPoints)
}
}
// бонусы при получении нового звания
public aes_player_levelup(id){
if(!iBonusPointer || !get_pcvar_num(cvar[CVAR_LEVEL_BONUS]))
return
aes_add_player_bonus(id,get_pcvar_num(cvar[CVAR_LEVEL_BONUS]))
}
public bomb_planted(id){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
aes_add_player_exp(id,get_pcvar_num(cvar[CVAR_XP_C4_PLANT]))
}
public bomb_explode(id){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
aes_add_player_exp(id,get_pcvar_num(cvar[CVAR_XP_C4_EXPLODE]))
}
public bomb_defused(id){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
aes_add_player_exp(id,get_pcvar_num(cvar[CVAR_XP_C4_DEFUSED]))
}
public client_escaped_as_vip(){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
new arg[64],nn[2],userid
read_logargv(0,arg,64)
parse_loguser(arg,nn,1,userid)
userid = find_player("k",userid)
if(userid == 0)
return
aes_add_player_exp(userid,get_pcvar_num(cvar[CVAR_XP_VIP_ESCAPED]))
}
public client_touched_a_hostage(){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
new arg[64],nn[2],userid
read_logargv(0,arg,64)
parse_loguser(arg,nn,1,userid)
userid = find_player("k",userid)
if(userid == 0)
return
aes_add_player_exp(userid,get_pcvar_num(cvar[CVAR_XP_HOST_GOT]))
}
public client_rescued_a_hostage(){
if(get_playersnum() < get_pcvar_num(cvar[CVAR_XP_GOAL_MIN_PLAYERS]))
return
new arg[64],nn[2],userid
read_logargv(0,arg,64)
parse_loguser(arg,nn,1,userid)
userid = find_player("k",userid)
if(userid == 0)
return
aes_add_player_exp(userid,get_pcvar_num(cvar[CVAR_XP_HOST_RESCUE]))
}
// проверка на кол-во бонусных очков игрока
// cmpr - какой параметр проверяем
// Array:which - по какому массиву
public get_current_player_bonuses(id,size,cmpr,Array:which){
new bonusPoints,rt[2],i
for(i = 0 ; i < size ; ++i){
ArrayGetArray(which,i,rt)
if(g_Players[id][cmpr] == rt[0])
bonusPoints += rt[1]
}
return bonusPoints
}
// парсер значений бонусов в массив
public parse_aes_bonus_values(Array:which,levelString[]){
new stPos,ePos,rawPoint[20],rawVals[2],stState
// значение не задано
if(!strlen(levelString))
return 0
do {
// ищем пробел
ePos = strfind(levelString[stPos]," ")
// узнаем значение с позиции stPos и длинной ePos
formatex(rawPoint,ePos,levelString[stPos])
rawVals[stState] = str_to_num(rawPoint)
stPos += ePos + 1
// указатель 2ой пары
stState ++
// два значения были найдены
// записываем их в массив и сбрасываем указатель
if(stState == 2){
ArrayPushArray(which,rawVals)
stState = 0
}
} while(ePos != -1)
// возвращает кол-во 2ых пар
return ArraySize(which)
}
public plugin_natives()
register_native("aes_get_exp_for_stats","_aes_get_exp_for_stats")
/*
Returns exp value for given stats.
stats[8] = get_user_stats
bprelated[4] = get_user_stats2
@return - exp for given stats
native aes_get_exp_for_stats(stats[8],stats2[4])
*/
public _aes_get_exp_for_stats(plugin,params){
if(params < 2){
log_error(AMX_ERR_NATIVE,"bad arguments num, expected 2, passed %d", params)
return 0
}
new stats[8],bprelated[4]
get_array(1,stats,8)
get_array(2,bprelated,4)
return get_exp_for_stats(stats,bprelated)
}
Помогите пожалуйста решить ошибку. Заранее спасибо )