27.08.2013, 23:36
Is there a function, that for example, converts 0xFFFFFFFF to FFFFFF?
0xFFFFFFFF =
0x
FFFFFF // the embded code
FF // color power
stock ColorToEmbed(const color[]) {
new finalclr[7];
format(finalclr, sizeof finalclr, "%s", color[2]);
return finalclr;
}
CMD:embed(playerid, params) {
new str[128], col[7];
col = ColorToEmbed("0xFFFFFFFF");
format(str, sizeof str, "Hi {%s}there.", col);
SendClientMessage(playerid, 0xFF0000FF, str);
return 1;
}
new embedColor = originalColor >>> 8;