Stock-resource events and their execution context
Stock-resource events are supplied by resources, not guaranteed by every server framework. Start the provider and declare the dependency where needed. A replacement chat/spawn system can have a different lifecycle even if it uses a familiar resource name.
This directory covers the event subjects in the pinned upstream stock-resource manuals. The baseevents source was also reviewed because several old payload descriptions differ from the emitted code. A stock client’s report is not an authoritative permission, kill or reward transaction.
baseevents: death and vehicle notifications
| Event | Listener context in reviewed provider | Payload and guide |
|---|---|---|
baseevents:onPlayerDied | Local client and server report | killerType, deathCoords; death notification. |
baseevents:onPlayerKilled | Local client and server report | killerID, deathData; killer ID is a server ID when known, and emitted field names are lowercase. Exact fields. |
baseevents:onPlayerWasted | Legacy client/server fallback | Only deathCoords, not the same arguments as onPlayerDied. Fallback limits. |
baseevents:enteringVehicle | Server report | Client-local vehicle handle, seat, display name, network ID. Entry attempt. |
baseevents:enteringAborted | Server report | No payload arguments. Aborted entry. |
baseevents:enteredVehicle | Server report | Client-local handle, seat, display name, network ID. Entered vehicle. |
baseevents:leftVehicle | Server report | Client-local handle, seat, display name, network ID. Exit observation. |
The vehicle checker emits TriggerServerEvent, not a matching local TriggerEvent. A client listener alone therefore does not receive these vehicle notifications from the reviewed provider. The first handle cannot be passed straight to a server native. Resolve a documented network ID and corroborate it with current server state before doing anything consequential.
chat: presentation events and server routing
| Event | Context | Arguments and use |
|---|---|---|
chat:addMessage | Client display | message; use templateId for a previously registered template and template for inline template markup. Message guide. |
chat:addSuggestion | Client display | commandName, help, params; command names include /. Single suggestion. |
chat:addSuggestions | Client display | Array of {name, help, params}. Batch registration. |
chat:addTemplate | Client display | templateID, htmlString; only trusted static markup. Template guide. |
chat:removeSuggestion | Client display | commandName; removing a hint does not revoke command permission. Cleanup. |
chat:clear | Client display | No arguments; clears local displayed/sent history, not server logs. Clear command. |
chatMessage | Server local routing hook; deprecated client display | Server source, author, text; synchronous cancellation stops default routing, not already-written logs. Migration and context. |
Use chat exports or a targeted TriggerClientEvent from trusted server code to deliver a message. Do not make chatMessage network-safe merely to observe the local server routing hook. New slash commands belong in RegisterCommand, with ACE when restricted. The reviewed chat source establishes routing and template behavior.
mapmanager, sessionmanager and spawnmanager
| Event | Provider/context | Contract |
|---|---|---|
getMapDirectives | mapmanager, client | Receives add; register add(name, create, remove), not an anonymous one-argument map callback. Complete directive. |
onClientMapStart / onClientMapStop | mapmanager, client | Resource name; use idempotent presentation setup/teardown. Start, stop. |
onClientGameTypeStart / onClientGameTypeStop | mapmanager, client | Resource name; not proof every dependent asset is streamed. Start, stop. |
sessionInitialized | sessionmanager, client | No documented arguments. Session hook. |
playerActivated | sessionmanager, client | No documented arguments. Activation hook. |
playerSpawned | spawnmanager, client | Spawn-info object; can repeat on respawn. Spawn contract. |
The mapmanager stop hooks are dispatched during teardown, not a universal “all cleanup is finished” barrier. Session notifications also do not certify that framework character/inventory data is loaded. Listen to the actual framework’s documented lifecycle for those tasks. Use server events for authoritative session/bucket changes and client events for engine-level observation.