Below are all the useful exports that you can use in other resources, be sure to read their descriptions.
towVehicle
Towing the vehicle
---@param {*netId: number}: Vehicle ID or Network ID of entity---@param {*plate: string}: License plate number---@param {*impoundId: string}: Impound ID (by default are 'Impound1'/'ImpoundBoat'/'ImpoundPlane'/'ImpoundHeli'/'ImpoundPolice')
---@param {fine: string}: Towing fine title [Not required]---@param {fine_amount: number}: Towing fine amount [Not required]---@param {*towedBy: string}: Name of who towedexports["vms_garagesv2"]:towVehicle( netId, plate, impoundId, fine, fine_amount, towedBy)
giveVehicle
Adding vehicles using export, application for example admin menu.
After adding, the vehicle will go to the impound matching for the selected type.
---@param {source: number or nil}: ID of the player using export or nil---@param {owner: number or string}: vehicle owner - player id or job name for company---@param {type: string}: vehicle/boat/plane/helicopter (it must be a key from Config.VehicleTypes)---@param {model: string}: model name of vehicle---@param {plate: string}: license plate (Max 8 characters, special characters cannot be used!)exports["vms_garagesv2"]:giveVehicle( source, owner,type, model, plate)
updateParkedVehiclePlate
Export possible to an external resource for changing license plates. This export will be needed to update the current plates if the vehicle is currently parked.
---@param {lastPlate: string}: the current plate of the vehicle you want to change---@param {newPlate: string}: new vehicle plate to be set up---@param {updateSQL: boolean}: if you also want to update the properties and plate column with this exportexports["vms_garagesv2"]:updateParkedVehiclePlate(lastPlate, newPlate, updateSQL)
isInInterior
Export to check if player is currently in any underground garage interiors.
---@param {source: number}: ID of the playerlocal garageName, outsideCoords = exports["vms_garagesv2"]:isInInterior(source)---@return{garageName: string}: Id of the garage the player is currently in---@return{outsideCoords: vector4}: Coordinates outside the interior
getCompanyMoney
With this export, you can see how much money is in the parking safe.
-- @param {parkingId: string}: parkingId is the key of the garages tablelocal amount = exports["vms_tuning"]:getCompanyMoney(parkingId)
addCompanyMoney
With this export you can add money to the parking safe.
---@param {parkingId: string}: parkingId is the key of the garages table---@param {amount: number}: the amount to be added to the parking safe---@param {addToTotalEarning: boolean}: Is the added money to be included in Total Earnedexports["vms_garagesv2"]:addCompanyMoney(parkingId, amount, addToTotalEarned)
removeCompanyMoney
With this export you can remove money from the parking safe.
---@param {parkingId: string}: parkingId is the key of the garages table---@param {amount: number}: the amount to be removed from the parking safeexports["vms_tuning"]:removeCompanyMoney(parkingId, amount)
Server Events
Below are all the useful events that you can use in other resources, be sure to read their descriptions.
vms_garagesv2:openAgreement
If you don't want to use the command for opening a vehicle sales agreement, you can use this event to register an usable item.