Garage
This page provides all integration and configuration details for developers using the locked ocean_garage resource. Since the script is locked, only the configuration structure, exports, and integration usage are documented.
Dependencies
- oxmysql
- ocean-core
- ox_lib (locale system used)
Ensure these resources start before ocean_garage:
Configuration
The main configuration is located in:
General Settings
Config.impoundPrice
Defines the price a player must pay to retrieve an impounded vehicle.
| Setting | Type | Description |
|---|---|---|
| impoundPrice | number | Cost to retrieve an impounded vehicle |
Blip Configuration
Blips are predefined and reused across garages.
Car Blip
Boat Blip
Aircraft Blip
Blip Fields
| Field | Type | Description |
|---|---|---|
| text | string | Blip display name |
| id | number | Blip sprite ID |
| color | number | Blip color |
| scale | number | Blip size |
Garage Types
The system supports three vehicle garage types:
- Car garages
- Boat garages
- Aircraft garages
Each garage follows the same structure.
Car Garages
Defined in:
Example:
Fields
| Field | Type | Description |
|---|---|---|
| name | string | Garage name |
| type | string | Vehicle type |
| spawnMarker | vector3 | Location to take vehicles out |
| storeMarker | vector3 | Location to store vehicles |
| blip | table / nil | Map blip configuration |
| spawnPoints | table | Vehicle spawn positions |
Boat Garages
Defined in:
Example structure:
Structure is identical to car garages.
Aircraft Garages
Defined in:
Example:
Same structure as other garage types.
Spawn Points
Spawn points determine where vehicles appear when retrieved.
Format:
| Value | Description |
|---|---|
| X | Position X |
| Y | Position Y |
| Z | Position Z |
| Heading | Vehicle rotation |
Multiple spawnpoints can be added:
The script will automatically use available spots.
Adding a New Garage
Example to add within config.lua:
Integration Notes
- Vehicles automatically save state when stored
- Garage availability is controlled by config
- Blips are optional (set to nil to hide)
- Multiple spawnpoints prevent vehicle collisions
- Supports any framework compatible with Ocean Core
Best Practices
- Always add at least 2 spawnpoints for busy garages
- Avoid overlapping spawnpoints
- Use blips only for public garages
- Keep private garages without blips
- Use correct vehicle type (car / boat / airplane)
Summary
Ocean Garage provides:
- Multi-type vehicle storage
- Config-based garage system
- Unlimited garage locations
- Automatic vehicle spawning
- Impound system support
- Framework independence
Developer Notes
This resource is configuration driven. All garage logic is handled internally.
You only need to:
- Add garages
- Configure spawnpoints
- Adjust impound price
No internal modification is required.