rendered paste body...
new old_player_colors[MAX_PLAYERS];
old_player_colors[playerid] = GetPlayerColor(playerid);
...
public GetHEXString(number) // thx to Y_Less
{
new str[9];
// new tmp;
for (new i = 7; i >= 0; i--)
{
str[i] = ( /* tmp = */ number & 0x0F) + 0x30; // + (tmp > 9 ? 0x07 : 0x00)
str[i] += (str[i] > '9') ? 0x07 : 0x00;
number >>= 4;
}
str[8] = '\0';
new str2[11];
format(str2,sizeof(str2),"0x%s",str);
return str2;
}
...
SetPlayerColor(playerid, GetHEXString(old_player_colors[playerid]));
...