Maxim Size Name
#1

how i can do a limit for the name at OnPlayerConnect ?

between 4 characters and 20 characters
Reply
#2

pawn Код:
public OnPlayerConnect(playerid) {
    new n[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, n);
    if(!(4 <= strlen(n) <= 20)) {
        SendClientMessage(playerid, -1, "NOPE");
        return Kick(playerid);
    }
    return 1;
}
Reply
#3

... why would you want to limit that? SA:MP natively limits player names to 25 characters anyways.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)