πŸ“–
Documentation
  • Welcome!
  • Common Issues
    • Keymaster
    • Updating resources
  • πŸ“„Scripts
    • πŸš™AdvancedParking
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Events (server)
      • Events (client)
      • FAQ
    • 🚚VehicleTransport
      • Installation
      • How to use it
      • Creating a new transport
      • Exports (client)
      • Events (server & client)
    • πŸ”‘VehicleKeyChain
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • FAQ
    • πŸ—œοΈVehicleClamp - Pre-Release
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Integration
        • ESX
        • QB
    • πŸ“„VehicleRegistration
      • Installation
      • Exports (server)
      • Exports (client)
    • πŸ“ƒVehicleInteraction
      • Installation
    • πŸ—ΊοΈVehicleTracker
      • Installation
      • Exports (server)
      • Exports (client)
    • 🌐JobTracker
      • Installation
    • πŸ•΅οΈβ€β™‚οΈVehicleForceFirstPerson
      • Installation
    • 🎯BulletRicochet
      • Installation
  • πŸ†“Free Scripts
    • πŸ“žkimi_callbacks
      • Installation
      • Exports (server)
      • Exports (client)
      • Examples
    • 🚜VehicleDeformation
      • Installation
      • Exports (server)
      • Exports (client)
    • 🎦OrbitCam
      • Installation
      • Exports (client)
      • Commands
    • πŸ”οΈEarthquakeSimulator
      • Installation
      • Exports (server)
      • Commands
    • πŸ’€DeathCam
      • Installation
Powered by GitBook
On this page
  1. Scripts
  2. VehicleTransport

Exports (client)

Enable

Enable/disable the ability to interact with the script functions for a single client.

Parameters: enable - bool - true to enable, false to disable

exports["VehicleTransport"]:Enable(false)

Example for ESX and enabling it for a single job:

First open the config.lua and set the option defaultEnabled to false. This will disable the script for everyone. After that you can enable the script via code:

RegisterNetEvent("esx:playerLoaded", function(xPlayer)
    ESX.PlayerData = xPlayer

    if (ESX.PlayerData.job.name == "mechanic") then
        exports["VehicleTransport"]:Enable(true)
    end
end)

RegisterNetEvent("esx:setJob", function(job)
    exports["VehicleTransport"]:Enable(job.name == "mechanic")

    ESX.PlayerData.job = job
end)
PreviousCreating a new transportNextEvents (server & client)

Last updated 9 months ago

πŸ“„
🚚