19.09.2010, 16:17
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.
TNX for help.
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.