Client
These exports can be only called on the client side of your scripts.
Interactions
Entity interaction
entity:
number
the numeric entity idoffset:
vector3
A vector of offsets for the entity interaction (only applicable when not using target)message:
string
Message displayed for users when using non-target solutiontargetMessage:
string
Message displayed for users when using a target solutioninput:
number
The control index (learn more)callback:
function reference
The function which will get executed after user interactscanInteract?:
function reference
The function which will get executed to check whether the user can interact with the entitymeta?:
table
A table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functionsinteractDist?:
number
The max distance at which players can interact (default 2.0)icon?:
string
A font-awesome icon used for the target systems. "fas fa-hand" e.g.
Example
Zone Interaction
coords:
vector3
The coordinates of the center of the zonerotation:
vector3
The rotation of the zone (used for target)scale:
vector3
The scale of the zone (used for target)message:
string
Message displayed for users when using non-target solutiontargetMessage:
string
Message displayed for users when using a target solutioninput:
number
The control index (learn more)callback:
function reference
The function which will get executed after user interactscanInteract?:
function reference
The function which will get executed to check whether the user can interact with the entitymeta?:
table
A table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functionsinteractDist?:
number
The max distance at which players can interact (default 2.0)icon?:
string
A font-awesome icon used for the target systems. "fas fa-hand" e.g.
Example
Interaction functions
The interaction contains many useful functions which can be used to retrieve or set variables
Dispatch
Sending a simple dispatch message
The data needs to be sent as a table containing the following values:
coords:
vector3
The coordinates of the dispatch alertjobs:
table
A table containing string names of the jobs which are going to receive the alertmessage:
string
The message/title of the alertdescription:
string
The long description of the alertcode:
string
a 10-code of the alert. (Default 10-35)blip:
table
A table containing the following keys:sprite:
integer
The id of a blip sprite (See more https://docs.fivem.net/docs/game-references/blips/)color:
integer
The id of a blip colorscale:
float
The scale of the bliptext:
string
The name of the blip visible in the legendflash:
boolean
whether the blip should be flashing on the map
Example
Notifications
Sending a notification
message:
string
The notification messagetype?:
string
enum ['success', 'warning', 'error'] - This defines the color of the notification
Last updated