Plugins.ini -
surf_ski_2_rules.amxx debug
Errory:
L 08/03/2012 - 00:38:50: [FUN] Invalid player 1 L 08/03/2012 - 00:38:50: [AMXX] Displaying debug trace (plugin "surf_ski_2_rules.amxx") L 08/03/2012 - 00:38:50: [AMXX] Run time error 10: native error (native "set_user_godmode") L 08/03/2012 - 00:38:50: [AMXX] [0] surf_ski_2_rules_703653.sma::check (line 76)
PLUGIN:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #include <fun> new t[32] new jail[32] new mario[32] new gun[32] new amx_gunroom=1 new amx_marioroom=1 new amx_jailtime=2 new shoot=1 new counter=100 public plugin_init() { register_plugin("surf_ski_2_rules", "1.0 beta", "Nikarus") new map[32] get_mapname(map, 32) if (equali(map, "surf_ski_2")) { register_forward(FM_CmdStart,"fwd_CmdStart") amx_gunroom = register_cvar("amx_gunroom","1") amx_marioroom = register_cvar("amx_marioroom","1") amx_jailtime = register_cvar("amx_jailtime","2") set_task(0.1, "check", 0, "", 0, "b") } } public check() { if (counter>0) { counter--; if (counter==0) { set_hudmessage(255, 0, 0, -1.0, 0.35, 1) show_hudmessage(0, "Zapraszamy do Rejstracji na Center-Skill.pl") } } for (new index=1; index<=get_playersnum(); index++) { new origin[3] get_user_origin(index, origin) new x=origin[0] new y=origin[1] new z=origin[2] //if player in JAIL if (x >=-625 && x<=-280 && y>=2955 && y<=3330 && z>=585 && z<=855 && get_pcvar_num(amx_jailtime)!=0) { if (jail[index]!=1) t[index]=get_systime() jail[index]=1 if ((get_systime()-t[index])>=get_pcvar_num(amx_jailtime)) { punish_jailcamper(index) } } else jail[index]=0 //////////////////// //if player in MARIOROOM if (x >=2250 && x<=3655 && y>=230 && y<=1111 && z>=-2330 && z<=-2077 && get_pcvar_num(amx_marioroom)!=0) { if (mario[index]!=1) set_user_godmode(index, 1) mario[index]=1 } else { mario[index]=0 set_user_godmode(index, 0) } //if player in GUNROOM if (x >=-720 && x<=-290 && y>=-1000 && y<=-650 && z>=-156 && z<=-30 && get_pcvar_num(amx_gunroom)!=0) { if (gun[index]!=1) shoot=1 gun[index]=1 } else { gun[index]=0 shoot=0 } } } public punish_jailcamper(index) { new origin[3] get_user_origin(index, origin) origin[0]=-405 origin[1]=2900 origin[2]=720 set_user_origin(index, origin) } public fwd_CmdStart(id, uc_handle, seed) { if ( ! shoot || ! is_user_alive(id) ) return FMRES_IGNORED new weapon, buttons = get_uc(uc_handle, UC_Buttons) if ( buttons & IN_ATTACK ) buttons &= ~IN_ATTACK else if ( buttons & IN_ATTACK2 && get_user_weapon(id, weapon, weapon) == CSW_KNIFE ) buttons &= ~IN_ATTACK2 else return FMRES_IGNORED set_uc(uc_handle,UC_Buttons,buttons) return FMRES_HANDLED }