π Exports
Here is all the exports for the script that you can incorporate into your own scripts
Client Exports
hasKey
Returns true/false if player has keys Returns true/false if player has keys
exports['Renewed-Vehiclekeys']:hasKey(plate)
addKey
Adds a key to the specified player
exports['Renewed-Vehiclekeys']:addKey(plate)
removeKey
Removes the key from a player
exports['Renewed-Vehiclekeys']:removeKey(plate)
Server Exports
hasKey
Returns true/false if the player has the key
exports['Renewed-Vehiclekeys']:hasKey(source, plate)
addKey
Adds a key to the specified player
exports['Renewed-Vehiclekeys']:addKey(source, plate)
removeKey
Removes the key from a player
exports['Renewed-Vehiclekeys']:removeKey(source, plate)
Statebag
Use this to set the lock/unlocked state of a vehicle.
-- Sets the vehicle locked or unlocked
Entity(entity).state:set('vehicleLock', {
lock = 1, -- 1 | unlocked | 2 locked
sound = true, -- true | false
}, true)