/aduty command - health not restoring.
#6

On top of your script add:
Код:
new pDutyHealth[MAX_PLAYERS];
new pDutyArmour[MAX_PLAYERS];
Then replace your command with this one:
Код:
CMD:aduty(playerid, params[])
{

        if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
        if(aduty[playerid] == 0)
        {
        new Float:dutyhp;
        new Float:dutyarmour;
        pDutyHealth[playerid] = GetPlayerHealth(playerid, dutyhp);
        pDutyArmour[playerid] = GetPlayerArmour(playerid, dutyarmour);
        SCM(playerid, COLOR_HOTPINK,"* You Have Gone On Duty.");
        SetPlayerArmour(playerid, 9999999999);
        SetPlayerHealth(playerid, 9999999999);
        aduty[playerid] =1;
        }
        else
        {
        SCM(playerid, COLOR_HOTPINK,"* You Have Gone Off Duty.");
        SetPlayerHealth(playerid, pDutyHealth[playerid]);
        SetPlayerArmour(playerid, pDutyArmour[playerid]);
        aduty[playerid] =0;
        }
        
        return 1;
}
Reply


Messages In This Thread
/aduty command - health not restoring. - by Anak - 27.06.2013, 15:34
Re: /aduty command - health not restoring. - by Akira297 - 27.06.2013, 15:35
Re: /aduty command - health not restoring. - by Anak - 27.06.2013, 15:48
Re: /aduty command - health not restoring. - by drichie - 27.06.2013, 17:01
Re: /aduty command - health not restoring. - by Anak - 27.06.2013, 17:45
Re: /aduty command - health not restoring. - by feartonyb - 27.06.2013, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)