Quote:
Originally Posted by HurtLocker
Well, I am sure those loops are useless and wrong. This is the fresh, cool and correct new supply:
pawn Код:
new SavedColor[MAX_PLAYERS];
CMD:vcoloron(playerid, params[]) { if(gPlayerInfo[playerid][PLAYER_VIP] < 1)return SendClientMessage(playerid, COLOR_RED, "You are Not Allowed To Use This Command!"); if(gPlayerInfo[playerid][PLAYER_VIP] == 1) { SavedColor[playerid]=GetPlayerColor(playerid); SetPlayerColor(playerid, COLOR_BRONZE); } else if(gPlayerInfo[playerid][PLAYER_VIP] == 2) { SavedColor[playerid]=GetPlayerColor(playerid); SetPlayerColor(playerid, COLOR_SILVER); } else { SavedColor[playerid]=GetPlayerColor(playerid); SetPlayerColor(playerid, COLOR_GOLD); } SendClientMessage(playerid, COLOR_LIGHTBLUE, "[VIP]: You Have Enabled a Vip Color!"); return 1; }
CMD:vcoloroff(playerid, params[]) { if(gPlayerInfo[playerid][PLAYER_VIP] >= 1) { SetPlayerColor(playerid, SavedColor[playerid]); } else return SendClientMessage(playerid, COLOR_RED, "You are Not Allowed To Use This Command!"); return 1; }
|
When I type /vcoloroff it should be Orange color, but it's black...Anyway, thank you.