How do I combine this?
#7

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What don't you understand? Colors are integers, not strings. You can use the sscanf plugin to convert a hexadecimal color to an integer. And use that integer instead of that string.

You can download sscanf at https://sampforum.blast.hk/showthread.php?tid=570927.

To convert a color into a string, do:
pawn Код:
new color_hex[11] = "0xFFFFFFFF", color_int;
sscanf(color_hex, "x", color_int);
The integer gets saved in "color_int". Its value, in this case, would be "-1".
But my color is not a HEX number. Its in this form, "XXXXXX" so "FFFFFF". Would that work the same?
Reply


Messages In This Thread
How do I combine this? - by danielpalade - 28.03.2016, 01:21
Re: How do I combine this? - by SickAttack - 28.03.2016, 01:46
Re: How do I combine this? - by danielpalade - 28.03.2016, 02:13
Re: How do I combine this? - by AdrianG - 28.03.2016, 02:20
Re: How do I combine this? - by danielpalade - 28.03.2016, 02:42
Re: How do I combine this? - by SickAttack - 28.03.2016, 03:03
Re: How do I combine this? - by danielpalade - 28.03.2016, 03:16
Re: How do I combine this? - by SickAttack - 28.03.2016, 03:21
Re: How do I combine this? - by danielpalade - 28.03.2016, 03:32
Re: How do I combine this? - by SickAttack - 28.03.2016, 03:41

Forum Jump:


Users browsing this thread: 1 Guest(s)