30.10.2009, 11:36
How to make pawn color (0xRRGGBBFF) from string which has "RRGGBB" ?
new hex;
sscanf("0x112233FF", "x", hex);
printf("%x", hex);
Originally Posted by ZeeX
https://sampwiki.blast.hk/wiki/Sscanf
pawn Код:
|
new hex;
sscanf("112233FF", "x", hex);
printf("%x", hex);
Originally Posted by Dreft
pawn Код:
|
Originally Posted by Finn
Try and check what it prints when you have '0x' in the hex code. Yes, the same thing.
|
new hex;
sscanf("0x112233FF", "x", hex);
printf("%x", hex);
Originally Posted by Dreft
Prints 112233FF, i need 0x at beginning :/
|
new hex;
sscanf("0x112233FF", "x", hex);
printf("0x%x", hex);