30.06.2014, 19:58
PHP код:
dcmd_aduty(playerid,params[])
{
#pragma unused params
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
{
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, 999999);
GivePlayerWeapon(playerid, 40, 9999999);
GivePlayerWeapon(playerid, 39, 9999999);
GivePlayerWeapon(playerid, 38, 9999999);
SetPlayerColor(playerid, 0xFFFFFFFF);
oldskin[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 294);
aduty[playerid] =1;
}
else
{
SCM(playerid, COLOR_HOTPINK,"* You Have Gone Off Duty.");
SetPlayerHealth(playerid, pDutyHealth[playerid]);
SetPlayerArmour(playerid, pDutyArmour[playerid]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, oldskin[playerid]);
aduty[playerid] =0;
oldskin[playerid] =0;
GivePlayerWeapon(playerid, 9, 99999);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 26, 99999);
GivePlayerWeapon(playerid, 28, 99999);
GivePlayerWeapon(playerid, 31, 99999);
GivePlayerWeapon(playerid, 26, 99999);
GivePlayerWeapon(playerid, 34, 99999);
}else{
SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
}
return 1;
}