Eventos
Server

Server Events

⚠️

These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.

ox:savedPlayers

When players are saved to the database.

function(playersSaved: number)

ox:setActiveGroup

When the active group of a character has changed.

function(playerId: number, groupName: string)

ox:setGroup

When a character is added or removed from a group.

function(playerId: number, groupName: string, grade?: number)

ox:licenseAdded

When a character receives a new license.

function(playerId: number, licenseName: string)

ox:licenseRemoved

When a character's license is removed.

function(playerId: number, licenseName: string)

ox:playerLogout

When a player logs out from their current character, crashes, or otherwise disconnects from the server.

function(playerId: number, userId: number, charId: number)

ox:createdCharacter

When a player has created a new character.

function(playerId: number, userId: number, charId: number)

ox:playerLoaded

When a player selects and loads a character.

function(playerId: number, userId: number, charId: number)

ox:deletedCharacter

When a character is deleted.

function(playerId: number, userId: number, charId: number)

ox:savedVehicles

When vehicles are saved to the database.

function(vehiclesSaved: number)

ox:spawnedVehicle

When a OxVehicle has spawned.

function(entityId: number, id: number)