Skip to main content

Events

The script emits these events on both the client and the server so other resources can react to park-in / park-out. They are plain TriggerEvent calls, so use AddEventHandler (not RegisterNetEvent).

tip

Empty handler stubs already exist in client/handler.lua and server/handler.lua — both files are escrow-open, so you can add your own logic there directly if you prefer not to create a separate resource.

Client events

-- Fired locally after the player parked a vehicle in
AddEventHandler('msk_garage:vehicleParkedIn', function(vehicle, props, plate, fuel, garage)
end)

-- Fired locally after the player parked a vehicle out of a garage
AddEventHandler('msk_garage:vehicleParkedOut', function(vehicle, plate, fuel, props, garage)
end)

-- Fired locally after the player parked a vehicle out of an impound
AddEventHandler('msk_garage:vehicleParkedOutImpound', function(vehicle, plate, fuel, props, impound)
end)
ArgumentTypeDescription
vehiclenumberThe local vehicle entity handle
propstableESX vehicle properties
platestringThe vehicle plate
fuelnumberFuel level
garage / impoundtableThe resolved garage / impound definition
Argument order

Note the order differs slightly between vehicleParkedIn (vehicle, props, plate, fuel, …) and the two park-out events (vehicle, plate, fuel, props, …).

Server events

-- Fired after a vehicle was parked in
AddEventHandler('msk_garage:vehicleParkedIn', function(netId, plate, fuel, props, garage)
end)

-- Fired after a vehicle was parked out of a garage
AddEventHandler('msk_garage:vehicleParkedOut', function(netId, plate, fuel, props, garage)
end)

-- Fired after a vehicle was parked out of an impound
AddEventHandler('msk_garage:vehicleParkedOutImpound', function(netId, plate, fuel, props, impound)
end)
ArgumentTypeDescription
netIdnumberThe network id of the affected vehicle
platestringThe vehicle plate
fuelnumberFuel level
propstableVehicle properties
garage / impoundtableThe resolved garage / impound definition