A drop-in replacement for baseevents, built on ox_lib.
Every event name, argument order and payload shape matches baseevents, so existing resources keep working unchanged. The manifest declares provide 'baseevents', so anything with dependency 'baseevents' is satisfied by this resource.
- Add
ox_libto your server if you do not already run it. - Stop baseevents. In
server.cfg, replaceensure baseeventswithensure fivemevents— running both duplicates every event.
Client and server:
| Event | Arguments |
|---|---|
baseevents:onPlayerDied |
killerType, position |
baseevents:onPlayerKilled |
killerServerId, data |
data contains killertype, weaponhash, killerinveh, killervehseat, killervehname, killerpos.
Server only:
| Event | Arguments |
|---|---|
baseevents:enteringVehicle |
vehicle, seat, modelName, netId |
baseevents:enteredVehicle |
vehicle, seat, modelName, netId |
baseevents:leftVehicle |
vehicle, seat, modelName, netId |
baseevents:enteringAborted |
– |
vehicle is the sending client's entity handle and is meaningless on the server — use netId.
baseevents:onPlayerWasted is registered so other resources can trigger and listen to it, but this
resource never emits it. Neither does baseevents: its guard requires hasBeenDead to be false at a
point where the same tick has already set it to true, so no consumer has ever received it.
baseevents runs two Wait(0) threads, so both loops tick every frame for the lifetime of the
session. Here, death state is polled at a fixed interval, vehicle occupancy rides on the cache
ox_lib already maintains, and the only remaining poll — vehicle entry attempts, which have no event
equivalent — backs off to idlePollInterval whenever the player is seated or dead. Intervals live
in config.lua, alongside the debugEnabled toggle that logs every event this resource emits.
Behaviour that was broken upstream and is corrected here:
killerinveh,killervehnameandkillervehseatare populated. baseevents compares a boolean native result against1, which is never true in Lua, so those fields were alwaysfalse,''and0.- A player warped straight from one vehicle to another gets a
leftVehicle/enteredVehiclepair. baseevents missed the transition and kept reporting the first vehicle until the player got out.