[HELP] Colors
#1

Hi all, here's my problem:
I've made this
Quote:

enum pInfo
{
***
pColor,
***
};
new PlayerInfo[MAX_PLAYERS][pInfo];

(The ***'s are other info)
And
Quote:

PlayerInfo[playerid][pColor] = 0;

Under onplayerconnect
And
Quote:

if (PlayerInfo[playerid][pColor] == 0)
{
SetPlayerColor(playerid, C_NOT); // White
}
if (PlayerInfo[playerid][pColor] == 1)
{
SetPlayerColor(playerid, C_COP); // Blue
}
if (PlayerInfo[playerid][pColor] == 2)
{
SetPlayerColor(playerid, C_FBI); // Midnightblue
}
if (PlayerInfo[playerid][pColor] == 3)
{
SetPlayerColor(playerid, C_ARM); // Armygreen
}
if (PlayerInfo[playerid][pColor] == 4)
{
SetPlayerColor(playerid, C_MED); // Lightblue
}
if (PlayerInfo[playerid][pColor] == 5)
{
SetPlayerColor(playerid, C_LCN); // chartreuse
}
if (PlayerInfo[playerid][pColor] == 6)
{
SetPlayerColor(playerid, C_YAK); // pink
}
if (PlayerInfo[playerid][pColor] == 7)
{
SetPlayerColor(playerid, C_GOV); // Very light pink
}
if (PlayerInfo[playerid][pColor] ==
{
SetPlayerColor(playerid, C_HIT); // brown
}
if (PlayerInfo[playerid][pColor] == 9)
{
SetPlayerColor(playerid, C_NEW); // purple
}
if (PlayerInfo[playerid][pColor] == 10)
{
SetPlayerColor(playerid, C_CAB); // yellow
}
if (PlayerInfo[playerid][pColor] == 11)
{
SetPlayerColor(playerid, C_DRL); // grey
}

Under onplayerspawn
Now i have everyone automatic at white(default 0), but how do i have to make a command that changes it?
I tried under /setstat and then made this:
Quote:

case 20:
{
PlayerInfo[giveplayerid][pColor] = amount;
format(string, sizeof(string), " The Player Color set to %d", amount);
}

But that doesn't work, any help?
Reply


Messages In This Thread
[HELP] Colors - by WThieves - 07.01.2010, 19:54
Re: [HELP] Colors - by Grim_ - 07.01.2010, 19:56
Re: [HELP] Colors - by WThieves - 07.01.2010, 20:08
Re: [HELP] Colors - by WThieves - 08.01.2010, 16:29

Forum Jump:


Users browsing this thread: 2 Guest(s)