Skip to content

loaf-scripts/loaf_keysystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loaf - Keysystem

Version 3. Works with ESX, QBCore, and Standalone. If you encounter any issues, create a bug report in my discord or open an issue.

Requirements

Installation

  1. Install all the requirements
  2. Download the latest release
  3. Extract the zip file into your resources folder
  4. Run keysystem.sql
  5. Modify the config/config.lua to your liking
  6. Add start loaf_keysystem to your server.cfg
  7. Done!

Usage for resource developers

Server exports

Export Parameters Returns
GetKeys source: number the user's keys (table)
GetKey uniqueId: string the key (table)
HasKey source: number, keyId: string if the user has the specified key (boolean)
RemoveKey uniqueId: string if the key was removed (boolean)
RemoveAllKeys keyId: string void
TransferKey uniqueId, player to transfer to if the key was transferred (boolean)
GenerateKey source: number, keyId: string, keyLabel: string, eventtype?: string ("server" or "client"), eventname?: string the generated key's unique id (string)

Client exports

Export Parameters Returns
SetKeyUsage keyId: string, cb: function void
HasKey keyId: string if the player has the specified key (boolean)
GetKeys all keys the player has (table)
GetKey uniqueId: string the key (table)
UseKey uniqueId: string void

About

loaf_keysystem - Key system for ESX & QBCore

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages