LogoLogo
  • Codesign Documentation
  • Information
    • Discord Roles
    • FiveM Asset Escrow System
    • Authentication & Transfers
  • Coding Information
    • Register Key Mapping
    • Code Snippets
    • Self Debugging
  • Paid scripts
    • Arm Wrestling
      • Configs, Locales & SQL
    • Car HUD
      • Configs, Locales & SQL
    • CCTV Cameras
      • Configs, Locales & SQL
    • Darts
      • Configs, Locales & SQL
    • Dispatch
      • Configs, Locales & SQL
      • Resource Integration
    • Door Lock
      • Configs, Locales & SQL
    • Garage
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs, Locales & SQL
      • Resource Integration
    • Gun Range
      • Configs, Locales & SQL
    • Identity
      • Configs, Locales & SQL
    • Multicharacter
      • Configs, Locales & SQL
    • Player HUD
      • Configs, Locales & SQL
    • Props
      • Configs, Locales & SQL
    • Radar
      • Configs, Locales & SQL
    • Spawn Select
      • Configs, Locales & SQL
    • Terminal Hacker
      • Configs, Locales & SQL
    • Vehicle Control
      • Configs, Locales & SQL
    • VIP Shop
      • Configs, Locales & SQL
  • Free Scripts
    • Easytime
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs & Locales
    • Drawtext UI
    • Devtools
    • Keymaster - Minigame
    • Staff Support
    • Notifications
Powered by GitBook
LogoLogo

Codesign Software © All rights reserved

On this page
  • Key Binds
  • Chat Commands
  • Events
  • Exports
  • Usable Items

Was this helpful?

  1. Paid scripts
  2. Garage

Keys/Chat/Events/Exports

PreviousGarageNextOptional Features

Last updated 6 months ago

Was this helpful?

Key Binds

  • You can modify or disable these keys in the section of the [configs/config.lua].

  • Ensure you understand how 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 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

Check a vehicle's mileage.
TriggerEvent('cd_garage:checkmileage')

Impound Vehicle

Opens the impound UI. You can send a vehicles id as the first argument, otherwise, it will choose the closest vehicle.
TriggerEvent('cd_garage:ImpoundVehicle')

Transfer Vehicle

Transfer the vehicle you are sat in. You must send the player's server-id in the first argument.
TriggerEvent('cd_garage:TransferVehicle', playerid)

Vehicle Lock

Toggle vehicle lock of the closest vehicle.
TriggerEvent('cd_garage:ToggleVehicleLock')

Update Garage Type

Update the database with the correct garage_type for the vehicle a player is sat in.
TriggerEvent('cd_garage:UpdateGarageType')

Impound Vehicle Directly Through code

This event allows you to send vehicle's to the impound directly through code, without needing the in-game UI.
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.
})

Mileage

Check a vehicle's mileage.
TriggerClientEvent('cd_garage:checkmileage', source)

Impound vehicles

Opens the impound UI. You can send a vehicles id as the first argument, otherwise, it will choose the closest vehicle.
TriggerClientEvent('cd_garage:ImpoundVehicle', source)

Transfer Vehicle

Transfer the vehicle you are sat in. You must send the player's server-id in the second argument.
TriggerClientEvent('cd_garage:TransferVehicle', source, target_source)

Vehicle Lock

Toggle vehicle lock of the closest vehicle.
TriggerClientEvent('cd_garage:ToggleVehicleLock', source)

Update Garage Type

Update the database with the correct garage_type for the vehicle a player is sat in.
TriggerClientEvent('cd_garage:UpdateGarageType', source)

Save Mileage Timer

Trigger this event around 1 minute before a server restart to force save the mileage of every owned vehicle.
TriggerClientEvent('cd_garage:SaveAllMiles', -1)

Save Vehicle Damage Timer

Trigger this event around 1 minute before a server restart to force save the vehicle damage of every owned vehicle. Requires Config.VehicleKeys.ENABLE to be enabled.
TriggerClientEvent('cd_garage:SaveAllVehicleDamage', -1)

Impound Vehicle Directly Through code

This event allows you to send vehicle's to the impound directly through code, without needing the in-game UI.
TriggerClientEvent('cd_garage:ImpoundVehicle:Direct', source, {
    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.
})

Save Impound Timer

Trigger this event around 1 minute before a server restart to force save the impound timer time of all vehicles in the impound to the database.
TriggerEvent('cd_garage:SaveImpoundTimers')

Exports

These exports are entirely optional and can be used as needed.

Get Garage Type

Returns the type of vehicle the player is sat in (‘car’ / ‘boat’ / ‘air’) (string).
exports['cd_garage']:GetGarageType(vehicle)

Get Mileage Data

Returns the mileage table which includes; plate, mileage, maxhealth (table).
exports['cd_garage']:GetAdvStats(plate)

Get Keys Data

Returns a players full key table which includes; all vehicles they have keys to (table).
exports['cd_garage']:GetKeysData()

Does Player Have Keys

Returns if the player has keys to the defined vehicle (boolean).
exports['cd_garage']:DoesPlayerHaveKeys(plate)

Get Plate

Returns the vehicle plate from the vehicle the player is sat in (string).
exports['cd_garage']:GetPlate(vehicle)

Get Config

Returns the full garage config (table).
exports['cd_garage']:GetConfig()

Get Vehicles Data

Returns a large table from the cached vehicles data of all vehicles which includes; name, hash, price, category, model (table).
exports['cd_garage']:GetVehiclesData()

Get Garage Limit

Returns a player's garage limit amount (number).
exports['cd_garage']:GetGarageLimit(source)

Get Garage Count

Returns the number of vehicles a player owns (number).
exports['cd_garage']:GetGarageCount(source, garage_type)

Get Mileage Data

Returns the mileage table which includes; plate, mileage, maxhealth (table).
exports['cd_garage']:GetMaxHealth(plate)

Get Config

Returns the full garage config (table).
exports['cd_garage']:GetConfig()

Get Vehicles Data

Returns a large table from the cached vehicles data of all vehicles which includes; name, hash, price, category, model (table).
exports['cd_garage']:GetVehiclesData()

Usable Items

  • Usable items can be renamed or disabled in [configs/config.lua].

Item Name
Description

lockpick

Start lockpicking the closest vehicle.

Run these SQL queries in your database.
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('lockpick', 'Lockpick', 1, 0, 1);
Add these lines to [qb-core/shared/items.lua].
['lockpick'] 				 = {['name'] = 'lockpick', 			  	  	['label'] = 'Lockpick', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'lockpick.png', 			['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	['combinable'] = nil,   ['description'] = 'Lockpick the closest vehicle'},
Keys and Commands
Key Mapping
Keys and Commands