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: number the numeric entity id

  • offset: 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 solution

  • targetMessage: string Message displayed for users when using a target solution

  • input: number The control index (learn morearrow-up-right)

  • callback: function reference The function which will get executed after user interacts

  • canInteract?: function reference The function which will get executed to check whether the user can interact with the entity

  • meta?: table A table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functions

  • interactDist?: 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 zone

  • rotation: 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 solution

  • targetMessage: string Message displayed for users when using a target solution

  • input: number The control index (learn morearrow-up-right)

  • callback: function reference The function which will get executed after user interacts

  • canInteract?: function reference The function which will get executed to check whether the user can interact with the entity

  • meta?: table A table with any data you want to store on the interaction. This will be accessible in your callback and canInteract functions

  • interactDist?: 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 alert

  • jobs: table A table containing string names of the jobs which are going to receive the alert

  • message: string The message/title of the alert

  • description: string The long description of the alert

  • code: string a 10-code of the alert. (Default 10-35)

  • blip: table A table containing the following keys:

Example

Notifications

Sending a notification

  • message: string The notification message

  • type?: string enum ['success', 'warning', 'error'] - This defines the color of the notification

Last updated