opx_infinityteleports
Server
Last updated on
The teleports contract on the server — entrances, the job gate and trip counters.
local teleports = OPX.Api.Get('teleports')From server code inside opx_infinity. Every function answers a Result and does not yield.
Entrances
The entrances in the player's current bucket, each marked allowed or refused for them. Refused ones are left out when DENIED = 'hidden'.
teleports.Entrances(source)Parameters
- source:
number
Returns
Result—{ bucket, entrances }- entrances:
{ key, leg, label, x, y, z, allowed, error?, reason? }[]
- entrances:
IsAllowed
Job gate only (no position check).
teleports.IsAllowed(source, key, leg)Parameters
- source:
number - key:
string— the pad key - leg:
string—'out'or'back'
Returns
Result—{ key, leg, label }; errors as the job gate
local gate = teleports.IsAllowed(source, 'roof', 'out')
if not gate.ok then print(gate.error) endState
Configured pads and trip counters since start.
teleports.State()Returns
Result—{ count, points }- points:
{ [key] = { label, bucket, twoWay, gated, taken, refused, lost } }
- points: