[Help] RPG Name login? - 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: [Help] RPG Name login? (
/showthread.php?tid=73841)
[Help] RPG Name login? -
[LK]Ricxk - 18.04.2009
Im looking for a filter so when people Register they have to have RPG names. IF you dont you get kicked? is there a script around for it? iv looked but nothing come up?
Re: [Help] RPG Name login? -
Klutty - 18.04.2009
Use this, if the player doesnt have a RP name (Firstname_Lastname) he will be kicked.
pawn Код:
new planame[MAX_PLAYER_NAME];
GetPlayerName(playerid, planame, sizeof(planame));
new namestring = strfind(planame, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, 0xFF0000AA, "Your name must be in the format: Firstname_Lastname.");
Kick(playerid);
return 1;
}
Re: [Help] RPG Name login? -
MenaceX^ - 18.04.2009
But if the player enters with numbers? or more than 1 _?
Re: [Help] RPG Name login? -
Klutty - 18.04.2009
Quote:
Originally Posted by MenaceX^
But if the player enters with numbers? or more than 1 _?
|
I have tried it, it works.
Re: [Help] RPG Name login? -
MenaceX^ - 18.04.2009
No.. If someone connects with numbers in his name, it doesn't kick him for invalid name or something.
Try to connect with
Name_Name1