Anti Drive-by is not working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti Drive-by is not working (
/showthread.php?tid=177861)
Anti Drive-by is not working -
Cypress - 19.09.2010
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.
Re: Anti Drive-by is not working -
ZamaXor - 19.09.2010
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.
Re: Anti Drive-by is not working -
PixeledNinja - 19.09.2010
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;
Re: Anti Drive-by is not working -
Cypress - 19.09.2010
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.