So I'm having this problem, the problem I think is caused by something from this code, but I can't find where exactly it is.
PHP Code:
public Show_Banned_Menu(id)
{
if(cs_get_user_team(id) != CS_TEAM_SPECTATOR)
cs_set_user_team(id, CS_TEAM_SPECTATOR)
new title[192];
formatex(title, 191, "\r*** YOU ARE BANNED ! ! ! ***^n\wTime until kick: \r%d", BannedTimeLeft[id])
new gmenu = menu_create(title , "Handler_Banned_Menu");
new m1[192], m2[192], m3[192];
static szDate[32]
format_time(szDate, charsmax(szDate), "%a, %b %d at %H:%M:%S", iBan[id])
formatex(m1, 191, "\y***\w by: %s", iBanAdmin[id])
formatex(m2, 191, "\y***\w for: %s", iBanReason[id])
formatex(m3, 191, "\y***\w expires: %s", szDate)
menu_additem(gmenu, m1, "1" , 0);
menu_additem(gmenu, m2, "2" , 0);
menu_additem(gmenu, m3, "3" , 0);
menu_addtext(gmenu, "\dVisit \whttp://cs.xxx.com/bans/ \dto see all bans^nContact skype: xxx.porn.xxx for more information", 1)
menu_setprop(gmenu , MPROP_PERPAGE, 0);
menu_display(id , gmenu , 0);
if(!TimeIsUp[id])
{
if(BannedTimeLeft[id] > 0)
{
set_task(1.0, "MinusTime", id)
TimeIsUp[id] = true;
}
else if(BannedTimeLeft[id] <= 0)
{
client_print(id, print_console, "*------* *------------* *------*^n*------* You are banned *------*^n*** by: %s^n*** for: %s^n*** expires: %s^n*------* You are banned *------*^n*------* *------------* *------*", iBanAdmin[id], iBanReason[id], szDate)
client_cmd(id, "disconnect")
}
}
return PLUGIN_CONTINUE;
}
public MinusTime(id)
{
BannedTimeLeft[id]--;
TimeIsUp[id] = false;
Show_Banned_Menu(id);
}
public Handler_Banned_Menu(id, gmenu, item)
{
switch(item)
{
default: Show_Banned_Menu(id);
}
return PLUGIN_HANDLED;
}
I get this message, when BannedTimeLeft[] = 0, and server should send "disconnect" message to my console.