Enter with a single name. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Enter with a single name. (
/showthread.php?tid=660563)
Enter with a single name. -
PaulCrouseVS - 06.11.2018
Good morning/afternoon/evening ... I have a problem and I want to enter my server with a single name, my server is Roleplay, and clearly the name format is Firstname_Name but I do not roleplay, I will simply administer the server, therefore I want to use only one Name: Horizon. I want to know how I can do it, since I have a System that prevents people from entering without the format:
Code:
if(strfind(Nombre(playerid), "_", true) == -1 || EncontroNumeroCaracter(playerid))
{
Mensaje(playerid, COLOR_AMARILLO3, "| -=== Horizon RolePlay ===- |");
Mensaje(playerid, COLOR_AMARILLO3, "Your name must be in the FirstName_Name format. Example: Juan_Perez");
Kick(playerid);
return 1;
}
So, basically I want to enter only with the name "Horizon"
Re: Enter with a single name. -
cSharp - 06.11.2018
if(strfind(Nombre(playerid), "_", true) == -1 || EncontroNumeroCaracter(playerid))
>>
if(strcmp(Nombre(playerid), "Horizon") && (strfind(Nombre(playerid), "_", true) == -1 || EncontroNumeroCaracter(playerid)))