save color!
#1

hey,
how i can save my color?
with
Код:
Color[playerid] = GetPlayerColor(playerid);
and than
Код:
SetPlayerColor(playerid,Color[playerid];
doesn't work.
Reply
#2

Make sure it's set to a colour first, I'm not sure if this was fixed in .3 but it used to bug out if you didn't set it first.
Reply
#3

You have to use RGBA.

Here are two of the functions to help
pawn Код:
public RGBAToHex(r, g, b, a) //By Betamaster
{
    return (r<<24 | g<<16 | b<<8 | a);
}

public HexToRGBA(colour, &r, &g, &b, &a) //By Betamaster
{
    r = (colour >> 24) & 0xFF;
    g = (colour >> 16) & 0xFF;
    b = (colour >> 8) & 0xFF;
    a = colour & 0xFF;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)