28.08.2013, 00:45
Wrote my own function.
You need to input your color as a string into ColorToEmbed and it will return a color string without 0x and the last 2 characters. Works like charm.
pawn Код:
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;
}

