Exports
Last updated
Last updated
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.
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
Name | Type | Description |
---|---|---|
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!
Gives the player the vehicle key
Gives the player the vehicle key
Returns data on whether the player has a key to the vehicle
Returns data on whether the player has a key to the vehicle
Returns data on whether the key is inserted in the ignition
Inserts or removes the key in the ignition
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
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!
Gives the player the vehicle key
Returns data on whether the key is inserted in the ignition
Inserts or removes the key in the ignition
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|