Home › Documentation › Exports · origen_races
All exports are registered under the resource name origen_races and run client-side.
IsPlayerInRace() → booleanReturns true if the local player is currently in an active race session.
local inRace = exports['origen_races']:IsPlayerInRace()Example — prevent opening a menu while in a race:
if exports['origen_races']:IsPlayerInRace() then
-- player is racing, block action
return
endisInrace() → booleanReturns 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.
local racing = exports['origen_races']:isInrace()