SA-MP Forums Archive
message didn't show - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: message didn't show (/showthread.php?tid=554415)



message didn't show - AgusZ - 03.01.2015

Код:
public OnPlayerConnect(playerid)
{
    new
        name[24],
        string[2];

    GetPlayerName(playerid, name, sizeof(name)); 
    if(sscanf(name, "{p<_>s[12]s[12]}") != 0) 
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "* You have been kicked because your nickname is invalid");
        Kick(playerid);
    }
    for(new i = 0; i < 10; i ++) // we make a loop from 0 to 9
    {
        format(string, sizeof(string), "%d", i); 
        if(strfind(name, string, true) != -1) 
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "* You have been kicked because your nickname had a number!");
            Kick(playerid); 
        }
    }
    return 1;
}



AW: message didn't show - Flori - 03.01.2015

You need to kick the player with a delay.

Use settimerex to call a function which kicks the player after a short period.


Re: AW: message didn't show - AgusZ - 03.01.2015

Quote:
Originally Posted by Flori
Посмотреть сообщение
You need to kick the player with a delay.

Use settimerex to call a function which kicks the player after a short period.

solved, thank you