How to check a players name
#9

Quote:
Originally Posted by SilentHuntR
no.
There's a very unhelpful theme to your spam posts...

GetPlayerName does not directly return the players name, you have to save it to a string.

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
That saves the players name to the array "name". Now you have to do the strfind business:

pawn Код:
if(strfind(name, "[g00n]", true) == -1)
{
//Code if g00n is in name
}
Note you may wish to change the true depending on whether you want it to be case sensitive, eg: G00n or g00n or G00N.

True = not case sensitive
False = Case Sensitive
(I Think)
Reply


Messages In This Thread
How to check a players name - by [g00n]Citizen - 04.05.2009, 20:13
Re: How to check a players name - by MenaceX^ - 04.05.2009, 20:14
Re: How to check a players name - by [g00n]Citizen - 04.05.2009, 20:18
Re: How to check a players name - by MenaceX^ - 04.05.2009, 20:27
Re: How to check a players name - by [g00n]Citizen - 04.05.2009, 20:33
Re: How to check a players name - by MenaceX^ - 04.05.2009, 20:50
Re: How to check a players name - by [g00n]Citizen - 04.05.2009, 20:53
Re: How to check a players name - by Joe Staff - 04.05.2009, 21:04
Re: How to check a players name - by Weirdosport - 04.05.2009, 21:31
Re: How to check a players name - by [g00n]Citizen - 04.05.2009, 22:29

Forum Jump:


Users browsing this thread: 3 Guest(s)