How to change that you not must log in with a firstname_lastname - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to change that you not must log in with a firstname_lastname (
/showthread.php?tid=89650)
How to change that you not must log in with a firstname_lastname -
Seva - 03.08.2009
I using the Pronton script, but if you wanna enter the server, you must using a firstname_lastname, but i wanna change it. But how you must do this ?
Re: How to change that you not must log in with a firstname_lastname -
JaTochNietDan - 03.08.2009
Hello Seva,
Try finding somewhere in "OnPlayerConnect", something like
pawn Код:
if(strfind(name,"_",true) == -1)
It may vary slightly but that's generally what would be used to make sure a player has an _ in their name.
Re: How to change that you not must log in with a firstname_lastname -
Seva - 03.08.2009
I have found it, but if a delete the "_', it's give a error if a wanne compile.
Код:
new playername[MAX_PLAYER_NAME],f;
GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
if(strfind(playername,"_",true,1)!=-1)
f=1;
if(playername[strlen(playername)-1]=='_')
f=0;
for(new i=0;i<strlen(playername);i++)
if((playername[i]<='9')&&(playername[i]>='0'))
f=0;
if(!f)
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string2, sizeof(string2), "You have been kicked, Reason: Firstname_Lastname Format", pName);
SendClientMessage(playerid, COLOR_LIGHTRED, string2);
format(string3, sizeof(string3), "AdmCmd: %s was kicked by Auto Kick, reason: Firstname_Lastname Format", pName);
SendClientMessageToAll(COLOR_LIGHTRED, string3);
Kick(playerid);
}
What must i insert where the "_"is ?
Re: How to change that you not must log in with a firstname_lastname -
JaTochNietDan - 03.08.2009
You can delete that entire section you posted, it's all the check.