/duty command
#5

For skin you could do it with PVar's like this:

pawn Code:
dcmd_onduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
        if(AccInfo[playerid][OnDuty] == 0)
        {
            SetPVarInt(playerid, "Skin", GetPlayerSkin(playerid)); // added
           
            AccInfo[playerid][OnDuty] = 1;
            SetPlayerHealth(playerid,100000);
            SetPlayerSkin(playerid,294);
            GivePlayerWeapon(playerid,16,50000);
            GivePlayerWeapon(playerid,38,50000);
            return SendClientMessage(playerid,green,"You are now in Duty Mode");
        }
        else
        {
            SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin")); // Added
           
            AccInfo[playerid][OnDuty] = 0;
            SetPlayerHealth(playerid,100);
            return SendClientMessage(playerid,orange,"You are now Off Duty");
           
        }
    }
    return ErrorMessages(playerid, 5);
}
Reply


Messages In This Thread
/duty command - by ThamburaaN - 20.09.2011, 21:43
Re: /duty command - by Stigg - 20.09.2011, 21:50
Re: /duty command - by Kingunit - 20.09.2011, 21:53
Re: /duty command - by ThamburaaN - 21.09.2011, 00:29
Re: /duty command - by mmrk - 21.09.2011, 00:46
Re: /duty command - by grand.Theft.Otto - 21.09.2011, 01:22
Re: /duty command - by ThamburaaN - 21.09.2011, 02:12
Re: /duty command - by grand.Theft.Otto - 21.09.2011, 22:49
Re: /duty command - by ThamburaaN - 22.09.2011, 01:20
Re: /duty command - by Davz*|*Criss - 22.09.2011, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)