[Help] RPG Name login?
#1

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?
Reply
#2

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;
}
Reply
#3

But if the player enters with numbers? or more than 1 _?
Reply
#4

Quote:
Originally Posted by MenaceX^
But if the player enters with numbers? or more than 1 _?
I have tried it, it works.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)