26.06.2009, 14:03
Try something like this under OnPlayerConnect
pawn Код:
new name[MAX_PLAYER_NAME],count[MAX_PLAYERS];
GetPlayerName(playerid, name, sizeof(name));
count[playerid]=0;
for(new a=0;a<MAX_PLAYER_NAME;a++)
{
if (!('A' <= name[a] <= 'Z')) //checks if the name has capital letters
{
count[playerid]++;
if (count[playerid]==3) //if 3, then kick
{
SendClientMessage(playerid,0xAA3333AA,"Your name can have only 2 capital letters");
Kick(playerid);
}
}
}