جرب كذا :
addEvent ( 'onClientVehicleWeaponFire', true )
addEventHandler ( 'onClientVehicleWeaponFire', root, function ( gType, gVeh )
setWorldSoundEnabled ( 4, false )
setTimer ( function ( )
playSound ("Wow.mp3", false )
end, 5000, 1 )
end )
armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true}
function vehicleWeaponFire(key, keyState, vehicleFireType)
local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer))
if (armedVehicles[vehModel]) then
triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel)
end
end
bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary")
bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary")