[HELP]Name Check ! - 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: [HELP]Name Check ! (
/showthread.php?tid=533186)
[HELP]Name Check ! -
FloxX - 23.08.2014
Need Name Checker Please Help me! Like this Example
Ken_Rosenberg = True Name
KenRosenberg = True Name
[FztH]KenRosenberg = False Name because [ ] <<<this symbol
If use Symbol at name Example
!@#$%^&*()+=-<>?/ AND [ , ]
Who player using this symbol at nickname ,
That player Get Kick
SendClientMessage : You get kick , because You Have Symbol Ilegal In your nickname , Please Re Login and Change your nick name
Re: [HELP]Name Check ! -
Sawalha - 23.08.2014
Make a list of all these illegal characters , Use strfind to check if they're in player's name
P.S samp system already blocks these except the () and the [ ] , You can create a list if you wish:
pawn Код:
new Not[][] =
{
'[',
']',
')',
'('
};
pawn Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
for(new i =0; i < sizeof(Not); i++)
{
if(strfind(name, Not[i], false) != -1)
{
SendClientMessage(playerid, -1, "You get kick , because You Have Symbol Ilegal In your nickname , Please Re Login and Change your nick name");
Kick(playerid);
}
}
return 1;
}
Re: [HELP]Name Check ! -
iFarbod - 23.08.2014
You may use AllowNickNameChar function in YSF Plugin.