Can't get player color? O_O
#1

PHP код:
new Text3D:NameNHP[MAX_PLAYERS];
format(SString,sizeof(SString),"{%06x}%s\n{FF0000}",GetPlayerColor(playerid)>>>8,GetName(playerid));
NameNHP[playerid] = CreateDynamic3DTextLabel(SString0xFF0000FF000.240playeridINVALID_VEHICLE_ID0, -1, -1, -1100.0); 
idk why but it's getting the player color as black for some reason.
AND YES!!! I defined colors to the players.
Reply
#2

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).
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)