Downtown Chronicles
LibraryModulesCallbacks

Get

synchronous cross-side callback (blocks until remote returns).

lib.callbacks.get(name, ...)

Blocks until the remote handler finishes (Citizen.Await internally). Returns: unpacked values from the remote handler.

You are on the server calling a client-registered callback. The first argument must be the target client’s source (number); remaining args go to the client handler (which does not receive source again).

local coords = lib.callbacks.get('getCoords', source)

You are on the client calling a server-registered callback. Pass only the payload — do not pass source (the server handler still receives source as its first argument).

local ping = lib.callbacks.get('getPing')

See also: await · register