Extentions
Our script provides a way to extend the functionality of the script. This can be done by editing the ext.lua
file in the client
or server
folder with the following code snippet:
Notify
AddEventHandler("Trusted:Trucker:Client:Notify", function(message, type, duration)
--- implement extention code
end)
- message:
string
(the message to display) - type:
"error"|"warning"|"success"
- duration:
number
(the duration of the notification)
Truck Spawned
AddEventHandler('Trusted:Trucker:Client:TruckSpawned', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the truck) - route:
string
(the route name)
Goods Loaded
AddEventHandler('Trusted:Trucker:Client:GoodsLoaded', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the truck) - route:
string
(the route name)
Goods Unloaded
AddEventHandler('Trusted:Trucker:Client:GoodsUnloaded', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the truck) - route:
string
(the route name)
Truck Deleted
AddEventHandler('Trusted:Trucker:Client:TruckDeleted', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the truck) - route:
string
(the route name)
Trailer Spawned
AddEventHandler('Trusted:Trucker:Client:TrailerSpawned', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the trailer) - route:
string
(the route name)
Trailer Deleted
AddEventHandler('Trusted:Trucker:Client:TrailerDeleted', function(entity, route)
--- implement code here
end)
- entity:
number
(the entity of the trailer) - route:
string
(the route name)