06.04.2012, 02:15
Hum.. this code for example, I dont know if it works but test it
put it under OnPlayerConnect(playerid)
strfind is a function that will search in a string for a specific character or a word that you want
In this case, it will search for the "_" character in the name.. the "-1" its when he doesnt find the character
put it under OnPlayerConnect(playerid)
Код:
new name[32]; GetPlayerName(playerid, name, sizeof(name)); if(strfind(name, "_", true) == -1) { SendClientMessage(playerid, -1, "Introduce a valid name in the format <FirstName_LastName>"); Kick(playerid); }
In this case, it will search for the "_" character in the name.. the "-1" its when he doesnt find the character