Role Play name
#1

i am creating a role play server but am unable to determine the code needed for role play names(as in Joe_Bloggs)
this is the script i currently have
Code:
if(PlayerName != "%_%")
	{
	  SendClientMessage(playerid, COLOR_YELLOW, "Your name is not a role play name.");
	  Kick(playerid);
	  return 1;
	}
as you can see the problem bit of the code lies in the 1st part if anyone can help me fix this that would be great
Reply
#2

edit: Fuck my indentation!
Code:
	new plname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, plname, sizeof(plname));
  new namestring = strfind(plname, "_", true);
	if(namestring == -1)
	{
	  SendClientMessage(playerid, COLOR_YELLOW, "Your name is not a role play name.");
	  Kick(playerid);
		return 1;
	}
Reply
#3

thanks soooo much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)