SA-MP Forums Archive
SetPlayerColor Help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerColor Help (/showthread.php?tid=121654)



SetPlayerColor Help - SiJ - 17.01.2010

Hey,
I got this code:

SetPlayerColor(PlayerID,strval(dini_Get(gangfile," Color")));
But it always sets color to black.. I think strval isn't good here, but what should I use instead?

If I use it like this:
SetPlayerColor(PlayerID,dini_Get(gangfile,"Color") );
I get
error 035: argument type mismatch (argument 2)

"Color" in file is defined as 0xB7B86EAA


Re: SetPlayerColor Help - Correlli - 17.01.2010

Search for StrToHex function on the forum, i believe that could help you.


Re: SetPlayerColor Help - SiJ - 17.01.2010

Quote:
Originally Posted by Don Correlli
Search for StrToHex function on the forum, i believe that could help you.
I saw it but it converts RRGGBB to hex color format, but the "Color" in the file (0xB7B86EAA) is not in RRGGBB format..