How to change that you not must log in with a firstname_lastname
#1

I using the Pronton script, but if you wanna enter the server, you must using a firstname_lastname, but i wanna change it. But how you must do this ?
Reply
#2

Hello Seva,

Try finding somewhere in "OnPlayerConnect", something like

pawn Код:
if(strfind(name,"_",true) == -1)
It may vary slightly but that's generally what would be used to make sure a player has an _ in their name.
Reply
#3

I have found it, but if a delete the "_', it's give a error if a wanne compile.


Код:
  new playername[MAX_PLAYER_NAME],f;
	GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
	if(strfind(playername,"_",true,1)!=-1)
	f=1;
	if(playername[strlen(playername)-1]=='_')
  f=0;
	for(new i=0;i<strlen(playername);i++)
	if((playername[i]<='9')&&(playername[i]>='0'))
	f=0;
	if(!f)
	{
  GetPlayerName(playerid, pName, sizeof(pName));
	format(string2, sizeof(string2), "You have been kicked, Reason: Firstname_Lastname Format", pName);
	SendClientMessage(playerid, COLOR_LIGHTRED, string2);
	format(string3, sizeof(string3), "AdmCmd: %s was kicked by Auto Kick, reason: Firstname_Lastname Format", pName);
	SendClientMessageToAll(COLOR_LIGHTRED, string3);
	Kick(playerid);
	}
What must i insert where the "_"is ?
Reply
#4

You can delete that entire section you posted, it's all the check.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)