Alert
Alert function triggered whenever an alert even happens. You can customize this to fit your needs
-- Purpose: Edit functions, events, and vars for the client side of the Big Rig job.
-- msg [string]: Message to display in the notification
-- type [string]: Type of notification to display
-- timeout [int]: Time in milliseconds to display the notification
function Alert(msg, type, timeout)
lib.notify({
type = type,
title = locale('job_name'),
description = msg,
icon = "fas fa-truck",
duration = timeout,
position = "top",
})
endHelp Text
This is the function triggered to display the classic help text in the top left of the screen. More frequently used in thread loops with informational messages, and/or keybind messages
Vehicle Spawned
This is triggered whenever a vehicle has been spawned. You can add framework specific functions such as adding fuel, setting doorlock keys, etc. I have already included some pre configured exports and events, but you can customize to your needs.
Vehicle Despawn
This function is called before a car is deleted. You can use this when your framework requires specific actions to be performed when a vehicle is deleted such as removing keys from a players inventory
Worker Ped Spawned
Sure I could have added this with the ped spawn function, but maybe someone wants to do something differently with the work ped. This is where you do it!
Ped Spawned
This is triggered after peds are spawned such as cattle on the cattle job, the auto pilot ped for the cargobob, and anything else you configure to require a ped.
Dispatch
This is triggered when an illegal load is ready to move to the drop off. You can configure this to fit your own dispatch system on your server.
CB Radio
Connect and disconnect functions for the CB radios. You can configure these to use whatever resource you server uses for voice.
Last updated