Exports

Suggestions for Export Usage

  • When a player purchases or acquires a new vehicle, use the GiveKeyVehicle or GiveKeyPlate exports to give them the key.

  • In your garage scripts, use the CheckKeyInIgnitionWhenSpawn export. This way, if the player parked the vehicle with the key in the ignition, it will spawn in the same state. If they removed the key, it will already be with the player.

  • For scripts where you don’t want the key to be removable from the ignition, such as jobs or driving schools, use the SetNonRemoveableIgnition export.


Client Exports

CheckKeyInIgnitionWhenSpawn

If the vehicle's key is in the ignition when the vehicle is stored in the garage, and you trigger this export when retrieving the vehicle, it will put the key back in the ignition.

You can use it to give keys in your garage script or different scripts

Note: Event 'vehiclekeys:client:SetOwner' in qb triggers this export

exports["tgiann-hotwire"]:CheckKeyInIgnitionWhenSpawn(vehicle, plate)

Parameters :

Name
Type
Description

vehicle

int

you don't have to use plate or vehicle data at the same time. just use one of them

plate

string

you don't have to use plate or vehicle data at the same time. just use one of them


SetNonRemoveableIgnition

You can use this export in situations where you don't want the vehicle's key to be removed. For example, if you have a farming job and you're spawning a vehicle, you can use this export to insert the key into the ignition, preventing the player from removing it!

exports["tgiann-hotwire"]:SetNonRemoveableIgnition(vehicle, bool)

Parameters :

Name
Type
Description

vehicle

int

Vehicle entity id

bool

bool

if true, put it on, if false, take it remove


GiveKeyPlate

Gives the player the vehicle key

exports["tgiann-hotwire"]:GiveKeyPlate(plate, isNew)

Parameters :

Name
Type
Description

plate

text

Vehicle plate text

isNew

boolen

If true, the vehicle's key id changes and old keys cannot be used


GiveKeyVehicle

Gives the player the vehicle key

exports["tgiann-hotwire"]:GiveKeyVehicle(vehicle, isNew)

Parameters :

Name
Type
Description

vehicle

int

Vehicle entity id

isNew

boolen

If true, the vehicle's key id changes and old keys cannot be used


HaveKeyPlate

Returns data on whether the player has a key to the vehicle

exports["tgiann-hotwire"]:HaveKeyPlate(plate)

Parameters :

Name
Type
Description

plate

string

Vehicle plate text


HaveKeyVehicle

Returns data on whether the player has a key to the vehicle

exports["tgiann-hotwire"]:HaveKeyVehicle(vehicle)

Parameters :

Name
Type
Description

vehicle

int

Vehicle entity id


KeyInIgnition

Returns data on whether the key is inserted in the ignition

exports["tgiann-hotwire"]:KeyInIgnition(vehicle)

Parameters :

Name
Type
Description

vehicle

int

Vehicle entity id


SetKeyInIgnition

Inserts or removes the key in the ignition

exports["tgiann-hotwire"]:SetKeyInIgnition(vehicle, bool)

Parameters :

Name
Type
Description

vehicle

number

Vehicle entity id

bool

boolen

if true, put it on, if false, take it remove


ChangeLockStatus

Change the vehicle lock status

exports["tgiann-hotwire"]:ChangeLockStatus(status, vehicle)

Parameters :

Name
Type
Description

status

number

enum eVehicleLockState {
// No specific lock state, vehicle behaves according to the game's default settings.
VEHICLELOCK_NONE = 0,
// Vehicle is fully unlocked, allowing free entry by players and NPCs.
VEHICLELOCK_UNLOCKED = 1,
// Vehicle is locked, preventing entry by players and NPCs.
VEHICLELOCK_LOCKED = 2,
// Vehicle locks out only players, allowing NPCs to enter.
VEHICLELOCK_LOCKOUT_PLAYER_ONLY = 3,
// Vehicle is locked once a player enters, preventing others from entering.
VEHICLELOCK_LOCKED_PLAYER_INSIDE = 4,
// Vehicle starts in a locked state, but may be unlocked through game events.
VEHICLELOCK_LOCKED_INITIALLY = 5,
// Forces the vehicle's doors to shut and lock.
VEHICLELOCK_FORCE_SHUT_DOORS = 6,
// Vehicle is locked but can still be damaged.
VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED = 7,
// Vehicle is locked, but its trunk/boot remains unlocked.
VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED = 8,
// Vehicle is locked and does not allow passengers, except for the driver.
VEHICLELOCK_LOCKED_NO_PASSENGERS = 9,
// Vehicle is completely locked, preventing entry entirely, even if previously inside.
VEHICLELOCK_CANNOT_ENTER = 10
};

vehicle

number

Vehicle entity id


ChangeEngineStateButton

Triggers the function of the button you use to turn the vehicle start and stop.

exports["tgiann-hotwire"]:ChangeEngineStateButton(bool)

Parameters :

Name
Type
Description

bool?

boolean

If the value is nill, it is started or stopped depending on the engine status


Server Exports


Server Exports

CheckKeyInIgnitionWhenSpawn

If the vehicle's key is in the ignition when the vehicle is stored in the garage, and you trigger this export when retrieving the vehicle, it will put the key back in the ignition.

You can use it to give keys in your garage script or different scripts

exports["tgiann-hotwire"]:CheckKeyInIgnitionWhenSpawn(netid, vehicle)

Parameters :

Name
Type
Description

netid

int

Vehicle Net Id (You don't have to use netid or vehicle data at the same time. just use one of them)

entity

int

Vehicle Entity Id (You don't have to use netid or vehicle data at the same time. just use one of them)


SetNonRemoveableIgnition

You can use this export in situations where you don't want the vehicle's key to be removed. For example, if you have a farming job and you're spawning a vehicle, you can use this export to insert the key into the ignition, preventing the player from removing it!

exports["tgiann-hotwire"]:SetNonRemoveableIgnition(netid, entity, bool)

Parameters :

Name
Type
Description

netid

int

Vehicle Net Id (You don't have to use netid or vehicle data at the same time. just use one of them)

entity

int

Vehicle Entity Id (You don't have to use netid or vehicle data at the same time. just use one of them)

bool

bool

if true, put it on, if false, take it remove


GiveKeyPlate

Gives the player the vehicle key

exports["tgiann-hotwire"]:GiveKeyPlate(src, plate, isNew)

Parameters :

Name
Type
Description

src

int

Player source

plate

text

Vehicle plate text

isNew

boolen

If true, the vehicle's key id changes and old keys cannot be used


KeyInIgnition

Returns data on whether the key is inserted in the ignition

exports["tgiann-hotwire"]:KeyInIgnition(netid, entity)

Parameters :

Name
Type
Description

netid

int

Vehicle Net Id (You don't have to use netid or vehicle data at the same time. just use one of them)

entity

int

Vehicle Entity Id (You don't have to use netid or vehicle data at the same time. just use one of them)


SetKeyInIgnition

Inserts or removes the key in the ignition

exports["tgiann-hotwire"]:SetKeyInIgnition(netid, entity, bool)

Parameters :

Name
Type
Description

netid

int

Vehicle Net Id (You don't have to use netid or vehicle data at the same time. just use one of them)

entity

int

Vehicle Entity Id (You don't have to use netid or vehicle data at the same time. just use one of them)

bool

boolen

if true, put it on, if false, take it remove


Last updated