Client
Personal Menu
Opens the key menu for the vehicles owned by the player.
| Parameter | Type | Description |
|---|---|---|
| plate | string | The license plate of the vehicle. |
| onClose | function | Function to execute when the menu is closed. |
- Code
- Example
- Images
-- Open Keys Menu
Vehicles.VehicleKeysMenu()
-- Open Keys Menu with specific plate
Vehicles.VehicleKeysMenu(plate, onClose)
-- All player vehicles
Vehicles.VehicleKeysMenu()
-- Specific plate
Vehicles.VehicleKeysMenu('MONO 420', function()
print('On Close menu')
end)

HasKeysClient
Checks if the player has the keys / also checks if he has access to the vehicle.
| Parameter | Type | Description |
|---|---|---|
| entity | numer |
- Code
Vehicles.HasKeyClient(entity)
AddTemporalVehicleClient
Sets the entity under mVehicle control, allowing the player to open/close the doors or turn on/off the engine.
| Parameter | Type | Description |
|---|---|---|
| entity | numer |
- Code
Vehicles.AddTemporalVehicleClient(entity)
-- export
exports.mVehicle.AddTemporalVehicleClient(entity)
ItemCarKeysClient
Adds or removes a key from the inventory.
| Parameter | Type | Description |
|---|---|---|
| action | string | 'delete' or 'add' |
| plate | string | The license plate of the vehicle. |
- Code
- Example
-- With shared import
Vehicles.ItemCarKeysClient(action, plate)
-- or
exports.mVehicle:ItemCarKeysClient(action, plate)
-- With shared import
Vehicles.ItemCarKeysClient('add', 'RAWPAPER')
-- or
exports.mVehicle:ItemCarKeysClient('delete', 'RAWPAPER')
GetVehicleLabel
Gets the label from a vehicle model, such as 'Karin Sultan'.
| Parameter | Type | Description |
|---|---|---|
| model | string/integer | The model of the vehicle. |
| return | string | Returns a text composed of the vehicle name and make, if it is an invalid model it will return 'Unknown'. |
- Code
- Example
Vehicles.GetVehicleLabel(model)
-- or
exports.mVehicle:GetVehicleLabel(model)
local VehicleLabel = exports.mVehicle:GetVehicleLabel('sultan')
print(VehicleLabel) -- VehicleLabel = 'Karin Sultan'
SetEngineSound
Set engine sound, if the vehicle exists in the database it will be saved in the metadata
| Parameter | Type | Description |
|---|---|---|
| entity | number | Vehicle Entity |
| soundName | string | Sound Name |
- Code
exports.mVehicle:SetEngineSound(entity, soundName)