How to make Anti-Bomb-Spam?
#1

as like title said how to make Anti-Bomb-Spam ? coz players are spaming bombs with Hunter Rhino and Hydra

I want like player should shoot a missile then wait for 1 second then shoot another missile something like this...

If player bomb spaming so that player should be killed for bomb spaming..

Please help.
Reply
#2

Is that even possible?
Reply
#3

not possible.. unless u TogglePlayer Controllable off for 1 second or w/e
Reply
#4

YES! it is! i saw this script in [FMJ] Full Matel Jacket Server
Reply
#5

bumb*
Reply
#6

Try this out: (Haven't tested)

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
forward HidraOff(playerid);
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE) || PRESSED(KEY_ACTION)) // CTRL/LMB Pressed
    {
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 520)
        {
            SetTimerEx("HidraOff", 1000, false, "%d", playerid);
            TogglePlayerControllable(playerid, false);
        }
    }
    return 1;
}

public HidraOff(playerid)
{
    TogglePlayerControllable(playerid, true);
}
Reply
#7

Quote:
Originally Posted by SiDiCeR
Посмотреть сообщение
Try this out: (Haven't tested)

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
forward HidraOff(playerid);
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE) || PRESSED(KEY_ACTION)) // CTRL/LMB Pressed
    {
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 520)
        {
            SetTimerEx("HidraOff", 1000, false, "%d", playerid);
            TogglePlayerControllable(playerid, false);
        }
    }
    return 1;
}

public HidraOff(playerid)
{
    TogglePlayerControllable(playerid, true);
}
THANK YOU!

I will try like this:


pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
forward HidraOff(playerid);
new Good[MAX_PLAYERS];
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE) || PRESSED(KEY_ACTION)) // CTRL/LMB Pressed
    {
                if (Good[playerid] == 1) { SetPlayerHealth(playerid, 0); return 1; }
        if (IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 520)
        {
            SetTimerEx("HidraOff", 1000, false, "d", playerid);
            Good[playerid] = 1;
        }
    }
    return 1;
}

public HidraOff(playerid)
{
    Good[playerid] = 0;
}
[/QUOTE]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)