Jump to content

Generic Native Keypad 1.0.0

   (0 reviews)

1 Screenshot

About This File

Originally created around 2019, so it might be broken with newer versions of RageMP, though I believe I fixed this at some point.

The system allows you to set up a keypad server-side and hook an action to the Confirm button in the keypad. The action is invoked server-side and as argument you get the value which the user put in the keypad client-side. You can set the title, subtitle and even control if the input in the field will be asterisks for cases where the player would be typing a pin etc.

The entire keypad requires no CEF at all, and no web related dependencies. Instead the whole thing is defined and rendered using native GTA:V UI elements.

Getting started

To get started put the keypad.js in your client folder and remember to include it in the index.js. Then grab the KeypadLibrary.cs and put it in your server project. With this you are ready to create keypads wherever you need them. Invoke the following function:

StartKeypadForPlayer(Player player, string title, string subTitle, bool useAsterisk, Action<Player,int> callback)

as such:

    ply, "Withdraw", 
    $"Current bank balance: ~g~${ply.cash}", 
    (ply, x) =>
        ply.SendChatMessage("You are withdrawing: " + x);

The system supports all native colors from GTA:V so you can color the title and subtitle if needed.

Here's the GitHub link for those interested https://github.com/Andreas1331/ragemp-keypad

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

There are no reviews to display.

  • Create New...