Skip to Content
ReferenceStock Resource Events

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

EventListener context in reviewed providerPayload and guide
baseevents:onPlayerDiedLocal client and server reportkillerType, deathCoords; death notification.
baseevents:onPlayerKilledLocal client and server reportkillerID, deathData; killer ID is a server ID when known, and emitted field names are lowercase. Exact fields.
baseevents:onPlayerWastedLegacy client/server fallbackOnly deathCoords, not the same arguments as onPlayerDied. Fallback limits.
baseevents:enteringVehicleServer reportClient-local vehicle handle, seat, display name, network ID. Entry attempt.
baseevents:enteringAbortedServer reportNo payload arguments. Aborted entry.
baseevents:enteredVehicleServer reportClient-local handle, seat, display name, network ID. Entered vehicle.
baseevents:leftVehicleServer reportClient-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

EventContextArguments and use
chat:addMessageClient displaymessage; use templateId for a previously registered template and template for inline template markup. Message guide.
chat:addSuggestionClient displaycommandName, help, params; command names include /. Single suggestion.
chat:addSuggestionsClient displayArray of {name, help, params}. Batch registration.
chat:addTemplateClient displaytemplateID, htmlString; only trusted static markup. Template guide.
chat:removeSuggestionClient displaycommandName; removing a hint does not revoke command permission. Cleanup.
chat:clearClient displayNo arguments; clears local displayed/sent history, not server logs. Clear command.
chatMessageServer local routing hook; deprecated client displayServer 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

EventProvider/contextContract
getMapDirectivesmapmanager, clientReceives add; register add(name, create, remove), not an anonymous one-argument map callback. Complete directive.
onClientMapStart / onClientMapStopmapmanager, clientResource name; use idempotent presentation setup/teardown. Start, stop.
onClientGameTypeStart / onClientGameTypeStopmapmanager, clientResource name; not proof every dependent asset is streamed. Start, stop.
sessionInitializedsessionmanager, clientNo documented arguments. Session hook.
playerActivatedsessionmanager, clientNo documented arguments. Activation hook.
playerSpawnedspawnmanager, clientSpawn-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.