cobalt_garages
Garages and the impound.
ImpoundVehicle
ServerSends an owned vehicle to the default impound; true when it was impounded.
exports.cobalt_garages:ImpoundVehicle(plate, reason, fee, by)| Parameter | Type | Optional | Description |
|---|---|---|---|
plate | string | No | |
reason | string | Yes | default 'Impounded' |
fee | integer | Yes | default from config |
by | string | Yes | default 'City' |
| Returns | Description |
|---|---|
boolean |
local ok = exports.cobalt_garages:ImpoundVehicle(
'COBALT01',
'Parking in a red zone',
250,
'ABC12345'
)SpawnVehicle
ServerSpawns an owned vehicle that is out of its garage (state = 0) at coords, seats its owner source in it with keys and tracks it like a garage takeout. Returns the entity, or nil when the row is not out, belongs to someone else, is already in the world or failed to spawn.
exports.cobalt_garages:SpawnVehicle(source, plate, coords, vehicleType)| Parameter | Type | Optional | Description |
|---|---|---|---|
source | integer | No | |
plate | string | No | |
coords | vector4 | No | |
vehicleType | string | Yes | default 'automobile', used when the vehicle has never been parked |
| Returns | Description |
|---|---|
integer? |
local value = exports.cobalt_garages:SpawnVehicle(
source,
'COBALT01',
vector4(215.8, -810.1, 30.7, 90.0),
'vehicleType'
)