Exports
Suggestions for Export Usage
When a player purchases or acquires a new vehicle, use the
GiveKeyVehicle
orGiveKeyPlate
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 :
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 :
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 :
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 :
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 :
plate
string
Vehicle plate text
HaveKeyVehicle
Returns data on whether the player has a key to the vehicle
exports["tgiann-hotwire"]:HaveKeyVehicle(vehicle)
Parameters :
vehicle
int
Vehicle entity id
KeyInIgnition
Returns data on whether the key is inserted in the ignition
exports["tgiann-hotwire"]:KeyInIgnition(vehicle)
Parameters :
vehicle
int
Vehicle entity id
SetKeyInIgnition
Inserts or removes the key in the ignition
exports["tgiann-hotwire"]:SetKeyInIgnition(vehicle, bool)
Parameters :
vehicle
int
Vehicle entity id
bool
boolen
if true, put it on, if false, take it remove
ChangeEngineStateButton
Triggers the function of the button you use to turn the vehicle start and stop.
exports["tgiann-hotwire"]:ChangeEngineStateButton(bool)
Parameters :
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 :
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 :
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 :
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 :
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 :
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