12.03.2016, 17:05
Didnt need to post your whole script,Heres a /duty command when admin 1+ uses it they go on godmode and get a mingun,when they type /duty again they got back there old weapons and got there health and armour back to 100
PHP код:
CMD:duty(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, "Only admin level 1+ can use this command.");
if(PlayerInfo[playerid][pAdminLevel] >= 1 && IsOnduty{playerid} == 0)
{
IsOnduty{playerid} = 1;
SetPlayerHealth(playerid,9999999.0);
SetPlayerArmour(playerid,9999999.0);
GivePlayerWeapon(playerid,38,999999);
}
else if( IsOnduty{playerid} == 1)
{
IsOnduty{playerid} = 0;
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
}
return 1;
}