30.05.2013, 20:13
pawn Код:
{
SendClientMessage(playerid, RED, "You have been kicked as you are using an incorrect name format. Use Firstname_Lastname.");
Kick(playerid);
}
{
SendClientMessage(playerid, RED, "You have been kicked as you are using an incorrect name format. Use Firstname_Lastname.");
Kick(playerid);
}
SetTimerEx("KickPlayer", 100, false, "i", playerid);
and in function KickPlayer you put your Kick(playerid);
/* This is the timer that kicks the player if needed put it in your function so replace with Kick();*/
SetTimerEx("KickPlayer", 100, false, "i", playerid);
forward KickPlayer(playerid);
public KickPlayer(playerid) {
Kick(playerid);
return 1;
}
forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }
stock KickWithMessage(playerid, color, message[])
{
SendClientMessage(playerid, color, message);
SetTimerEx("KickPublic", 1000, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kickme", true) == 0)
{
//Kicks the player who the executed this command
KickWithMessage(playerid, 0xFF0000FF, "You have been kicked.");
return 1;
}
return 0;
}
//by Kye