make a maximum name length...?
#9

Quote:
Originally Posted by Rivera
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(sizeof(name) >= 13) {
        SendClientMessage(playerid, COLOR_YELLOW, "GTFO!");
        Kick(playerid);
    }
    return 1;
}
this should work
It should not, as sizeof is part of the PAWN pre-processor. Use strlen() instead: if(strlen(name) >= 13)
Reply


Messages In This Thread
make a maximum name length...? - by sciman001 - 22.04.2011, 19:14
Re: make a maximum name length...? - by captainjohn - 22.04.2011, 19:17
Re: make a maximum name length...? - by [03]Garsino - 22.04.2011, 19:21
AW: Re: make a maximum name length...? - by Meta - 22.04.2011, 19:22
Re: make a maximum name length...? - by sciman001 - 22.04.2011, 19:22
Re: make a maximum name length...? - by sciman001 - 22.04.2011, 19:33
Re: make a maximum name length...? - by Wanted1900 - 22.04.2011, 19:38
Re: make a maximum name length...? - by Rivera - 22.04.2011, 19:41
Re: make a maximum name length...? - by Hiddos - 22.04.2011, 19:44
Re: AW: Re: make a maximum name length...? - by Anteino - 22.04.2011, 19:50

Forum Jump:


Users browsing this thread: 1 Guest(s)