opx_infinityteleports
Events
Last updated on
Network and local events of the teleports module.
opx:net:teleports:ask
Client → server. Asks for the entrance list. Sent at start, every POLL_MS, and after a job refusal. One per player per second is answered.
TriggerServerEvent('opx:net:teleports:ask')opx:net:teleports:use
Client → server. Take this pad in this direction. No coordinates are sent.
TriggerServerEvent('opx:net:teleports:use', key, leg)- key:
string - leg:
string—'out'or'back'
opx:net:teleports:sync
Server → client. The list for the player's bucket, as in Entrances.
RegisterNetEvent('opx:net:teleports:sync', function(data) end)- data:
table—{ entrances = { … } }
opx:net:teleports:answer
Server → client. The verdict after the move finished.
RegisterNetEvent('opx:net:teleports:answer', function(key, leg, ok, code, labelOrReason) end)- key:
string - leg:
string - ok:
boolean - code?:
string - labelOrReason?:
string— on success the destination label; on refusal the pad'sREASON, if any
opx:on:teleports:decision
Client, local. Every verdict, local refusals included. Only reaches code inside opx_infinity's client VM.
AddEventHandler('opx:on:teleports:decision', function(decision) end)- decision:
table—{ source, key?, leg?, ok, error? }