Banned user message bug
#1

So, I have the following code in onPlayerConnect();

pawn Код:
if(pInfo[playerid][Banned] == 0){
       
    ShowDialog(playerid, DIALOG_EXISTINGPLAYER);
       
} else {
    new banstring[128];
    new allmessage[128];
    format(banstring, sizeof(banstring), "You were banned from this server for: %s", pInfo[playerid][Reason]);
    format(allmessage, sizeof(allmessage), "%s tried to login but is banned!", pInfo[playerid][Name]);
    SendClientMessage(playerid, COLOR_RED, banstring);
    SendClientMessageToAllBut(playerid, COLOR_RED, allmessage);
    Kick(playerid);
}
However, when the banned user logs in, it kicks them before the sending them the message. If I comment out the line "Kick(playerid);", The "banstring" message is displayed to the banned user. I know a timer would probably do the trick, but I don't know how to set one up, have never used one. Any ideas guys?
Reply


Messages In This Thread
Banned user message bug - by Nathan_Taylor - 06.03.2013, 17:17
Re: Banned user message bug - by DaRk_RaiN - 06.03.2013, 17:32
Re: Banned user message bug - by SilverKiller - 06.03.2013, 17:33
Re: Banned user message bug - by Falcon. - 06.03.2013, 17:34
Re: Banned user message bug - by Nathan_Taylor - 06.03.2013, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)