Quote:
Originally Posted by G4M3Ov3r
PHP код:
stock IsValidName(playerid)
{
if (IsPlayerConnected(playerid))
{
new player[24];
GetPlayerName(playerid,player,24);
for(new n = 0; n < strlen(player); n++)
{
if (player[n] == '_') return 1;
if (player[n] == ']' || player[n] == '[') return 0;
}
}
return 0;
}
There you go
|
You got to be kidding me.....
There are much better exmples else where on the forum. Your function considers anything with a _ as a vailid name, everything thing else fails, as your script does.