Admin ammunition every 10 mins.
#2

pawn Код:
if (strcmp("/adminammunition", cmdtext, true) == 0)
    {
        if(isPlayerAnAdmin(playerid,2))
        {
            new ammun = GetPVarInt(playerid, "ammunition");
            if (ammun) return 1;
            SetPVarInt(playerid, "ammunition", 1);
            SetTimerEx("resetammun", 600 * 1000, false, "i", playerid);
            SetPlayerHealth(playerid,100);
            SetPlayerArmour(playerid,100);
            GivePlayerWeapon(playerid,31,100);
            GivePlayerWeapon(playerid,41,500);
            SendClientMessage(playerid,0xFF66FFAA," You get admin ammunition.");
            return 1;
        }
        else
        {
            SendClientMessage(playerid,0x4B00B0AA,"You are not an admin...");
        }
        return 1;
    }

// Put this code at the end of your script:
public resetammun(playerid)
{
    SetPVarInt(playerid, "ammunition", 0);
    return 1;
}
Reply


Messages In This Thread
Admin ammunition every 10 mins. - by Vvolk - 01.05.2011, 20:04
Re: Admin ammunition every 10 mins. - by Emmet_ - 01.05.2011, 20:10
Re: Admin ammunition every 10 mins. - by Vvolk - 02.05.2011, 12:10
Re: Admin ammunition every 10 mins. - by xir - 02.05.2011, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)