Can't get player color? O_O - 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)
+--- Thread: Can't get player color? O_O (
/showthread.php?tid=605114)
Can't get player color? O_O -
Lirbo - 14.04.2016
PHP код:
new Text3D:NameNHP[MAX_PLAYERS];
format(SString,sizeof(SString),"{%06x}%s\n{FF0000}",GetPlayerColor(playerid)>>>8,GetName(playerid));
NameNHP[playerid] = CreateDynamic3DTextLabel(SString, 0xFF0000FF, 0, 0, 0.2, 40, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
idk why but it's getting the player color as black for some reason.
AND YES!!! I defined colors to the players.
Re: Can't get player color? O_O -
Konstantinos - 14.04.2016
I'm not sure if by "defining colors to the players" you mean that you have set a color but if you haven't, GetPlayerColor would return 0 (black).
Re: Can't get player color? O_O -
Darkwood17 - 14.04.2016
https://sampwiki.blast.hk/wiki/GetPlayerColor
Quote:
Originally Posted by SA-MP Wiki
GetPlayerColor will return nothing (0) unless SetPlayerColor has been used first.
|
Fix:
https://sampwiki.blast.hk/wiki/ColorFix