anti bomb spam
#1

asking if someone can make anti bomb spam
i want like this
if player make 3 explode of hunter then if he do again n again he will be drop out of the hunter and if he stop at 3 and wait for 10 secs so he wont be drop out.

+rep as reward.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)