OrigenNetwork
Docs

Exports · origen_races

All exports are registered under the resource name origen_races and run client-side.


Client-side exports

IsPlayerInRace()boolean

Returns true if the local player is currently in an active race session.

lua
local inRace = exports['origen_races']:IsPlayerInRace()

Example — prevent opening a menu while in a race:

lua
if exports['origen_races']:IsPlayerInRace() then
    -- player is racing, block action
    return
end

isInrace()boolean

Returns true if the local player is actively racing (in-track). This is a lower-level check that reflects the in-track racing state specifically, as opposed to IsPlayerInRace which covers the full session.

lua
local racing = exports['origen_races']:isInrace()