Skip to main content

Client

Personal Menu​

Opens the key menu for the vehicles owned by the player.

ParameterTypeDescription
platestringThe license plate of the vehicle.
onClosefunctionFunction to execute when the menu is closed.
-- Open Keys Menu
Vehicles.VehicleKeysMenu()
-- Open Keys Menu with specific plate
Vehicles.VehicleKeysMenu(plate, onClose)

HasKeysClient​

Checks if the player has the keys / also checks if he has access to the vehicle.

ParameterTypeDescription
entitynumer
Vehicles.HasKeyClient(entity)

AddTemporalVehicleClient​

Sets the entity under mVehicle control, allowing the player to open/close the doors or turn on/off the engine.

ParameterTypeDescription
entitynumer
Vehicles.AddTemporalVehicleClient(entity) 
-- export
exports.mVehicle.AddTemporalVehicleClient(entity)

ItemCarKeysClient​

Adds or removes a key from the inventory.

ParameterTypeDescription
actionstring'delete' or 'add'
platestringThe license plate of the vehicle.
-- With shared import
Vehicles.ItemCarKeysClient(action, plate)

-- or
exports.mVehicle:ItemCarKeysClient(action, plate)

GetVehicleLabel​

Gets the label from a vehicle model, such as 'Karin Sultan'.

ParameterTypeDescription
modelstring/integerThe model of the vehicle.
returnstringReturns a text composed of the vehicle name and make, if it is an invalid model it will return 'Unknown'.
Vehicles.GetVehicleLabel(model) 
-- or
exports.mVehicle:GetVehicleLabel(model)

SetEngineSound​

Set engine sound, if the vehicle exists in the database it will be saved in the metadata

ParameterTypeDescription
entitynumberVehicle Entity
soundNamestringSound Name
  exports.mVehicle:SetEngineSound(entity, soundName)