Kartik Scripts

Property Keyring & Keys

Kartik Properties includes a comprehensive access control system combining digital access permissions with physical keys and an inventory-integrated Keyring container.

Key Features

  • 📱 Digital Key Management: Grant and revoke digital keys to any citizen directly from the property's Keys & Access tab.
  • 🛡️ Access Roles: Give keyholders extra rights by assigning them a per-property role (see Access Roles).
  • 🗝️ Physical Property Keys: Optional physical key items (property_key) that grant access to anyone holding the item.
  • 👜 Keyring Item (kp_keyring): A dedicated container item that bundles dozens of physical property keys into a single inventory slot.
  • 🚪 Automatic Container Scanning: The server automatically checks both the player's main inventory and the inside of their keyring container when unlocking doors. Compatible with ox_inventory, qb-inventory, and codem-inventory.

Access Roles

Every key lets its holder enter and lock/unlock the property. For anything more, the owner creates roles for that property and assigns one to each keyholder.

Manage them in the property record → Keys & Access:

  • Keyholders tab: grant or revoke keys and pick each holder's role. A holder with no role shows Access only (enter & lock).
  • Roles tab: create, edit and delete the property's roles.
PermissionAllows
DecoratePlace, move and remove furniture with the modeler.
Order furnitureBuy furniture for this property (paid with the keyholder's own money).
Storage & wardrobePlace and manage stashes and wardrobes.
Security & camerasView the CCTV camera feeds.

Roles belong to one property only. The owner, the managing company/job staff and the active tenant always have full rights and don't need a role.


Keyring Container (kp_keyring)

Carrying individual keys for multiple homes, business offices, and warehouses can clutter inventory space. The Keyring solves this:

  1. Obtain a Keyring item (kp_keyring).
  2. Use or open the keyring to reveal its internal locker stash.
  3. Place any number of property_key items inside the keyring.
  4. Walk up to your property door and press the lock/unlock keybind (L by default) or interaction menu, the server verifies your key seamlessly without needing you to pull the key out.

Configuration

Key and keyring behavior can be customized in shared/properties.lua:

Config.PhysicalKeys = {
    enabled = true,
    item = 'property_key',
    
    -- Keyring container settings
    keyring = {
        enabled = true,
        item = 'kp_keyring',
        slots = 20,
        maxWeight = 5000, -- 5 kg
    },
}

Interior Locks Integration

In addition to property-wide keys, individual interior doors can be secured with specific lock types (see Door Locks & Multiple Entrances):

  • Keyring (key): Automatically unlocks for any player on the property's digital keyring or holding the physical key.
  • PIN / Passcode (pin / password): Secured by a custom code.
  • Fingerprint (fingerprint): Enrolled citizen ID lock.
  • Keycard (keycard): Programmed NFC inventory keycards.

On this page