[CODE] Name restrictions - help please
#2

Hum.. this code for example, I dont know if it works but test it


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);
}
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
Reply


Messages In This Thread
[CODE] Name restrictions - help please - by squomp - 06.04.2012, 02:03
Re: [CODE] Name restrictions - help please - by DR3AD - 06.04.2012, 02:15
Re: [CODE] Name restrictions - help please - by squomp - 06.04.2012, 02:25
Respuesta: Re: [CODE] Name restrictions - help please - by junkbuster - 06.04.2012, 02:33
Re: [CODE] Name restrictions - help please - by squomp - 06.04.2012, 02:40
Re: Respuesta: Re: [CODE] Name restrictions - help please - by DR3AD - 06.04.2012, 12:47

Forum Jump:


Users browsing this thread: 1 Guest(s)