Check name
#1

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

Use a function OnPlayerConnect, that get the player name, and use strfind to search this: _

Regards.
Reply
#3

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

Код:
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.
Reply
#5

ok thanks man , i will give you rep later because now i am connecred from mobile phone , i wont forget you dont worry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)