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 ![Cheesy](images/smilies/biggrin.png)
|
It should not, as sizeof is part of the PAWN pre-processor. Use strlen() instead: if(strlen(name) >= 13)