DirkScripts
Getting Started

âšī¸ No dependencies. dirk_keypad runs on its own. If dirk_lib is running, the keypad uses dirk_lib's language setting. Without it, set the language with a convar (see Language below).
â ī¸ Run dirk_keypad or dirk_keypadModel, never both. The script already has the models inside it; running both streams the same models twice.
#Script Placement
Place the dirk_keypad folder anywhere inside your resources folder.
#Start Order
Start dirk_keypad before any script that uses it (and after dirk_lib, if you run it):
ensure dirk_keypad
#Reconnect once
The keypad's sounds are native game audio, which loads when a player joins. After the first start, reconnect once to hear them.
#Try it
Type /lockpad in game. A test wall appears in front of you with a keypad on it, and the camera moves onto it. The code is 1947. Three wrong codes lock it for 20 seconds.
/lockpad is for admins only: the server checks the command.lockpad ace before it runs. A stock server.cfg already gives group.admin every command (add_ace group.admin command allow). Other players can't use it.
| Command | What it does |
|---|---|
/lockpad [code] [length] | Spawns the test wall and keypad with that code, and starts using it. |
/lockpad light <colour> [level] | Sets the backlight to a named colour and brightness (0â1, 0 is off). |
/lockpad light r g b [level] | The same, with any colour (0â255 each). |
/lockpad leds <red> <green> | Sets each LED: 0 off, 1 on, more than 1 blinks that many times a second. |
/lockpad screen <level> | Sets the screen brightness (0â1). |
/lockpad prompt <kind> [position] | Changes the test keypad's prompt: dui, text, target or interact, and for the plate a position such as top-right or left. |
/lockpad clear | Removes the test wall and keypad. |
Near the test keypad, press E to use it again. While using it, press L to cycle the backlight colours.
#Settings
With dirk_lib running, the keypad has its own page in Config Studio (/dirk_keypad, or Keypad in the list):
| Setting | Default | What it does |
|---|---|---|
| Prompt â Prompt style | Plate on the wall | What a player walking up to a keypad sees: a plate on the wall beside it with an arrow pointing at it, GTA's help text, or an option on your target or interact resource (the one set in dirk_lib's settings). |
| Prompt â Plate position | Top right | Where the plate sits round the keypad: any corner, above, below, left or right. |
A script can still choose a different prompt for one keypad when it registers it (see Exports). Without dirk_lib there is no settings page: every keypad shows the plate, top right.
#Language
The keypad's screen comes in 13 languages: en de es fr it ja lt nl no pl pt zh-CN zh-TW.
- With dirk_lib: it follows dirk_lib's language (Basic â Language in Config Studio).
- Without dirk_lib: add this to your
server.cfg:
setr dirk_keypad:language de
#Convars
Set these in your server.cfg. All of them are optional.
| Convar | Default | What it does |
|---|---|---|
dirk_keypad:language | en | The keypad's language when dirk_lib isn't running. With dirk_lib running, dirk_lib's language wins. |
setr dirk_keypad:language fr
#Anti-cheats
If your anti-cheat filters events, allow everything starting with dirk_keypad:. The keypad asks the server about codes through those events.
#Using the keypad
There is no on-screen help: the keypad explains itself.
| Input | What it does |
|---|---|
| Left click on a key | Presses it. Hold the button and the key stays in. |
1 â 9 | Presses that key. |
Enter | Presses #, which submits the code. |
Delete | Presses *, which clears the code. |
Esc, Backspace or right click | Steps back from the keypad. |
The code submits by itself when the player types the last digit.
#Placing a keypad
The keypad is the prop dirk_keypad. Its origin is the centre of its back face, so place it flat against a surface:
- Put the coordinates on the wall's surface, at the height you want (about 1.35 m off the floor suits most doors).
- Give it the heading that points its forward direction into the wall. That is the direction the player faces when they stand in front of it.
lualocal model = `dirk_keypad` lib.request.model(model) local keypad = CreateObjectNoOffset(model, coords.x, coords.y, coords.z, false, false, false) SetEntityHeading(keypad, heading) FreezeEntityPosition(keypad, true)
Then register it on the server and open it from the client: see Exports.
Last updated on 2 October 2026
