Keys/Chat/Events/Exports
Key Binds
You can modify or disable these keys in the Keys and Commands section of the
[configs/config.lua]
.Ensure you understand how Key Mapping works.
Key
Description
E
Open the outside quick garage.
H
Enter the inside garage.
G
Store your vehicle.
E
Hotwire a vehicle.
M
Toggle vehicle lock.
Chat Commands
You can rename or disable these chat commands in the Keys and Commands section of the
[configs/config.lua]
.
Command
Description
/impound
Impound system to impound a vehicle.
/transfervehicle
Transfer system to transfer a vehicle to another player.
/checkmiles
Check the mileage of the vehicle you are in.
/garagespace
Players with defined jobs can sell garage slots to other players.
/garagespacecheck
Check how many garage spaces you have.
/vehicle-add
(Staff only) Add the vehicle you are currently sat inside to a player's garage.
/vehicle-delete
(Staff only) Delete the vehicle you are currently sat inside from the database.
/vehicle-plate
(Staff only) Change the plate of the vehicle you are currently sat inside.
/vehicle-keys
(Staff only) Give yourself keys to the vehicle you are currently sat inside.
/privategarage
Players with defined jobs can create and sell private garages to players.
/removefakeplate
Remove a fake plate from the closest vehicle.
/givekey
Give temporary keys (keys delete after server restart) to to the closest player to the closest vehicle.
/givekeysave
Give saved keys (keys save in database) to to the closest player to the closest vehicle.
/removekey
Open the keys UI to remove keys you have given out to other players.
/vehlock
Toggle vehicle lock.
/lockpick
Start lockpicking the closest vehicle.
Events
These events are entirely optional and can be used as needed.
Mileage
TriggerEvent('cd_garage:checkmileage')
Impound Vehicle
TriggerEvent('cd_garage:ImpoundVehicle')
Transfer Vehicle
TriggerEvent('cd_garage:TransferVehicle', playerid)
Vehicle Lock
TriggerEvent('cd_garage:ToggleVehicleLock')
Update Garage Type
TriggerEvent('cd_garage:UpdateGarageType')
Impound Vehicle Directly Through code
TriggerEvent('cd_garage:ImpoundVehicle:Direct', {
plate = plate, -- string, the vehicle's plate.
impound = impound, -- number, the ImpoundID from the Config.ImpoundLocations.
props = props, -- table, the vehicles props.
time = time, -- number, the time the vehicle was impounded.
description = description, -- string, the description of why the vehicle was impounded.
canretrive = canretrive, -- boolean, if the vehicle can be retrieved from the impound by the owner.
vehicle = vehicle, -- number, the vehicle entity.
})
Exports
These exports are entirely optional and can be used as needed.
Get Garage Type
exports['cd_garage']:GetGarageType(vehicle)
Get Mileage Data
exports['cd_garage']:GetAdvStats(plate)
Get Keys Data
exports['cd_garage']:GetKeysData()
Does Player Have Keys
exports['cd_garage']:DoesPlayerHaveKeys(plate)
Get Plate
exports['cd_garage']:GetPlate(vehicle)
Get Config
exports['cd_garage']:GetConfig()
Get Vehicles Data
exports['cd_garage']:GetVehiclesData()
Usable Items
Usable items can be renamed or disabled in
[configs/config.lua]
.
lockpick
Start lockpicking the closest vehicle.
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('lockpick', 'Lockpick', 1, 0, 1);
Last updated
Was this helpful?