Command Help
#5

Or you can do the following:
pawn Код:
// global:
new Player_Name[MAX_PLAYERS][MAX_PLAYER_NAME];

#define PlayerName(%0) Player_Name[%0]

// OnPlayerConnect:
GetPlayerName(playerid, Player_Name[playerid], MAX_PLAYER_NAME);
and you can use: PlayerName(playerid)

However make sure that you do not use it in invalid (not connected) players because a run time error 4 will be caused.

EDIT: You don't need an array at all, take a look here: http://forum.sa-mp.com/showpost.php?...58&postcount=4
Reply


Messages In This Thread
Command Help - by DaYviSoN - 06.05.2014, 15:48
Re: Command Help - by Nathan_Taylor - 06.05.2014, 15:55
Re: Command Help - by Sojo12 - 06.05.2014, 15:56
Re: Command Help - by saikumar - 06.05.2014, 15:59
Re: Command Help - by Konstantinos - 06.05.2014, 16:00
Re: Command Help - by DaYviSoN - 06.05.2014, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)