Anti Drive-by is not working
#1

Hello SA-MP

I found this Anti Drive by and it's working. But it has got 1 bug. When You enter on bike it's doing the animation and not stop. When i ride on the bike it does the animation of reloading and not the drive animation. I want to do so when someone press the KEY_FIRE the animation will work and then stop. Look at the code.

pawn Код:
#include <a_samp>

forward AntiDB(playerid);

public OnFilterScriptInit()
{
    print("- Anti Driveby -");
    print("- LOADED -");
    SetTimer("AntiDB",100,true);
    return 1;
}

public AntiDB(playerid)
{
    if (GetPlayerWeapon(playerid) == 28 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
         ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
    }
    if (GetPlayerWeapon(playerid) == 29 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
    }
    if (GetPlayerWeapon(playerid) == 32 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
       ApplyAnimation(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
    }
    return 1;
}

TNX for help.
Reply
#2

I found this script a lot of time ago. It's bugged i don't know why the animation not stops. I think that u must check if player is holding the fire key. Maybe someone will help us to solve that problem.
Reply
#3

Wouldn't something like this work?

Note: This also contains a Anti Heliblade

Код:
    if(IsPlayerInVehicle(killerid, 548 || 425 || 487 || 488 || 497 || 563 || 447 || 469)) {
		Kick(killerid);
		}
    return 1;
    
    if(IsPlayerInAnyVehicle(killerid);
        Kick(killerid);
        }
	return 1;
Reply
#4

This kind of anti drive by's is stupid. I need to fix this Anti DB . Someone can make so the animation will stop. The problem is that i'm enter to a motobike and the animation starts working (reloading animation) that not stops.
enter on bike = shot = reload animation = can't shot = back the drive animation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)