Bind System

Official server feature documentation can be found here

Moderators: Junior Developers, Lead Developers, Senior Lead Admins, Developers

Locked
User avatar
Cake
Modding Team
Modding Team
Posts: 1415
Joined: Sun Jul 30, 2017 7:13 pm
Location: Sweden
Contact:

Bind System

Post by Cake » Sat Jan 30, 2021 9:35 pm

Bind System
Author: Cake
Last Update: 01/15/2021
Languages: Pawn
Image

Introduction | Feature | Media


Introduction
The binding system will allow you to create and manage a limited amount of hotkeys that can trigger a command when you press the key. Unfortunately, due to scripting limitations, the server is only able to detect keys that are attached to a game action. That means that the server is unable to detect any key that isn't hooked to your game's controls. While the server will prompt you with a list of available keys to choose from, it is important to notice that they are merely the default keys and may not represent what the keys might be for you.

Following is the list of states that are available, and what the default keys to that state is:
  • StateOn-Foot Default Key_In-Vehicle Default Key
    KEY_YESKey YKey Y
    KEY_CTRL_BACKKey H
    KEY_NOKey NKey N
    KEY_SPRINTSpacebarKey W
    KEY_SECONDARY_ATTACK_EnterEnter
    KEY_JUMPLeft ShiftKey S
    KEY_WALKLeft ALT
    KEY_LOOK_RIGHTKey E
    KEY_LOOK_LEFTKey Q
    KEY_CROUCHKey CKey H / Capslock
    KEY_FIRELMB / Left CTRLLeft ALT
    KEY_LOOK_BEHINDMMB / Numpad 1Key 2
    KEY_HANDBRAKERMBSpacebar
    KEY_ACTIONTABALT GR / LCTRL / NUMPAD 0

Feature
This system introduces 2 new commands:
  • /binds:
    • This will prompt you with a dialog to manage all of your binds. If you do not have any created binds, you will be prompted to create one. The creation process contains 3 steps: what key, when (in vehicle, on foot, or both), and what command to execute.

      You cannot have two or more binds overlapping each other, as in executing on the same bind. This is restricted to avoid abuse.

      In the manage your bind profiles dialog, you're able to toggle specific binds on or off, without removing them or disabling your binds all together.
  • /togbinds:
    • This will toggle all of your binds off and will restrict you from the /binds menu until you toggle the binds back on. By default, your binds are disabled and must be enabled with /togbinds.
When you trigger a bind, by pressing its hotkey, the command you entered in /binds will execute. The system will inform you if the command failed to execute, if the command does not exist, or failed to execute in rare circumstances.

Media
Image

Image
(retired) LS-RP Junior Developer

Locked

Return to “Feature documentation”

Who is online

Users browsing this forum: No registered users