👮
Five-O M
  • Five-O M
  • 💻Client
    • Server Callbacks
    • Progress Bars
    • Keypress
    • Notifications
    • Menus
    • Blips
    • Vehicles (to-do)
    • Peds (to-do)
    • Callouts (to-do)
    • Client Callbacks (to-do)
  • 💿Server
    • Server Callbacks
    • Client Callbacks (to-do)
Powered by GitBook
On this page
  1. Client

Server Callbacks

Allows for callbacks initiated from the client used to return information to a client from the server.

TriggerServerCallback(name, callback, ...)

Triggers a callback to the server. This callback must be registered on the server-side before it is called.

  • name* (string) - uniquely identifying name of the callback

  • callback* (function) - callback function

  • ... (any) - additional arguments to pass to the server

* = required arguments

Example (paired with the server-side example):

FOM.TriggerServerCallback('test', function(s, n)
    print(s)
    print(n)
end, 'hello', 'there')

See Server Callbacks on the server-side for registering a callback.

Reference: utils/cl_callback.lua

PreviousFive-O MNextProgress Bars

Last updated 2 years ago

💻