Role Play 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Role Play name (
/showthread.php?tid=104479)
Role Play name -
syruz - 24.10.2009
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
Re: Role Play name -
Eazy_Efolife - 24.10.2009
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;
}
Re: Role Play name -
syruz - 25.10.2009
thanks soooo much