06.03.2013, 17:17
So, I have the following code in onPlayerConnect();
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?
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);
}

