Quote:
Originally Posted by Abagail
First of all, using his example people can scam the system by just putting "name_". A better example would be checking if the surname has a greater length than 1 assuming they have an _.
pawn Код:
if(strfind(pName, "_", true) == -1) { // code }
else { if(strlen(GetPlayerSurname(playerid) == 0) { SendClientMessage(playerid, -1, "Invalid last name."); Kick(playerid); return 0; } }
Using a stock such as:
pawn Код:
stock GetPlayerSurname(playerid) { new pName[24]; GetPlayerName(playerid, pName, sizeof(pName)); for(new i = 0; i < 24; i++) { if(pName[i] == '_') { strdel(pName, 0, i); } } return pName; }
|
Then give me a line to add to the script please that will kick them if it isn't like that.