Kartik Scripts

Door Locks & Multiple Entrances

Configure multiple entrance/exit points for a single property and place custom locks on interior and exterior doors.

Multiple Entrances & Exits

Kartik Properties supports configuring multiple entrance/exit points for a single property (up to Config.MaxEntrances, which defaults to 4). This is especially useful for large properties, MLOs/walk-ins, or multi-story structures.

  • Single Interior mapping: All entrance points open into the exact same instanced shell or IPL interior.
  • Backwards Compatibility: The primary entrance resides at index 1 (entrances[1]) and is mirrored back onto the legacy entrance database column automatically.
  • Management UI: Property managers can configure, label, and delete entrance/exit points directly from the property page inside the tablet UI:
    • Add an entry point by standing at the doorway and clicking "+ Add Entry".
    • Rename points (e.g., "Front Door", "Back Door", "Garage Entry").
    • Set specific doors as exit-only or bi-directional.

Lockable Doors

Instead of a single binary lock on the entire property, you can install and configure individual locks on entrance doorways and interior room doors using the Interior Doors system.

Per-door lock states are synchronized globally using FiveM GlobalState (kpidoor:<door_id>), allowing doors to respond immediately to player actions without lag or polling.

Door Lock Types

When setting up a door lock, you can select one of five lock types:

  1. Key: Toggles lock state freely for keyholders (the standard behavior).
  2. PIN: Protects the door with a 4-digit numeric code. Credentials are stored securely as salted, peppered SHA-256 hashes on the server.
  3. Password: Gated by a custom alphanumeric passcode (e.g., "admin1234").
  4. Fingerprint: Authorizes access for enrolled Citizen IDs (no keys, keycards, or PIN codes required; your character identity acts as the key).
  5. Keycard: Programmed keycard inventory items linked to a serial number.

Brute-Force Lockout Protection

To prevent actors from spamming credentials, PIN and Password doors feature lockout tracking (in the kp_door_attempts ledger):

  • A player who fails a PIN/password validation several times (Config.InteriorDoors.MaxFails = 5) will trigger a lockout.
  • During lockout, the door cannot be unlocked by that player for a cooldown period (Config.InteriorDoors.LockoutSeconds = 60).

Placement & Retrofitting

  • Doors inside shells are stored with shell-relative coordinates (Interior.ToStored), meaning if you adjust shell spawn coordinates, the doors move with the layout automatically.
  • Entrance doors in the world use absolute coordinates.
  • Doors can be managed and configured at any time by property managers through the radial menu (Property → Set Doors).

On this page