ESX • QBCore • Qbox compatible
Instant download
Updates included
Discord support
Secure checkout

Keypad Minigame

Resource folder: gs_keypad

View product

Installation Instructions for Keypad Minigame

Follow these steps to install and configure gs_keypad on your FiveM server.

  1. Download the Resource
    • Go to portal.cfx.re
    • Navigate to Assets > Granted Assets > gs_keypad
    • Download the resource
  2. Extract the Files
    • Open the downloaded .zip file
    • Inside, you'll find a folder named gs_keypad
    • Move the entire gs_keypad folder into your desired server resources folder (e.g., /resources/[scripts])
  3. Add to Server Configuration
    • Open your server.cfg
    • Add the following line:
      ensure gs_keypad
  4. Restart the Server
    • Restart your FiveM server (Important!)
  5. Configure the Script (Optional)
    • Navigate to gs_keypad/config.lua
    • Edit the configuration options to fit your server's needs

What is gs_keypad?

gs_keypad is a reusable PIN-entry minigame. Other scripts call it through a client export when players need to enter a code during heists, doors, safes, or similar scenarios. Players get a limited number of tries before failing.

How do I call the minigame from another script?

Use the StartGame export on the client. It returns true on success and false on failure:

local success = exports.gs_keypad:StartGame(pinLength, maxTries)

Pin length and max tries are passed per call. Defaults in config are only used when you rely on the debug command.

Can I use gs_keypad with qb-storerobbery?

Yes. Replace the safecracker minigame call with the keypad export. Each safe in qb-storerobbery config can use type = 'gs_keypad'. Removing the safecracker resource alone is not enough. The robbery script must call the export and handle the result to complete the robbery flow.

The keypad UI shows but the robbery does not finish

The export only runs the minigame. Your host script must check the return value and trigger the next step, such as giving loot or marking the safe robbed. Wire that logic where the old minigame was called.

Can I change the default PIN length and tries?

Yes. Set defaultPinLength and defaultMaxTries in config for debug mode and as reference values. Per-call arguments to StartGame override those when your integration passes its own values.

Can I disable sound effects?

Set enableSounds to false in config.

Player movement is blocked during the minigame

That is intentional. disabledControls in config lists movement and jump controls disabled while the UI is open. Adjust the list if a specific control causes problems on your server.

Does gs_keypad need a framework?

No. It is a standalone minigame resource. Any script that can call client exports can use it.