Skip to main content

Events

Client events​

wasabi_pausemenu:updateWeather​

Updates the weather shown in the pause menu UI.

TriggerEvent('wasabi_pausemenu:updateWeather', 'EXTRASUNNY')

The weather module localizes the value by looking for a locale key named weather_<lowercase weather>. For example, EXTRASUNNY uses weather_extrasunny.

If the matching locale key is missing, it falls back to weather_extrasunny.

note

The event ignores calls with an invoking resource. It is intended for local/client-side weather updates inside the player client context.

wasabi_pausemenu:playerLoaded​

Internal client event fired by the active framework bridge when player data is loaded.

The playtime module listens for this event and starts the playtime loop.

Supported weather update sources​

The weather module also listens for common weather systems:

SourceHook
vSyncvSync:updateWeather
qb-weathersyncqb-weathersync:client:SyncWeather
Renewed-Weathersyncplayer syncWeather state bag
cd_easytimeglobal weather state bag
GlobalState weatherGlobalState.weather.weather during initial load

Server events​

wasabi_pausemenu:disconnect​

Internal server event used by the built-in disconnect action.

TriggerServerEvent('wasabi_pausemenu:disconnect')

The server handler drops the player with:

You have disconnected from the server.
warning

This event disconnects the calling player. Avoid triggering it from unrelated resources unless that is intentional.

wasabi_pausemenu:syncTimePlayed​

Internal server event used by the playtime module.

The client sends a table like:

{
days = 0,
hours = 1,
minutes = 30,
}

The server writes it into the wasabi_playtime table for the player's framework identifier.

Server callbacks​

wasabi_pausemenu:getTimePlayed​

ox_lib callback used by the client playtime module to fetch saved time played.

Returns:

{ days = 0, hours = 0, minutes = 0 }

when no saved playtime exists or no identifier is available.