baseevents:enteringVehicle
Context: server-side report of an entry attempt. Stock baseevents reports the sender’s local vehicle handle, seat, display name and network ID. This is not a completed entry or an authorization decision, and the reviewed implementation does not send a matching local client event.
Observe without granting anything
Start baseevents and put a listener in server.lua:
local entryAttempts = {}
AddEventHandler('baseevents:enteringVehicle', function(clientHandle, seat, displayName, netId)
local player = source
if type(netId) ~= 'number' or netId <= 0 or netId % 1 ~= 0 then return end
if type(seat) ~= 'number' or seat % 1 ~= 0 then return end
entryAttempts[player] = { netId = netId, observedAt = GetGameTimer() }
end)
AddEventHandler('baseevents:enteringAborted', function()
entryAttempts[source] = nil
end)
AddEventHandler('playerDropped', function()
entryAttempts[source] = nil
end)This stores at most one observation per reporting session. It is not a lock, alarm, payment trigger or trusted seat assignment. If later code uses the observation, expire it and validate current server state. The client-local first argument is not a server entity handle; see ID conversion.
Test starting an entry animation, cancelling it and disconnecting. The provider polls client state; do not expect every intermediate animation transition to become a server event. A seat value or valid network ID supplied by a client does not prove that the corresponding action happened.
Source: stock vehicle checker at the reviewed revision . Continue with completed entry or all stock contracts.