anti bomb spam
#2

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
forward Hunter(playerid);
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE) || PRESSED(KEY_ACTION)) // CTRL/LMB the fire button of hunter
    {
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 425)//checking if the player inside the hunter
        {
            SetTimerEx("Hunter", 3000, false, "%d", playerid);//3 secs of 3 bombs i think
            TogglePlayerControllable(playerid, false);//stop him from controlling for sometime
        }
    }
    return 1;
}

public Hunter(playerid)
{
    TogglePlayerControllable(playerid, true);//make him can control again
}
Reply


Messages In This Thread
anti bomb spam - by ReD_HunTeR - 22.12.2013, 15:39
Re: anti bomb spam - by SilentSoul - 22.12.2013, 15:46

Forum Jump:


Users browsing this thread: 2 Guest(s)