Exports · origen_garages
All exports are registered under the resource name origen_garages. Sections below split them by execution side.
Server-side exports
impoundVehicle(plate) → boolean
Sets a vehicle's state to IMPOUNDED in the framework's vehicle table.
exports['origen_garages']:impoundVehicle(plate)| Parameter | Type | Description |
|---|---|---|
plate | string | Vehicle license plate |
Example:
RegisterCommand('impound', function(source, args)
local plate = args[1]
if plate then
exports['origen_garages']:impoundVehicle(plate)
end
end, true)Client-side exports
openExternalGarage(id, coords)
Opens the garage UI for a garage with the given ID at custom coordinates. If the player is currently in a vehicle, it stores that vehicle into the garage instead of opening the retrieval UI.
exports['origen_garages']:openExternalGarage(id, coords)| Parameter | Type | Description |
|---|---|---|
id | number | Database ID of the garage to open |
coords | vector3 | nil | World coordinates used as the external spawn point |
Example — open a garage from an ox_target interaction:
exports['ox_target']:addBoxZone({
coords = vector3(100.0, 200.0, 30.0),
size = vector3(1.5, 1.5, 2.0),
options = {
{
label = 'Open Garage',
onSelect = function()
exports['origen_garages']:openExternalGarage(1, vector3(100.0, 200.0, 30.0))
end,
}
}
})impoundVehicle(plate) → boolean
Client-side wrapper — fires a server callback (origen_garages:cb:impoundVehicle) and awaits the result.
exports['origen_garages']:impoundVehicle(plate)| Parameter | Type | Description |
|---|---|---|
plate | string | Vehicle license plate |
toggleFurnitureMenu(state)
Opens or closes the furniture placement menu inside a garage interior.
exports['origen_garages']:toggleFurnitureMenu(state)| Parameter | Type | Description |
|---|---|---|
state | boolean | nil | true = open, false / nil = close |
startDragCam(entity, radiusOptions)
Starts the vehicle inspection camera on the given entity. The player can rotate the camera with the mouse, zoom with the scroll wheel and toggle doors with Space.
exports['origen_garages']:startDragCam(entity, radiusOptions)| Parameter | Type | Description |
|---|---|---|
entity | integer | Vehicle entity handle to inspect |
radiusOptions | table | nil | Optional camera settings (see below) |
radiusOptions fields:
| Field | Default | Description |
|---|---|---|
initial | 5.0 | Initial camera radius in meters |
min | 2.5 | Minimum zoom distance |
max | 10.0 | Maximum zoom distance |
scrollIncrements | 0.5 | Zoom step per scroll tick |
firstPersonEnabled | false | Allow toggling first-person view with V |
Example:
exports['origen_garages']:startDragCam(vehicle, {
initial = 6.0,
min = 4.5,
max = 8.0,
scrollIncrements = 0.3,
firstPersonEnabled = true,
})stopDragCam()
Stops the inspection camera, fades the screen, destroys the camera and the spawned vehicle entity, and returns focus to the NUI.
exports['origen_garages']:stopDragCam()