06.08.2007, 06:06
Sure there are many anti-driveby filterscripts, but this is just a snippet. You may notice you have what looks like negative ammo upon entering a vehicle, but you don't, it's actually 0.
At the top of the script.
Under OnPlayerStateChange.
At the top of the script.
pawn Код:
static DBWeapon[MAX_PLAYERS],DBAmmo[MAX_PLAYERS];
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
GetPlayerWeaponData(playerid,4,DBWeapon[playerid],DBAmmo[playerid]);
SetPlayerAmmo(playerid,DBWeapon[playerid],0);
}
else if(oldstate == PLAYER_STATE_DRIVER)
{
GivePlayerWeapon(playerid,DBWeapon[playerid],DBAmmo[playerid]);
}