Help: vip command!
#4

I am not sure how and why you use those loops. You want to be only you that will set all vips' colors? Anyway this is what it is with loop. If it doesnt work, tell me to make the commands personal.
pawn Код:
new SavedColor[MAX_PLAYERS];

CMD:vcoloron(playerid, params[])
{
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        if(gPlayerInfo[i][PLAYER_VIP] < 1)return SendClientMessage(i, COLOR_RED, "You are Not Allowed To Use This Command!");
        if(gPlayerInfo[i][PLAYER_VIP] == 1)
        {
            SavedColor[i]=GetPlayerColor(i);
            SetPlayerColor(i, COLOR_BRONZE);
        }
        else if(gPlayerInfo[i][PLAYER_VIP] == 2)
        {
            SavedColor[i]=GetPlayerColor(i);
            SetPlayerColor(i, COLOR_SILVER);
        }
        else
        {
            SavedColor[i]=GetPlayerColor(i);
            SetPlayerColor(i, COLOR_GOLD);
        }
        SendClientMessage(i, COLOR_LIGHTBLUE, "[VIP]: You Have Enabled a Vip Color!");
    }
    return 1;
}



CMD:vcoloroff(playerid, params[])
{
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        SetPlayerColor(i, SavedColor[i]);
    }
    return 1;
}
Reply


Messages In This Thread
Help: vip command! - by Areax - 16.04.2013, 15:02
Re: Help: vip command! - by HurtLocker - 16.04.2013, 15:06
Re: Help: vip command! - by Areax - 16.04.2013, 15:09
Re: Help: vip command! - by HurtLocker - 16.04.2013, 15:19
Re: Help: vip command! - by Areax - 16.04.2013, 15:25
Re: Help: vip command! - by HurtLocker - 16.04.2013, 15:36
Re: Help: vip command! - by Areax - 16.04.2013, 16:12
Re: Help: vip command! - by HurtLocker - 16.04.2013, 16:14
Re: Help: vip command! - by robdint - 16.04.2013, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)