02.07.2013, 21:30
You pass that function a hexadecimal, just in the format of ARGB instead of RGBA. You can switch the R and A values like so:
pawn Код:
new color = 0xFFFFFFAA; // original color
new r = (color & 0xFF000000) >> 24;
new g = (color & 0x00FF0000) >> 16;
new b = (color & 0x0000FF00) >> 8;
new a = (color & 0x000000FF);
// the new color that you pass to SetObjectMaterialText
new value = ( ((a & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | (r & 0xFF) );