Help on colors calculation !!!
#2

pawn Код:
stock SetPlayerColorAlpha(playerid, alpha) //By Betamaster
{
    new r, g, b, a;
    HexToRGBA(GetPlayerColor(playerid), r, g, b, a);
    SetPlayerColor(playerid, RGBAToHex(r, g, b, alpha));
}

stock HexToRGBA(colour, &r, &g, &b, &a) //By Betamaster
{
    r = (colour >> 24) & 0xFF;
    g = (colour >> 16) & 0xFF;
    b = (colour >> 8) & 0xFF;
    a = colour & 0xFF;
}
So use it like
pawn Код:
SetPlayerColorAlpha(playerid, yourvalue);
Reply


Messages In This Thread
Help on colors calculation !!! - by FilesMAker - 12.09.2014, 08:48
Re: Help on colors calculation !!! - by Affan - 12.09.2014, 09:08
Re : Help on colors calculation !!! - by FilesMAker - 12.09.2014, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)