07.01.2010, 19:54
Hi all, here's my problem:
I've made this
(The ***'s are other info)
And
Under onplayerconnect
And
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:
But that doesn't work, any help?
I've made this
Quote:
enum pInfo { *** pColor, *** }; new PlayerInfo[MAX_PLAYERS][pInfo]; |
And
Quote:
PlayerInfo[playerid][pColor] = 0; |
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 } |
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); } |