Commands & Exports
This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.
Commands
This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.
/mdv
Alternate command to /dv, this removes the closest car and sends it to impound.
/mdvall
Command that sends all OUT cars to impound.
/repairvehicle
Repair the nearby vehicle or the one you are currently sitting on.
/addJobVehicle
Add the car you are in to a job garage.
/deleteJobVehicle
Remove the work vehicle from a certain garage.
/creategaragemenu
Command to create garages, you must have the specific job.
/garagemenu
Command to modify the garage, only if you own the garage where you are.
/impound
Command to send cars to an impound, have the specific job.
/givecar [id] [model] [plate]
Command that will send a car to the selected player.
/giveboat [id] [model] [plate]
Command that will send a boat to the selected player.
/giveplane [id] [model] [plate]
Command that will send a plane to the selected player.
/garagecreator
Command to open the garage creation menu
/garagedecorate
Open the decoration options inside the personal garages
/garagefurniture
Open the in-game furniture creator
/migratev5
Migrate the database from version v4 to v5 (only console)
Client Exports
This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.
CreateGarage
The CreateGarage export allows you to create a new garage dynamically from any script. You can define whether it is public or private, set its type (vehicle, boat, plane), configure its interaction points, assign shells, and set a price. This is ideal for servers that require full control over garage creation without modifying base files.
How to Use
To create a new garage in-game, use the following code:
OpenGarageMenu
The OpenGarageMenu export allows you to open the garage menu for any specific garage by using its unique identifier. This is useful for scripts, commands, or custom interactions where you want to manually trigger the garage UI for a player.
How to Use
To open a specific garage menu, use the following code:
RepairSpecificVehicle
The RepairSpecificVehicle export allows you to repair a specific vehicle by specifying its plate. This is useful for targeted vehicle repairs, ensuring that only the intended vehicle is fixed.
How to Use
To repair a specific vehicle, use the following code:
This export takes the plate of the vehicle as an argument. Use it in your scripts to repair vehicles based on their unique plate identifiers, ensuring accurate maintenance and gameplay logic.
RepairNearestVehicle
The RepairNearestVehicle export allows you to repair the nearest vehicle to the player. This is ideal for quick repairs without needing to specify a vehicle plate.
How to Use
To repair the nearest vehicle, use the following code:
This export does not require any parameters. It automatically identifies and repairs the closest vehicle to the player, making it a convenient solution for general vehicle maintenance scenarios.
ImpoundVehicle
The ImpoundVehicle export allows you to send the nearest vehicle to an impound directly from the client side. This is useful for managing abandoned or illegally parked vehicles in a streamlined way.
How to Use
To impound the nearest vehicle, use the following code:
This export requires no additional parameters. It identifies the closest vehicle to the player and moves it to the impound, ensuring efficient handling of vehicles in the game environment.
Server Exports
This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.
impound
The impound export allows you to impound a specific vehicle by providing its license plate. This is particularly useful for server-side scripts or administrative actions that require targeting a particular vehicle.
How to Use
To impound a vehicle by its plate, use the following code:
This export requires the vehicle's license plate as an argument and will send the targeted vehicle to the impound. Use this feature for precise vehicle management and enforcement.
GiveVehicle
The GiveVehicle export is used to manually spawn and assign a vehicle to a player, either with a custom license plate or a randomly generated one. This export is typically used in administrative tools, staff menus, or scripted rewards that provide vehicles to players directly.
How to Use
To give a vehicle to a player, use the following code:
To use a random plate, just omit the plate:
Parameters
'playerId': The target player's server ID.'vehicleModel': The spawn name of the vehicle (e.g.,"sultan").'plate'(optional): Custom license plate (can include multiple parts).'vehicle': Type of entity — must be"vehicle","plane"or"boat".
This export is ideal for admin tools, vehicle rewards, or staff menus.
RepairNearestVehicle
The RepairNearestVehicle export allows you to repair the nearest vehicle to the player. This is ideal for quick repairs without needing to specify a vehicle plate.
How to Use
To repair the nearest vehicle, use the following code:
This export does not require any parameters. It automatically identifies and repairs the closest vehicle to the player, making it a convenient solution for general vehicle maintenance scenarios.
SpawnVehicle
The SpawnVehicle export allows you to spawn a vehicle programmatically with persistence while ensuring it matches the server's vehicle data. This is useful for scenarios where vehicles need to be spawned externally but still retain their database-linked attributes.
How to Use
To spawn a vehicle with persistence, use the following code:
Explanation of Parameters
id: Unique ID of the vehicle from the database (e.g.,player_vehicle > column id).owner: The player's identifier (Steam, Discord, etc.).vType: Type of vehicle, such asvehicle,boat, orplane.coords: Coordinates and heading where the vehicle will spawn.props: Vehicle modifications or properties retrieved from the database.source: Player's server source ID.warp: Boolean to decide if the player spawns directly inside the vehicle.
This export ensures that the spawned vehicle integrates seamlessly with the persistence system and retains all database-defined characteristics.
setVehicleToPersistent
The setVehicleToPersistent export allows you to assign persistence to a vehicle spawned externally from your server's vehicle shops or other spawning systems. This ensures that the vehicle remains active within the advanced garage system.
How to Use
To set a vehicle as persistent, use the following code:
This export is particularly useful for integrating third-party vehicle shops or custom spawn systems into the Quasar Advanced Garages persistence framework. It ensures that any externally spawned vehicle behaves as if it were managed directly by the garage system, including saving and tracking its state.
removeVehicleFromPersistent
The removeVehicleFromPersistent export is used to remove the persistence of one or more vehicles. This is particularly helpful when vehicles need to be removed from the map after specific native events or when they no longer need to be tracked by the garage system.
How to Use
To remove persistence, use the following code:
This export requires one or more license plate strings as arguments. Once called, the specified vehicles will no longer be managed by the persistence system and can be removed from the map without returning automatically. This is useful for administrative purposes or specific gameplay scenarios.
updateVehiclePlate
The updateVehiclePlate export is designed to change the license plate of a vehicle dynamically. This is particularly useful for integrating with custom assets or systems that allow players to modify vehicle plates.
How to Use
To update a vehicle's license plate, use the following code:
Example
Here is an example of how you might implement this functionality with a command:
Explanation
The export requires two parameters:
plate: The current license plate of the vehicle (string).
newPlate: The new license plate to assign to the vehicle (string).
Once executed, the garage system will instantly recognize the new plate, ensuring seamless integration with persistence systems and preventing conflicts with other assets.
updatePersistentVehicleProps
The updatePersistentVehicleProps export allows you to dynamically update the stored properties of a persisted vehicle in your garage system. This is especially useful when applying changes such as model, modifications, or metadata without needing to respawn the vehicle or edit the database manually.
How to Use
To update a persisted vehicle’s properties, use the following syntax:
This will search for the vehicle with plate "PLATE" and update its stored model to "t20".
Example Usage
Here is an example of how you might implement this functionality with a command:
Explanation
plate(string): The current plate of the vehicle to be updated.props(table): A table of properties to be updated (e.g.,model,engineHealth,mods, etc.).