Exports
Explore our selection of exports that enhance your resource functionality.
General Exports
Section titled “General Exports”When called, returns a 17 character string VIN. Ensures it doesn’t exist already in database.
local vin = exports['realisticVehicleSystem']:vinCreator()When called, returns a plate. Ensures it doesn’t exist already in database.
local vin = exports['realisticVehicleSystem']:plateCreator()When called, returns the full list of properties the vehicles has.
local mods = exports['realisticVehicleSystem']:GetVehicleProperties(vehicle)When called, returns the full vehicle list that has been loaded from the database.
local carList = exports['realisticVehicleSystem']:getVehicleList()When called, returns the specific vehicle from the vehicle list. Requires the plate of the vehicle.
local vehicleInfo = exports['realisticVehicleSystem']:getVehicleListDataWithPlate(plate)Vehicle Parts Related Exports
Section titled “Vehicle Parts Related Exports”When called, fixes the specific part.
exports['realisticVehicleSystem']:fixPart("engine", 1000.00, false)Read more here:
When called, returns an array of the vehicle’s parts. Requires the plate of the vehicle.
local array = exports['realisticVehicleSystem']:getVehiclePartsArray(plate)Read More Here:
When called, returns an array of the vehicle’s deformation. Requires vehicle entity ID.
local deformation = exports['realisticVehicleSystem']:GetVehicleDeformation(vehicle)When called, sets the vehicle’s deformation. Requires vehicle entity ID and deformation array.
exports['realisticVehicleSystem']:SetVehicleDeformation(vehicle, deformation)When called, fixes the vehicle’s deformation. Requires vehicle entity ID.
exports['realisticVehicleSystem']:FixVehicleDeformation(vehicle)Locksystem Related Exports
Section titled “Locksystem Related Exports”When called, gives the player keys for the vehicle with matching plate until a server restart. Requires a plate.
Ensure the plate of the vehicle does not have spaces in between or at prefix/suffix, or this will not work!exports['realisticVehicleSystem']:giveVehicleKeysExtra(plate)When called, returns a boolean (true/false) value if the player has keys for the specified vehicle. Requires a plate.
exports['realisticVehicleSystem']:DoesPlayerHaveKeys(plate)Garage Related Exports
Section titled “Garage Related Exports”When called, stores the vehicle in garage, requires garage ID and plate.
Example:
local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideGaragePoly and polyType == "garage-public")then exports['realisticVehicleSystem']:StoreVehicleInGarage(garageID, PLATE)endWhen called, opens the garage UI form. Requires garage ID.
Example:
local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideGaragePoly and polyType == "garage-public")then exports['realisticVehicleSystem']:SetupGarageForm(garageID)endImpound Related Exports
Section titled “Impound Related Exports”When called, returns a boolean value (true/false) if the vehicle is impounded.
Example:
local isImpounded = exports['realisticVehicleSystem']:IsVehicleImpounded(plate)When called, opens the impound UI form. Requires impound ID.
Example:
local isPlayerInsideImpoundPoly, polyType, impoundID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideImpoundPoly and polyType == "impound-retrieve")then exports['realisticVehicleSystem']:SetupImpoundForm(impoundID)endWhen called, opens the impound lock UI form. Requires impound lock ID.
Example:
local isPlayerInsideImpoundPoly, polyType, impoundID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideImpoundPoly and polyType == "impound-unlock")then exports['realisticVehicleSystem']:SetupImpoundLockForm(impoundID)endInsurance Related Exports
Section titled “Insurance Related Exports”When called, opens the insurance UI form. Requires insurance ID.
Example:
local isPlayerInsideInsurancePoly, polyType, insuranceID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideInsurancePoly and polyType == "insurance")then exports['realisticVehicleSystem']:SetupInsuranceLockForm(insuranceID)endSecurity Integration Exports
Section titled “Security Integration Exports”When called, returns the Security.EventPrefix variable. Requires the resource calling it.
local eventPrefix = exports['realisticVehicleSystem']:GetEventPrefix(GetCurrentResourceName())Read More Here:
When called, returns the event code for the specified server event within TCVS. Requires the resource calling it and the server event name. Look at the following example:
local security = GetEventCode(GetCurrentResourceName(), GetEventPrefix(GetCurrentResourceName()) .. ":server:payImpound")TriggerServerEvent(Security.EventPrefix .. ":server:payImpound", security, data, localisedImpoundID, location)Read more here:
Extras Exports
Section titled “Extras Exports”When called, returns at minimum 1 value, and a maximum of 3 values.
- A boolean value (true/false) if the player is inside any polyzone.
- PolyZone type (“garage-public” - “garage-private-outside” - “garage-private-inside” - “impound-retrieve” - “impound-unlock” - “insurance”)
- ID of the polyzone, differentiates depending on what is the PolyZone type.
Example:
local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
if(isPlayerInsideGaragePoly and polyType == "garage-public")then exports['realisticVehicleSystem']:StoreVehicleInGarage(garageID, PLATE)endWhen called, requires a plate, and returns an array of the vehicle specified vehicle. For better understanding rather than me explaining with words here’s the code.

Example:
local vehState = exports['realisticVehicleSystem']:GetLocation(plate)
if(vehState ~= nil)then if(vehState.state == "exploded")then print("vehicle has been exploded, last known location: " .. json.encode(vehState.position)) elseif(vehState.state == "outside")then print("vehicle is currently outside, location: " .. json.encode(vehState.position)) endend