[HELP] Health and Armour for Admin PROBLEM
#3

I'll show you what would probably work in 0.3d with ZCMD
pawn Код:
CMD:god(playerid)
{
    if(IsPlayerAdmin(playerid)) //Switch with your admin system
    {
        if(GetPVarInt(playerid, "God") != 1)
        {
            SetPVarInt(playerid, "God", 1);
            SendClientMessage(playerid, 0x00CC00, "God mode enabled.");
        }
        else
        {
            SetPVarInt(playerid, "God", 0);
            SendClientMessage(playerid, 0x00CC00, "God mode disabled.");
        }
   }
    else return SendClientMessage(playerid, 0xCC0000, "You don't have the required level to use this command.");
}
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(GetPVarInt(playerid, "God") == 1)
    {
        SetPlayerHealth(playerid, 100);
    }
}
This of course, is untested.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)