Check 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: Check name (
/showthread.php?tid=602285)
Check name -
jimis - 05.03.2016
hi guys i need some help for checking player name on connect, i want all players name to be like jimis_klmt for roleplay, how i can check it on player connect? and if player name has a different type then kick him . Thanks
Re: Check name -
xEF - 05.03.2016
Use a function OnPlayerConnect, that get the player name, and use strfind to search this: _
Regards.
Re: Check name -
jimis - 05.03.2016
Quote:
Originally Posted by xEF
Use a function OnPlayerConnect, that get the player name, and use strfind to search this: _
Regards.
|
Ok thanks but how to use strfind?
Re: Check name -
xEF - 05.03.2016
Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name,"_",true) == -1) return Kick(playerid);
+REP If i helped you.
Regards,
Rodri.
Re: Check name -
jimis - 05.03.2016
ok thanks man , i will give you rep later because now i am connecred from mobile phone , i wont forget you dont worry