Client Exports
Integrations
Copying these code blocks can help you better integrate nass_paintball into your server
ps-dispatch/client /eventhandlers.lua
AddEventHandler('CEventGunShot', function(witnesses, ped)
if exports.nass_paintball:inGame() then return end
if IsPedCurrentWeaponSilenced(cache.ped) then return end
if inNoDispatchZone then return end
if BlacklistedWeapon(cache.ped) then return end
WaitTimer('Shooting', function()
if cache.ped ~= ped then return end
if PlayerData.job.type == 'leo' then
if not Config.Debug then
return
end
end
if inHuntingZone then
exports['ps-dispatch']:Hunting()
return
end
if witnesses and not isPedAWitness(witnesses, ped) then return end
if cache.vehicle then
exports['ps-dispatch']:VehicleShooting()
else
exports['ps-dispatch']:Shooting()
end
end)
end)
This code replacement will remove the dispatch notifications for gunshots in a paintball game.
Last updated