
DoorGateLock System
===================

A lightweight and flexible Door & Gate Lock system for GTA V ScriptHookVDotNet using LemonUI.

Developed by: ArneM16
Tester RoxicY2KAntifaLady

FEATURES
========

✔ Lock and unlock doors and gates
✔ Works with:
  - Standard doors
  - Double doors
  - Sliding gates
  - Large industrial gates

✔ Group system (multiple doors open together)
✔ Radius control per door
✔ Rename doors
✔ Custom keybind support via .ini
✔ Sound effect support
✔ Automatic save/load system
✔ Works after game restart
✔ Simple menu interface using LemonUI


REQUIREMENTS
============

You MUST have:

- ScriptHookV
- ScriptHookVDotNet
- LemonUI
- Newtonsoft.Json


REQUIRED FILE STRUCTURE
=======================

Grand Theft Auto V
│
├── ScriptHookVDotNet.asi
├── ScriptHookV.dll
├── dinput8.dll
│
├── scripts
│   ├── LemonUI.SHVDN3.dll
│   ├── Newtonsoft.Json.dll
│   ├── DoorGateLock.dll
│   └── DoorGateLock       
│       ├── doors.json  (auto-created)
│       ├── DoorGateLock.ini  (auto-created)
│       ├── short_lock.wav
│       ├── README.txt


INSTALLATION
============

1. Install ScriptHookV
2. Install ScriptHookVDotNet
3. Install LemonUI
4. Install Newtonsoft.Json

5. Copy:

   short_lock.wav

Into:

   scripts\DoorGateLock\

5.1 Copy: 

DoorGateLock.dll

Into:

   gta(root)/scripts
   

6. Start the game once.
   The script will automatically create:

   DoorGateLock.ini
   doors.json


CONTROLS
========

Default controls:

F6        → Open Menu
E         → Lock / Unlock Doors
← →       → Adjust Radius or Group
Backspace → Go Back


CHANGING KEYBINDS
=================

You can change keys inside:

scripts\DoorGateLock\DoorGateLock.ini


Example:

[KEYBINDS]
MenuKey=F7
ToggleKey=G


HOW TO USE
==========

ADDING A DOOR

1. Stand near a door or gate
2. Press Menu Key (Default: F6)
3. Select:

   Add Door

4. Enter a name
5. Door is saved automatically


LOCKING / UNLOCKING DOORS

Stand near a configured door and press:

Toggle Key (Default: E)

If multiple doors share the same Group,
they will open together.

Door Groups
==========

Groups allow multiple doors to act as one.

Example:

Group 1 → Double Doors  
Group 2 → Garage Gate  
Group 3 → Security Gate  

Use ← → keys to change group numbers.


GROUP 0 (Independent Doors)

Group 0 is reserved for independent doors.

Doors in Group 0 always work individually,
even if multiple doors use Group 0.

Use Group 0 for single doors that should
not open together.


TIPS
====

✔ Use same group for double doors
✔ Use larger radius for big gates
✔ Keep groups organized

Example:

Group 1 → Front Doors
Group 2 → Garage
Group 3 → Security Gate


CREDITS
=======

DoorGateLock System

Developed by:
ArneM16

Powered by:
- ScriptHookVDotNet
- LemonUI
- Newtonsoft.Json


VERSION
=======

DoorGateLock v1.2.0

Added

• Building System
  - Added support for creating multiple buildings.
  - Doors can now be assigned to specific buildings.
  - Each building has its own separate door list.
  - Buildings are saved to buildings.json.

• 100 Groups Per Building
  - Added support for up to 100 groups per building.
  - Groups are now building-specific, not global.
  - Doors only toggle together if they belong to:
      • the same group
      • the same building

• Group Selection Menu
  - Added a dedicated Group Menu.
  - Allows selecting groups 0–100 for each door.

DoorGateLock v1.1.1

*fixed necessary files & updated read me file 

DoorGateLock v1.1
 
 *fixed locks losing connetion with door after goin away 

DoorGateLock v1.0

Stable release.
