⬅️Exports

Explore our selection of exports that enhance your resource functionality.

We offer a selection of exports to enhance your resource functionality, with ongoing expansion plans to accommodate even more features based on your valuable input. Feel free to share your suggestions with us.

General Exports

SERVER-SIDED

When called, returns a 17 character string VIN. Ensures it doesn't exist already in database.

local vin = exports['realisticVehicleSystem']:vinCreator()

CLIENT-SIDED

When called, fixes the specific part.

exports['realisticVehicleSystem']:fixPart("engine", 1000.00, false)

Read more here:

👨‍🔧Mechanic Integration

CLIENT-SIDED

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)

CLIENT-SIDED

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)
end

SHARED-SIDED

When called, returns a boolean value (true/false) if the vehicle is impounded.

Example:

local isImpounded = exports['realisticVehicleSystem']:IsVehicleImpounded(plate)

CLIENT-SIDED

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)
end

Security Integration Exports

CLIENT-SIDED

When called, returns the Security.EventPrefix variable. Requires the resource calling it.

local eventPrefix = exports['realisticVehicleSystem']:GetEventPrefix(GetCurrentResourceName())

Read More Here:

🛡️Security Integration

Extras Exports

CLIENT-SIDED

When called, returns at minimum 1 value, and a maximum of 3 values.

  1. A boolean value (true/false) if the player is inside any polyzone.

  2. PolyZone type ("garage-public" - "garage-private-outside" - "garage-private-inside" - "impound-retrieve" - "impound-unlock" - "insurance")

  3. 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)
end

Last updated

Was this helpful?