Color help
#4

Do not use strings for storing colors. Colors ARE integers!

When a player types the desired clan color: FF0000
Use sscanf and "x" specifier to retrieve integer and store it in the integer clanColor (get rid of the array size). You can limit text to 6 characters if you want to.

Then you can use partially what ConnorW posted but without `>>> 8` as the color will not have an alpha value.
Reply


Messages In This Thread
Color help - by None1337 - 30.09.2018, 09:11
Re: Color help - by d3Pedro - 30.09.2018, 09:23
Re: Color help - by ReD_HunTeR - 30.09.2018, 09:33
Re: Color help - by Calisthenics - 30.09.2018, 09:39
Re: Color help - by None1337 - 30.09.2018, 10:30
Re: Color help - by Calisthenics - 30.09.2018, 10:43
Re: Color help - by None1337 - 30.09.2018, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)