How to make random spawn colors?
#3

Quote:
Originally Posted by Andom
You don't have to use enum for just 1 enum, try this:

pawn Код:
new PlayerColor[9] = {
0xE60000FF, //Red
0x1229FAFF, //Blue
0x21DD00FF, //Green
0xFFFF00FF, //Yellow
0xF97804FF, //Orange
0x00C2ECFF, //Light Blue
0x38FF06FF, //Light Green
0x008040FF, //Dark Green
0xFF8080FF //Light Red
};

public OnPlayerConnect(playerid)
{
    new randomcolor = random(sizeof(PlayerColor));
    SetPlayerColor(playerid, PlayerColor[randomcolor]);
    return 1;
}
That script don't works also very well.
With that script, ID 0 is always orange, and that is the normal SA:MP method...
Reply


Messages In This Thread
How to make random spawn colors? - by Remi-X - 27.04.2009, 10:30
Re: How to make random spawn colors? - by Andom - 27.04.2009, 10:56
Re: How to make random spawn colors? - by Remi-X - 27.04.2009, 17:51
Re: How to make random spawn colors? - by Remi-X - 28.04.2009, 09:31
Re: How to make random spawn colors? - by Remi-X - 30.04.2009, 11:34
Re: How to make random spawn colors? - by yom - 30.04.2009, 12:38
Re: How to make random spawn colors? - by Remi-X - 30.04.2009, 13:04
Re: How to make random spawn colors? - by aspire5630 - 30.04.2009, 15:06
Re: How to make random spawn colors? - by Remi-X - 30.04.2009, 15:17
Re: How to make random spawn colors? - by aspire5630 - 30.04.2009, 16:21

Forum Jump:


Users browsing this thread: 2 Guest(s)