vms* store - Docs
Purchase Asset
  • Welcome
  • Official Store
  • Discord
  • Helpful
    • Basic Server Knowledge
      • How to import SQL to database?
      • How to update server artifacts?
    • General Issues
    • Prepared Resources
  • ASSETS
    • vms_notifyV2
      • Installation
      • FAQ
      • Guides
        • Text Formatting
        • Swap in framework
      • Developer API
        • Client Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.js
    • vms_bossmenu
      • Installation
      • Compatibility
      • FAQ
      • Guides
        • Creating job2 on ESX
        • Paychecks Integration
      • Developer API
        • Client Exports
        • Client Events
        • Server Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_cityhall
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • License Revocation
        • Personal Taxes Integration
        • Business Taxes Integration
        • Paychecks Integration
        • Add SSN Generation
        • Generate SSN for Players
        • Add VIN Generation
        • Generate VIN for Vehicles
      • Developer API
        • Client Exports
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.shared.lua
        • config.clerks.lua
        • config.taxes.lua
        • config.js
    • vms_documentsV2
      • Installation
      • FAQ
      • Common Errors
      • Guides
        • Add SSN Generation
        • Generate SSN for Players
        • Creating New Document
        • Driving School Integration
      • Developer API
        • Client Exports
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • metadata.js
    • vms_garagesV2
      • Installation
      • Compatibility
        • Housings
          • qs-housing
          • esx_property
          • bcs_housing
        • Phones
          • yflip-phone
          • qs-smartphone-pro
        • Other
          • VehicleDeformation
          • kq_wheeldamage
      • FAQ
      • Common Errors
      • Guides
        • Interior Stuck Prevention
        • Registering House Garage
      • Developer API
        • Client Exports
        • Server Exports
        • Server Events
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.garages.lua
        • config.management.lua
        • config.parkingcreator.lua
        • config.js
    • vms_houserobberies
      • Installation
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.items.lua
        • config.interiors.lua
        • config.houseslist.lua
        • config.configurator.lua
    • vms_vehicleshopV2
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • Adjusting Required Licenses
        • Adjusting orderprice
        • Photos Tool
      • Developer API
        • Client Exports
        • Client Events
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
        • config.showroom.lua
        • config.js
    • vms_stores
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.camera.lua
        • config.robbery.lua
        • config.storemanage.lua
        • config.js
    • vms_reports
      • Installation
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.js
    • vms_tuning
      • Installation
      • FAQ
      • Common Errors
      • Guides
        • Garage Integration
          • jg-advancedgarages
        • Understanding Prices
        • Using whitelist & blacklist
        • Fix tuning parts names from NULL
        • Paychecks from the built-in balance
      • Developer API
        • Client Exports
        • Server Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.vehicles.lua
        • config.tuningmenu.lua
        • config.installationparts.lua
        • config.custommods.lua
        • config.missions.lua
    • vms_gym
      • Installation
      • FAQ
      • Common Errors
      • Developer API
        • Client Exports
        • Server Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
    • vms_hud
      • Installation
      • FAQ
      • Common Errors
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.js
    • vms_spawnselector
      • Installation
      • Compatibility
        • vms_multichars
        • esx_multicharacter
        • esx_identity
        • qb-multicharacter
      • FAQ
      • Developer API
        • Client Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_guidebook
      • Installation
      • Guides
        • Text Formating
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • pages.js
    • vms_coinshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_vehicleshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_gangmissions
      • Installation
      • Guides
        • Connection to NPCTALK
      • Configuration Files
        • config.lua
    • vms_charcreator
      • Installation
      • Compatibility
        • vms_multichars
        • esx_multicharacter
        • esx_identity
        • qb-multicharacter
        • ZSX_Multicharacter
        • renzu_multicharacter
      • FAQ
      • Developer API
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
    • vms_clothestore
      • Installation
      • Compatibilty
      • Common Errors
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • config.prices.lua
        • config.js
    • vms_multichars
      • Installation
      • Compatibilty
      • Common Errors
      • Developer API
        • Commands
      • Configuration Files
        • config.lua
        • config_client.lua
        • config_server.lua
        • config_commands.lua
    • vms_identity
      • Installation
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
    • vms_barber
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
    • vms_tattooshop
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • New ADD-ON Tattoos
      • Developer API
        • Client Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
        • config.tattoos.lua
    • vms_driveschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_boatschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.routes.lua
    • vms_flightschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.routes.lua
    • vms_documents
      • Installation
      • Guides
        • Adding to radialmenu
        • Usage of documents
        • Adding new documents
      • Configuration Files
        • config.lua
    • vms_anims
      • Installation
      • Guides
        • Adding animations
        • Adding more binds
      • Developer API
        • Client Exports
      • Configuration Files
        • config.lua
        • animations.lua
        • keybinds.lua
    • vms_weaponshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_notify
      • Installation
      • Guides
        • Implementation
        • Replace core notifications
Powered by GitBook
On this page
  • towVehicle
  • giveVehicle
  • updateParkedVehiclePlate
  • isInInterior
  • getCompanyMoney
  • addCompanyMoney
  • removeCompanyMoney
  • getGarageInfo
  • registerHousingGarage
  • refreshVehicles

Was this helpful?

  1. ASSETS
  2. vms_garagesV2
  3. Developer API

Server Exports

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 towed
exports["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 export
exports["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 player
local 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 table
local amount = exports["vms_garagesv2"]: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 Earned
exports["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 safe
exports["vms_garagesv2"]:removeCompanyMoney(parkingId, amount)

getGarageInfo

Information about the garage such as the label and coordinates

---@param {garageId: string}: garageId is the key of the garages table
local label, coords = exports["vms_garagesv2"]:getGarageInfo(garageId)

registerHousingGarage

Registers the garage assigned to a specific property in the housing system. The function automatically creates a garage file in the CREATED_PARKINGS folder, making the garage immediately available.

---@param {garageId: string | number}: The unique identifier of the garage - used as the file name and as the key in the `Config.HousingGarages` table, e.g., `"nolag_property-UNIQUE_ID"`.
---@param {label: string}: The label displayed to the player when interacting with the garage.
---@param {housingId: string | number}: The ID of the housing unit associated with the garage. It should match the ID used by the housing system.
---@param {coords: vector3}: The coordinates of the garage entry point - typically defined as part of the house's interaction point.
---@param {garageInterior: number | nil}: The ID of the garage interior, taken from `Config.ParkingCreator.HouseGarageInteriors`. Defaults to `1` if the specified ID is not found.
exports["vms_garagesv2"]:registerHousingGarage(
    garageId,
    label,
    housingId,
    coords,
    garageInterior
)
Example Usage
RegisterNetEvent('qb-houses:server:addGarage')
AddEventHandler('qb-houses:server:addGarage', function(name, coords)
    local name, coords = name, coords
    if name and coords and coords.x then
        CreateThread(function()
            exports["vms_garagesv2"]:registerHousingGarage(
                'qs-housing-' .. name,                            --[[ File name - Garage ID will always be as "HouseGarage:nolag_property-ID" ]]
                'Garage',                                         --[[ Garage Label ]]
                name,                                             --[[ Housing ID ]]
                vector4(coords.x, coords.y, coords.z, coords.h),  --[[ Coordinates ]]
                1                                                 --[[ Garage Interior ID (Config.ParkingCreator.HouseGarageInteriors) ]]
            )
        end)
    end
end)

refreshVehicles

Refresh all vehicles based on the current database data in the specified parking lot.

---@param {garageId: string}: garageId is the key of the garages table
exports["vms_garagesv2"]:refreshVehicles(garageId)

Last updated 15 days ago

Was this helpful?