NexureNexure
Racing SystemIntegrationsEvents

Server

React to key race lifecycle hooks emitted by Nexure Racing.

Tap into these events to log state changes, sync external systems, or trigger framework-specific logic.

nx_racing:server:raceCreated

Internal Event

Emitted by Nexure Racing. Do not trigger it yourself.

AddEventHandler('nx_racing:server:raceCreated', function(raceData)
  -- inspect raceData
end)
FieldTypeDescription
raceIdstringUnique race identifier.
trackIdstringTrack identifier.
lapsnumberLap count.
startTimenumberUnix timestamp for the scheduled start.
phasingOnbooleanWhether phasing starts enabled.
phasingTimenumberInitial phasing duration (seconds).
buyInnumberEntry fee.
camerastring"unset" or "first".
classnumberAllowed vehicle class.

Use this hook to log upcoming races or notify Discord bots that a lobby opened.

nx_racing:server:raceStarted

Internal Event

This event is produced by Nexure Racing. Never emit it manually.

AddEventHandler('nx_racing:server:raceStarted', function(raceData)
  -- handle raceData
end)
FieldTypeDescription
raceIdstringRace identifier.
raceTypestring"timeTrial", "circuit", or "sprint".
trackIdstringTrack identifier.
trackNamestringTrack name.
trackTypestring"circuit" or "sprint".
trackLapsnumberLap count (circuit only).
racerCountnumberPlayers in the grid.
racersany[]Player source list.
classnumberAllowed vehicle class.
moneyPrizenumberPrize pool.
phasingOnbooleanPhasing enabled.
phasingTimenumberPhasing duration (seconds).
camerastring"unset" or "first".

React here to broadcast notifications or enforce racing-only restrictions.

nx_racing:server:raceFinished

Internal Event

Consume this event to track race completions; never emit it manually.

AddEventHandler('nx_racing:server:raceFinished', function(raceData)
  -- distribute rewards, log stats, etc.
end)
FieldTypeDescription
raceIdnumberUnique race identifier.
raceTypestring"ranked" or "unranked".
trackIdnumberTrack identifier.
trackNamestringTrack name.
trackTypestring"circuit" or "sprint".
trackLapsnumberLaps when applicable.
racerCountnumberParticipants.
racersarrayPer-racer data (source, name, time, vehicle, class, position, dnf).
raceLengthnumberDuration in milliseconds.
raceDistancenumberTotal distance in meters.
classnumberVehicle class index.
moneyPrizenumberPrize pool.
phasingOnbooleanWhether phasing ran.
phasingTimenumberPhasing duration in milliseconds.
camerastring"unset" or "first".

Great for payouts, leaderboard tracking, or analytics pipelines.

On this page