Events
Last updated on
Network and local events of the garages module.
opx:net:garages:ask
Client → server. Asks for the points of the caller's bucket. Sent at start and every POLL_MS. One per player per second is answered.
TriggerServerEvent('opx:net:garages:ask')opx:net:garages:sync
Server → client. The points of the player's bucket. The client reads it on a thread (ten points per resume) and swaps it in a few frames later, whole.
RegisterNetEvent('opx:net:garages:sync', function(payload) end)- payload:
table—{ spots }- each spot:
key, label, kind, x, y, z, heading, bucket, garage, role, location
- each spot:
opx:net:garages:list
Client → server. Asks for the list behind a menu point, or behind the entry point on foot. Counts against the request window.
TriggerServerEvent('opx:net:garages:list', key)- key:
string
opx:net:garages:vehicles
Server → client. The list for a menu point (same shape as server List).
RegisterNetEvent('opx:net:garages:vehicles', function(list) end)- list:
table—{ spot, garage, label, kind, vehicles }or{ spot, error }
opx:net:garages:request
Client → server. The key at an entry point while seated (put away), or a row picked in the list. Runs Use. Cooldown COOLDOWN_MS plus the request window.
TriggerServerEvent('opx:net:garages:request', key, plate)- key:
string - plate?:
string
opx:net:garages:answer
Server → client. The verdict.
RegisterNetEvent('opx:net:garages:answer', function(key, ok, error, plate, action) end)- key?:
string— the key asked about, only if it names a known spot or garage; otherwisenil - ok:
boolean - error?:
string - plate?:
string - action?:
string—brought,recalledorstored
opx:on:garages:decision
Client, local. Every verdict, local refusals included. Only handlers inside opx_infinity's client hear it.
AddEventHandler('opx:on:garages:decision', function(verdict) end)- verdict:
table—{ ok, error?, spot?, plate?, action?, queued?, closed?, source }source:key,menu,server,clientor the caller'sorigin