Client Exports

generatePlate

Generating a license plate, you can use this export in your other resources in which you need to give a different license plate than the one generated by GTA by default. Export will return the license plate string

---@param plateFormat: You can use the option to enter a custom format, but you can also leave the generation of the license plate according to the specified format in config vms_vehicleshopV2.

exports['vms_vehicleshopV2']:generatePlate(plateFormat)
Explanation

Some resources require an export to generate plates, as this export should also verify the license plates in the database so that they do not duplicate.

For example, esx_policejob uses the generatePlate export from esx_vehicleshop, then replace it with the following export.

Example usage

Generate a random license plate with a specific format

local plate = exports['vms_vehicleshopV2']:generatePlate('11 XXX11')
print('My custom format generated plate:', plate)

-- The results will be random, e.g. "24 AGE49" / "53 KDF93" / "95 JDS14"
-- But the results will always follow the predefined format.

Generate random license plate with format from vms_vehicleshopV2

local plate = exports['vms_vehicleshopV2']:generatePlate()
print('My generated plate:', plate)

openShowroom

Opening the showroom menu

---@param {id: string or nil}: Dealership ID or don't give ID, then it will detect the current area of the dealership you are in

exports['vms_vehicleshopv2']:openShowroom(id)

Last updated

Was this helpful?