command problem help rep+
#10

Quote:
Originally Posted by MrCallum
Посмотреть сообщение
Код:
#define COLOR_WHITE 0xFFFFFFAA //- If you do not have COLOR_WHITE Defined, or use -1

CMD:aduty(playerid, params[])
{
    if(pInfo[playerid][pLevel] >= 1)
    {
        new skin[MAX_PLAYERS];
        if(OnDuty[playerid] == 0)
        {
            skin[playerid] = GetPlayerSkin(playerid);
            SetPlayerSkin(playerid, 217);
            SetPlayerHealth(playerid, 100000);
            SetPlayerArmour(playerid, 100000);
            SetPlayerColor(playerid, 0x01FCFFFF);
            OnDuty[playerid] = 1;
        }
        else if(OnDuty[playerid] == 1)
        {
            SetPlayerSkin(playerid, GetPlayerSkin[playerid]);
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 0);
            SetPlayerColor(playerid, 0xFFFFFFAA); // OR SetPlayerColor(playerid, -1);
            OnDuty[playerid] = 0;
        }
    }
    else
    {
        SendClientMessage(playerid, red, "You are not administrator.");
    }
    return true;
}
How's that even supposed to work?
GetPlayerSkin is a function, so use parenthesis, not brackets.
And even doing GetPlayerSkin(playerid) will just set it to the skin he currently has.
As i said, you need to use a global array to store the data in, not a local one.
Reply


Messages In This Thread
command problem help rep+ - by Mijata - 23.03.2015, 17:41
Re: command problem help rep+ - by arjanforgames - 23.03.2015, 17:43
Re: command problem help rep+ - by Mijata - 23.03.2015, 17:44
Re: command problem help rep+ - by CalvinC - 23.03.2015, 17:45
Re: command problem help rep+ - by Mijata - 23.03.2015, 17:47
Re: command problem help rep+ - by arjanforgames - 23.03.2015, 17:56
Re: command problem help rep+ - by CalvinC - 23.03.2015, 18:03
Re: command problem help rep+ - by Aly - 23.03.2015, 18:06
Re: command problem help rep+ - by MrCallum - 23.03.2015, 18:12
Re: command problem help rep+ - by CalvinC - 23.03.2015, 18:15

Forum Jump:


Users browsing this thread: 2 Guest(s)