Esc to clear, Enter to open the best match, click an export to open it in its page
Reference
Client Events
Events whip_core fires on each player's game, about the local player. Listen with AddEventHandler; each payload is one table, named as on the server.
Loading and life
| Event | Payload | When |
|---|---|---|
| whip_core:onReady | { reason, resources? } | whip_core's client is ready for registrations (as on the server). Use Whip.register |
| whip_core:player:loaded | { source, charId, name, newCharacter, player } | The character is in the world and the picture is back. The safe "player is ready" hook: PlayerData and inventory are populated. Same table as the server's |
| whip_core:player:spawned | {} | Just put into the world. After every load, and again for a new character when the creator closes |
| whip_core:player:died | { reconnected, respawnRefused } | Died. reconnected: loaded in already dead. respawnRefused: a respawn came too soon, so the same death is back after a revived |
| whip_core:player:revived | { how } | 'revived' (where they lay) or 'respawned' (at a hospital) |
| whip_core:player:logout | { charId } | Logging out to character select |
| whip_core:appearance:modelChanged | {} | The ped was rebuilt with a new model (the load, /charedit). It starts with the default walk, clipset and face: put yours back here |
| whip_core:devtools:modeChanged | { on } | Developer mode on or off. Off at every join; HasDevTools() says where it is. For what only developers see; the server checks again |
| whip_core:permission:changed | { permission, granted } | This account gained or lost a permission. WHIP shows nothing: tell them yourself |
Jobs and the Director
| Event | Payload | When |
|---|---|---|
| whip_core:job:clockedOn / clockedOff | { jobId, key } | Went on or off duty |
| whip_core:job:listChanged | { jobs } | Hired, fired, promoted, a job renamed. jobs is what GetPlayerJobs returns |
| whip_core:run:joined / :updated | { runId, scenario, name, objective, countdown } | In a Director run / its objective or clock changed. Never a Test. GetPlayerScenarioRuns() returns the same |
| whip_core:run:left / :ended | { runId, scenario, name, why } / { runId, scenario, name, outcome, payout } | Left a run / it ended for them |
Screens and input
| Event | Payload | When |
|---|---|---|
| whip_core:ui:stateChanged | { open } | A screen or dialog opened (true), or all closed (false): IsAnyScreenOpen. A progress bar alone doesn't fire it |
| whip_core:ui:cleanScreen | { on } | The screen went clean for a recording (Camera Creator). Hide your UI while on |
| whip_core:hands:blocked | { label, only } | A BlockHands began. only: 'weapons', or nil for everything (which also runs the 'freeHands' moment). Put away what it covers |
| whip_core:hands:unblocked | {} | The last block went |
| whip_core:pad:deviceChanged | { pad } | Switched between keyboard and pad (settled over 400 ms); swap your button hints here. Also once at start (Controller support) |
| whip_core:keyboard:opened / :closed | { id, owner } / { id } | The on-screen keyboard (OpenKeyboard) came up / went. Leave the pad alone between them (Whip.padScreen does) |
| whip_core:nui:capsDetected | { chrome, has, colorMix, …, gameView } | The browser's capabilities are known or changed: the GetNuiCaps table |
| whip_core:ask:cancelled | { token } | whip_core gave up on a question (timeout, run end, logout). Take down your RegisterAskChannel screen |
World and vehicles
| Event | Payload | When |
|---|---|---|
| whip_core:zone:entered / :exited | { zoneId, key?, label, group } | Entered or left a zone. Match on key (the EnsureZone name), as on the server |
| whip_core:weather:layerChanged | { name, layer } | A local time/weather layer set (layer its settings) or removed (nil) |
| whip_core:vehicle:entered | { vehicleId, entity, plate, seat } | Got into any vehicle or changed seat. Driver: seat == -1, as on the server |
| whip_core:vehicle:exited | { vehicleId, entity, plate, seat } | Got out of any vehicle |
| whip_core:property:entered / :exited | { propertyId, name } | Walked into or out of a property (GetCurrentProperty follows) |
| whip_core:property:furnished | { propertyId, interiorId, count } | Its furniture is up on this client |
| whip_core:property:unfurnished | { propertyId, interiorId } | Taken away (walked off, interior unloaded or redrawn, furnisher opened) |
| whip_core:property:furnishStateChanged | { propertyId, interiorId, state } | GetInteriorFurnishState changed: 'pending', 'done', 'none' or 'idle'. interiorId nil until first ready |
WHIP's own network messages#
Names containing client: are messages from whip_core's server to its own client. They're not events for you: they reach only a resource that RegisterNetEvents them, their arguments change, and several fire at the start of something. Use the events above.
| Message | Arguments | When |
|---|---|---|
| whip_core:client:playerLoaded | serializedData | Loading is starting (serializedData.isNewCharacter on a first load). Use whip_core:player:loaded |
| whip_core:client:playerLogout | none | Back to character select. Use whip_core:player:logout |
| whip_core:client:updateCash | cashTotal | Cash changed |
| whip_core:client:inventoryUpdate | { inventory, weights } | Any inventory change |
| whip_core:client:vehicleLockState | vehicleId, locked | Lock toggled (players near the car) |
| whip_core:client:vehicleKeysSync | keysTable | Key cache updated |
| whip_core:client:notify | message, kind, duration | Every server toast. Use NotifyPlayer(source, text, kind), or return false, text in a SecureEvent |
| whip_core:client:groundItemCreated | data | Ground item spawned nearby |
| whip_core:client:groundItemDeleted | id | Ground item removed |
| whip_core:client:containerCreated | def | Container created |
| whip_core:client:containerDeleted | containerId | Container removed |
| whip_core:client:jobsSync | jobsTable | Job data on character load |
| whip_core:client:jobClockState | jobId, state | Clock state changed (true on) |