How To Make Random Color On Connect
#3

Here you have:

pawn Код:
//creating new array
new Colors[] =
{
    0x0BE3F4FF, // Color1
    0x0D52F2FF, // Color2
    0xFF8000FF, // Color3
    0x0FAAF4FF // Color4
};

public OnPlayerConnect(playerid)
{
    //randoming array
    new randomcolors = random(sizeof(Colors));
    //Now use randomcolors in any codes like
    SendClientMessage(playerid, Colors[randomcolors], "Welcome player" );
    return 1;
}
Reply


Messages In This Thread
Solved - by SsHady - 10.03.2012, 06:12
Re: How To Make Random Color On Connect - by Faisal_khan - 10.03.2012, 06:24
Re: How To Make Random Color On Connect - by Shabi RoxX - 10.03.2012, 06:27
Re: How To Make Random Color On Connect - by SsHady - 10.03.2012, 06:34
Re: How To Make Random Color On Connect - by Faisal_khan - 10.03.2012, 06:42
Re: How To Make Random Color On Connect - by vinigas - 23.10.2014, 07:26
Re: How To Make Random Color On Connect - by joevega12 - 23.10.2014, 18:17

Forum Jump:


Users browsing this thread: 2 Guest(s)