Nass Scripts
  • Nass Scripts
  • 📚nass_lib
    • Dependencies
    • Changelog
    • Config
  • Scripts
    • 💰Serverstore
    • 🎵Music Player
      • Dependencies
      • Installation
      • Changelog
      • Config
    • 👮Bossmenu
      • Dependencies
      • Installation
      • Changelog
      • Exports
        • Server Exports
      • Config
      • Common Issues
    • 💵Billing
      • Dependencies
      • Installation
      • Changelog
      • Exports
        • Server Exports
      • Config
      • Common Issues
    • 🔫Paintball
      • Dependencies
      • Installation
      • Changelog
      • Exports
        • Client Exports
      • Config
      • Common Issues
    • 💡Neons
      • Installation
      • Changelog
      • Exports
        • Client Exports
      • Config
    • 🏎️Dragstrips
      • Dependencies
      • Installation
      • Changelog
      • Config
Powered by GitBook
On this page
  1. Scripts
  2. Paintball
  3. Exports

Client Exports

inHTML
exports.nass_paintball:inHTML()

This export returns true if the lobby selector UI is open.

inGame
exports.nass_paintball:inGame()

This export returns true if the current player is in a paintball game.

isSpectating
exports.nass_paintball:isSpectating()

This export returns true if the player is currently spectating a paintball game.


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.

PreviousExportsNextConfig

Last updated 2 months ago

🔫