When I execute noz_warmup on server it crashes!
Any help would be appreciated!
PHP Code:
#include <amxmodx>
#include <amxmisc>
new iCount = 0
public plugin_init()
{
register_plugin("Knifes Warmup","1.0","Lawnmoverman")
register_concmd("noz_warmup","noz_warmup",ADMIN_IMMUNITY,"noz_warmup - starts knifes only warmup")
}
// Colour Chat
client_printc(index, const text[], any:...)
{
new szMsg[128];
vformat(szMsg, sizeof(szMsg) - 1, text, 3);
replace_all(szMsg, sizeof(szMsg) - 1, "!g", "^x04");
replace_all(szMsg, sizeof(szMsg) - 1, "!n", "^x01");
replace_all(szMsg, sizeof(szMsg) - 1, "!t", "^x03");
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, index);
write_byte(index);
write_string(szMsg);
message_end();
}
public noz_warmup(id)
{
new const Float:fTime[] = { 1.0, 15.0, 45.0, 60.0, 71.0, 75.0, 78.0, 84.0 }
for ( new i ; i < 8 ; i++ )
set_task(fTime[i], "WarmUP", id)
return PLUGIN_HANDLED
}
public WarmUP(id)
{
switch(iCount)
{
case 0:
{
client_printc(0, "!t[Warmup] !gKnifes only!")
server_cmd("amx_csay yellow ^"[Warmup] Knifes only!^"")
server_cmd("amx_knifesonly 1")
client_cmd(0, "spk ^"Hello, and have the nice day^"")
}
case 1:
{
client_printc(0, "!t[Warmup] !g60 seconds remaining!")
}
case 2:
{
client_printc(0, "!t[Warmup] !g30 seconds remaining!")
}
case 3:
{
client_printc(0, "!t[Warmup] !g15 seconds remaining!")
}
case 4:
{
client_printc(0, "!t[Warmup] !gLive after 3 restarts!")
}
case 5:
{
server_cmd("amx_rr ^"3^" ^"1^"")
}
case 6:
{
server_cmd("amx_knifesonly 0")
}
case 7:
{
client_printc(0, "!t[Warmup] !gLive! GL & HF!")
server_cmd("amx_csay yellow ^"[Warmup] Live! GL & HF!^"")
client_cmd(0, "spk ^"Going life, kill and eliminate all ass^"")
}
}
iCount++
}