Exports · origen_zones
All exports are registered under the resource name origen_zones.
Client-side exports
playerInZone() → boolean
Returns true if the local player is currently inside any active zone, false otherwise.
lua
exports['origen_zones']:playerInZone()Example — prevent an action while inside a zone:
lua
RegisterCommand('myAction', function()
if exports['origen_zones']:playerInZone() then
-- player is inside a zone, block the action
return
end
-- proceed with the action
end, false)Example — check from another resource before spawning a vehicle:
lua
if not exports['origen_zones']:playerInZone() then
-- safe to spawn
endThis export reflects the current zone state on the client. It returns true for both safezone and redzone types — it does not distinguish between them.