G[S]cripts
  • G[S]cripts Documentation
  • FiveM/RedM Asset Escrow
  • Trucking Job
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
      • server/edit.lua
  • Advanced Trailers
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
  • Motorhomes
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
      • client/framework/*lua
      • server/framework/*.lua
  • Moonshining
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
  • Bank Robbery
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
      • editable/server.lua
  • GANG WARS
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
      • editable/server.lua
    • Exports
Powered by GitBook
On this page
  • Commands
  • Exports
  1. Trucking Job

Commands & Exports

There's currently a few commands that serve some importance and two of them may or may not be disabled unless your configuration permits them.

PreviousInstallationNextAdvanced Configuration

Last updated 3 months ago


Commands

This command will display the standalone tablet UI if you have set the "Config.TabletItemName" to false in the file

/truckertablet

This command will toggle the CB radio on/off only if you have set "Config.CBRadioEnable" to true in the file

/cbradio

This command will look for the closest trailer and calculate the offset & rotation from your ped (or vehicle if you're sitting on one) to that trailer. It will print the required format for use in the file in the F8 console.

/gettraileroffset

Exports

The following client export will return the ID of the job a player is actively on, or false if they are not on any job

exports["gs-trucking"]:IsJobActive()

This export will return information about the players current job

--- @return table | nil {name = string, description = string, departure = vector3, destination = vector3 | nil}

local CurrentJob = exports['gs-trucking']:JobInfo()

if CurrentJob then
    print('Job Name:', CurrentJob.name)
    print('Job Description:', CurrentJob.description)
    print('Job Departure:', CurrentJob.departure)
    if CurrentJob.destination then
        print('Job Destination:', CurrentJob.destination)
    end
end
shared/config.lua
shared/config.lua
shared/config.lua