06.01.2014, 11:29
You need to use GetPlayerName, example from samp wiki:
I advice you to make a stock of it like this (you can just use this one, its also from the samp wiki)
If you use this stock you can remove the getplayername and the pname variable and relace it with PlayerName in your command
Hope that helped! Good luck.
pawn Код:
new pname[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined the server.", name);
SendClientMessageToAll(0xC4C4C4FF, string);
pawn Код:
stock PlayerName(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
return pname;
}
Hope that helped! Good luck.