Help kick player
#1

hello
i want kick every player that use . in his name

i put it under onplayerconnect
Код:
	
new playername[32];	
GetPlayerName(playerid, playername, sizeof(playername));
if(strfind( playername, ".", true) == -1)
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You Cant Use . in your name");
Kick(playerid);
}
it doesnt work Plz Help
Reply
#2

pawn Код:
forward kick(playerid);

public OnPlayerConnect(playerid)
{
    new playername[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
    if(strfind(playername,".")!=-1)
    {
        SendClientMessage(playerid,-1,"You Cannot Use A Name That Contains A . (Period) On This Server");
        SetTimerEx("kick",500,false,"i",playerid);
    }
    return 1;
}

public kick(playerid)
{
    Kick(playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)