Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Like any other integer value. They might come out looking like -15786300 or something like that but that's normal. The reason you can use -1 in SendClientMessage to get white is that -1 is exactly the same as 0xFFFFFFFF, just represented differently.
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
Okay, than can you give me convertor from Hexadecimal to Decimal Value as stock? I can save and load it as string so can you tell me how to convert it to Decimal, because SetPlayerColor can't write strings?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
There is no need to convert between decimal and hexadecimal because there is nothing to convert. It's the same number. Just fetch and store with the regular Int functions like you would any other number, like score or money.
Unless you are constantly going to edit the files manually, storing a hexadecimal string is useless.
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
I tried it, but it is not working, when I type something like: 0xFF0000FF it saves it as 0 and it loads it as black color!
When type in 4278190335, it saves as -16776961 and it loads it as red color(because 0xFF0000FF is red color)!
So when I'm using Deciminal value, it works perfect!
Can anyone help me, please?
+1 REP
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
Guys I want, when I type in dialog 0xFFFFFFFF it saves as white color and loads as white color. I'm using it for SetPlayerColor(playerid,color); Can you give me code for format it FROM HEX TO DECIMAL(for save the color) and FROM DECIMAL TO HEX(to load the color).
Thanks!