Docs/Keypad/Getting Started

Getting Started

Keypad
The keypad in use: keys pressing in, the screen filling one dot per digit
i

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.

1

Script Placement

Place the dirk_keypad folder anywhere inside your resources folder.

2

Start Order

Start dirk_keypad before any script that uses it (and after dirk_lib, if you run it):

code
ensure dirk_keypad
3

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.

4

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.

CommandWhat 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 clearRemoves 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 Script Studio (/dirk_keypad, or Keypad in the list):

SettingDefaultWhat it does
Prompt → Prompt stylePlate on the wallWhat 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 positionTop rightWhere 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 Script Studio).
  • Without dirk_lib: add this to your server.cfg:
code
setr dirk_keypad:language de

Convars

Set these in your server.cfg. All of them are optional.

ConvarDefaultWhat it does
dirk_keypad:languageenThe keypad's language when dirk_lib isn't running. With dirk_lib running, dirk_lib's language wins.
code
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.

InputWhat it does
Left click on a keyPresses it. Hold the button and the key stays in.
1 – 9Presses that key.
EnterPresses #, which submits the code.
DeletePresses *, which clears the code.
Esc, Backspace or right clickSteps 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.
lua
local 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.

Was this page helpful?
This page was last updated on 25 October 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.