exports / triggers
Client Exports
exports.brutal_keys:addKey(keyID, label)
Give key to the player. Create a key for anything. The label can be anything. (Won't work with vehicles)
exports.brutal_keys:removeKey(keyID, deleteAll)
Remove key from the player. deleteAll: true/false - if true then it will felete all the keys with this keyID from the player
exports.brutal_keys:addVehicleKey(plate, label)
Give vehicle key to the player. The label can be anything.
exports.brutal_keys:addVehicleTemporaryKey(hours, plate, label)
Give a temporary key to the plaer to the vehicle. After the given hours it will be removed. The label can be anything.
exports.brutal_keys:getPlayerKey(keyID)
Return two values
hasKey: true/false - Wether the player has the key or not. quantity: number - if has the key then the quantity.
Server Triggers
TriggerEvent('brutal_keys:server:addKey', PlayerID, keyID, label)
Give key to the player. Create a key for anything. (Won't work with vehicles)
TriggerEvent('brutal_keys:server:removeKey', PlayerID, keyID, deleteAll)
Remove key from the player. deleteAll: true/false - if true then it will felete all the keys with this keyID from the player
TriggerEvent('brutal_keys:server:addVehicleKey', PlayerID, plate, label)
Give vehicle key to the player
TriggerEvent('brutal_keys:server:addVehicleTemporaryKey', PlayerID, hours, plate, label)
Give a temporary key to the plaer to the vehicle. After the given hours it will be removed.
How to use custom keys
Client side example!
Here is an exmple how to create a custom key for a stash for example.
How to give a key to a player to anything
How to get if the player have a key for the stash or not
Last updated
Was this helpful?