SA-MP Forums Archive
Need help with Colorsaving (SA:MP ID Color) - 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: Need help with Colorsaving (SA:MP ID Color) (/showthread.php?tid=100358)



Need help with Colorsaving (SA:MP ID Color) - Littl3j0hNy - 04.10.2009

Hi Community,
I want to save the Color of the Player at OnPlayerConnect. (Color of the ID)
But if i want to set the Color to the Connect color (SA:MP ID Color)
Doesn't work.

Over Main:
Код:
new poldcolor[MAX_PLAYERS];
In OnPlayerConnect:
Код:
poldcolor[playerid] = GetPlayerColor(playerid);
Someone can help me ?


Re: Need help with Colorsaving (SA:MP ID Color) - Correlli - 04.10.2009

Player's color is in hexadecimal code. Search for HexToInt and IntToHex functions on the forum. Convert the color to integer by using HexToInt function and then store it to the player's variable and when you want to load it just use IntToHex function to get the hexadecimal code from integer.


Re: Need help with Colorsaving (SA:MP ID Color) - Littl3j0hNy - 04.10.2009

Quote:
Originally Posted by Don Correlli
Player's color is in hexadecimal code. Search for HexToInt and IntToHex functions on the forum. Convert the color to integer by using HexToInt function and then store it to the player's variable and when you want to load it just use IntToHex function to get the hexadecimal code from integer.
Okay. Thanks