Easy Kick if name is question.
#1

How can I make it in my GM where it kicks a player if the name "officer" is in their nickname?

My server is from a very Law Enforcment centred forum... So lots of people join with the name like Officer_James. Which is un-RP (especially when they aren't even a cop).

Thanks,
jakejohnsonusa
Reply
#2

Use strfind under OnPlayerRequestClass.

Ex:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    if(strfind(name, "officer", true) != -1)
    {
        SendClientMessage(playerid, -1, "Officer found!");
                 Kick(playerid);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)