From c60894600ecd09dfec82e655ff5a56108b7a6f72 Mon Sep 17 00:00:00 2001 From: Maximus7474 <94017712+Maximus7474@users.noreply.github.com> Date: Wed, 28 Jan 2026 19:42:03 +0100 Subject: [PATCH] feat(ox_core/events): client metadata update & logout event refactor(ox_core/events): player metadata event --- pages/ox_core/Events/client.mdx | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/pages/ox_core/Events/client.mdx b/pages/ox_core/Events/client.mdx index 3a611ad4b..287fe40d5 100644 --- a/pages/ox_core/Events/client.mdx +++ b/pages/ox_core/Events/client.mdx @@ -30,6 +30,55 @@ When a character is loaded * playerId: `number` * isNew?: `boolean` +## ox:playerLogout + +When a character is logged out + + + + ```lua copy + AddEventHandler('ox:playerLogout', function() + print('Log out received') + end) + ``` + + + ```ts copy + on('ox:playerLogout', () => { + console.log('Log out received'); + }); + ``` + + + +## ox:player:\ + +These events are all triggered when using [`OxPlayer.set`](/ox_core/Classes/Server/OxPlayer#oxplayerset) with the replicatd flag. +These can be used as a parallel system compared to statebags where the data is only known by the server & concerned client. + +For example, when a players active group is updated it will trigger the `ox:player:activeGroup` event. Parameters: + + + + ```lua copy + RegisterNetEvent('ox:player:activeGroup', function(newActiveGroup) + print(newActiveGroup) + end) + ``` + + * newActiveGroup: `string` | `nil` + + + ```ts copy + onNet('ox:player:activeGroup', (newActiveGroup: string | null) => { + console.log(newActiveGroup); + }); + ``` + + * newActiveGroup: `string` | `null` + + + ## ox:statusTick On each status tick, returning changed statuses