mam pytanie - co w tym kodzie źle napisałem, że mi wywala error logi?
L 07/19/2013 - 14:22:02: Start of error session.
L 07/19/2013 - 14:22:02: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20130719.log")
L 07/19/2013 - 14:22:02: [amxx] Displaying debug trace (plugin "dead_adv.amxx")
L 07/19/2013 - 14:22:02: [amxx] Run time error 4: index out of bounds
L 07/19/2013 - 14:22:02: [amxx] [0] colorchat.inc::ColorChat (line 74)
L 07/19/2013 - 14:22:02: [amxx] [1] Untitled.sma::info2 (line 43)
#include <amxmodx>
#include <colorchat>
#define PLUGIN "Dead Advertisement"
#define VERSION "1.0"
#define AUTHOR "Filip / `NN"
new syncmsg;
new const prefix[] = "[ bla bla bla ]"
new deadcount[33];
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "DeathMsg", "a")
syncmsg = CreateHudSyncObj();
}
public DeathMsg(){
new zabojca = read_data(1)
new ofiara = read_data(2)
//new hs = read_data(3)
if(ofiara || ofiara == zabojca)
set_task(0.2, "info", ofiara)
}
public info(ofiara){
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.2, 0.35, 0, 1.0, 10.0, 1.0, 1.0, random_num(1,4))
ShowSyncHudMsg(ofiara, syncmsg, "tresc^ntresc2^ntresc3")
set_task(5.0, "info2", ofiara)
}
public info2(ofiara){
if(++deadcount[ofiara] % 3){
ColorChat(ofiara, BLUE, "^x04%s ^x03tresc", prefix)
ColorChat(ofiara, BLUE, "^x04%s ^x01tresc^x03 tresc2", prefix)
}
}


Dodatki SourceMod




Temat jest zamknięty









