Alerts
Customize the client side alerts to fit the look and feel of your own server
-- 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,
description = msg,
icon = "fas fa-truck",
duration = timeout,
position = "top",
})
endHelp Message
This is the default GTA help message. It is only shown if the targeting config is set to false
-- Purpose: Function to display a help text notification.
-- text [string]: Text to display in the notification
function HelpText(text)
SetTextComponentFormat("STRING")
AddTextComponentString(text)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
endPermissions
Various functions that be configured to work with whatever you use to check locks, ownership, permissions... whatever you decide.
This function will check to see if someone can attach the vehicle they are in to the trailer upon pressing the keybind. I have already included an export for the trucking job to see if a player is on an active job, since that resource has its own attachment mechanics
This function checks to see if someone can use the trailer they are targeting
This function is used to check if the player has permission to be "warped" into the vehicle when using the menu system listing the cars on the trailer
On Attached
This function is triggered when a player attaches a vehicle to the trailer. You can execute things such as turning off the engine, locking the doors, etc.
On Detach
This function is triggered when a player detaches a vehicle from the trailer. You can execute things such as turning on the engine.
Vehicle Info
This is where you can manipulate the vehicle name data that is displayed in the target systems menu when displaying a list of vehicles on the trailer
Last updated