πŸ“–
Documentation
  • Welcome!
  • Common Issues
    • Keymaster
    • Updating resources
  • πŸ“„Scripts
    • πŸš™AdvancedParking
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Events (server)
      • Events (client)
      • FAQ
    • 🚚VehicleTransport
      • Installation
      • How to use it
      • Creating a new transport
      • Exports (client)
      • Events (server & client)
    • πŸ”‘VehicleKeyChain
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • FAQ
    • πŸ—œοΈVehicleClamp - Pre-Release
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Integration
        • ESX
        • QB
    • πŸ“„VehicleRegistration
      • Installation
      • Exports (server)
      • Exports (client)
    • πŸ“ƒVehicleInteraction
      • Installation
    • πŸ—ΊοΈVehicleTracker
      • Installation
      • Exports (server)
      • Exports (client)
    • 🌐JobTracker
      • Installation
    • πŸ•΅οΈβ€β™‚οΈVehicleForceFirstPerson
      • Installation
    • 🎯BulletRicochet
      • Installation
  • πŸ†“Free Scripts
    • πŸ“žkimi_callbacks
      • Installation
      • Exports (server)
      • Exports (client)
      • Examples
    • 🚜VehicleDeformation
      • Installation
      • Exports (server)
      • Exports (client)
    • 🎦OrbitCam
      • Installation
      • Exports (client)
      • Commands
    • πŸ”οΈEarthquakeSimulator
      • Installation
      • Exports (server)
      • Commands
    • πŸ’€DeathCam
      • Installation
Powered by GitBook
On this page
  • Register(callbackName, callbackHandler)
  • Remove(callbackName)
  • Trigger(callbackName, ...)
  • TriggerWithTimeout(name, timeout, ...)
  • TriggerAsync(callbackName, handler, ...)
  • TriggerWithTimeoutAsync(name, timeout, callback, ...)
  1. Free Scripts
  2. kimi_callbacks

Exports (client)

Register(callbackName, callbackHandler)

Registers a callback on client side. The server can then call this callback to request data from a client.

Parameters: callbackName - string - The name of the callback to register (must be unique!). callbackHandler - function - The function to be executed that will return your values.


Remove(callbackName)

Removes a callback from client side.

Parameters: callbackName - string - The name of the callback you want to remove.


Trigger(callbackName, ...)

Triggers a (blocking) server callback with a default timeout of 5000ms.

Parameters: callbackName - string - The name of the callback to execute. ... - ? - The values you need to send to the server for the callback to work.

Returns: ... - Any values returned from the server callback.


TriggerWithTimeout(name, timeout, ...)

Triggers a (blocking) server callback with a specified timeout.

Parameters: callbackName - string - The name of the callback to execute. timeout - number - The timeout in milliseconds. ... - ? - The values you need to send to the server for the callback to work.

Returns: ... - Any values returned from the server callback.


TriggerAsync(callbackName, handler, ...)

Triggers a server callback with a default timeout of 5000ms and executes a callback function.

Parameters: callbackName - string - The name of the callback to execute. handler - function - The function to execute after the callback succeeded. It's parameters are the return values from the callback. ... - ? - The values you need to send to the server for the callback to work.


TriggerWithTimeoutAsync(name, timeout, callback, ...)

Triggers a server callback with a specified timeout and executes a callback function.

Parameters: callbackName - string - The name of the callback to execute. timeout - number - The timeout in milliseconds. handler - function - The function to execute after the callback succeeded. It's parameters are the return values from the callback. ... - ? - The values you need to send to the server for the callback to work.

PreviousExports (server)NextExamples

Last updated 9 months ago

πŸ†“
πŸ“ž