Client
These exports can be only called on the client side of your scripts.
Interactions
Entity interaction
exports.kq_link.AddInteractionEntity(
entity,
offset,
message,
targetMessage,
input,
callback,
canInteract,
meta,
interactDist,
icon
): Interaction<object> entity:
numberthe numeric entity idoffset:
vector3A vector of offsets for the entity interaction (only applicable when not using target)message:
stringMessage displayed for users when using non-target solutiontargetMessage:
stringMessage displayed for users when using a target solutioninput:
numberThe control index (learn more)callback:
function referenceThe function which will get executed after user interactscanInteract?:
function referenceThe function which will get executed to check whether the user can interact with the entitymeta?:
tableA table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functionsinteractDist?:
numberThe max distance at which players can interact (default 2.0)icon?:
stringA font-awesome icon used for the target systems. "fas fa-hand" e.g.
Example
Zone Interaction
coords:
vector3The coordinates of the center of the zonerotation:
vector3The rotation of the zone (used for target)scale:
vector3The scale of the zone (used for target)message:
stringMessage displayed for users when using non-target solutiontargetMessage:
stringMessage displayed for users when using a target solutioninput:
numberThe control index (learn more)callback:
function referenceThe function which will get executed after user interactscanInteract?:
function referenceThe function which will get executed to check whether the user can interact with the entitymeta?:
tableA table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functionsinteractDist?:
numberThe max distance at which players can interact (default 2.0)icon?:
stringA 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:
vector3The coordinates of the dispatch alertjobs:
tableA table containing string names of the jobs which are going to receive the alertmessage:
stringThe message/title of the alertdescription:
stringThe long description of the alertcode:
stringa 10-code of the alert. (Default 10-35)blip:
tableA table containing the following keys:sprite:
integerThe id of a blip sprite (See more https://docs.fivem.net/docs/game-references/blips/)color:
integerThe id of a blip colorscale:
floatThe scale of the bliptext:
stringThe name of the blip visible in the legendflash:
booleanwhether the blip should be flashing on the map
Example
Notifications
Sending a notification
message:
stringThe notification messagetype?:
stringenum ['success', 'warning', 'error'] - This defines the color of the notification
Last updated