27.06.2013, 17:51
On top of your script add:
Then replace your command with this one:
Код:
new pDutyHealth[MAX_PLAYERS]; new pDutyArmour[MAX_PLAYERS];
Код:
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;
}

