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.
Last updated
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.
Last updated
This command will display the standalone tablet UI if you have set the "Config.TabletItemName" to false in the shared/config.lua file
/truckertablet
This command will toggle the CB radio on/off only if you have set "Config.CBRadioEnable" to true in the shared/config.lua 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 shared/config.lua file in the F8 console.
/gettraileroffset
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