30.09.2018, 09:39
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.
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.