-
Notifications
You must be signed in to change notification settings - Fork 26
Keybinds
Loaf edited this page Nov 23, 2021
·
1 revision
local keyName = "primary" -- a unique(!) name for this keybind, shown to the user when not using a native GTA helptext method
local keyData = {
defaultKey = "E", -- the default keybind for this key, unless user changes it themselves
description = "Keybind for primary actions.", -- the description shown to the user when changing the keybind
}
local added = lib.AddKey(keyName, keyData)local keyName = "primary" -- the key to get
local key = lib.GetKey(keyName)
local keyInstructional = key.instructional -- keyInstructional is in the format ~INPUT_...~ and it will automatically show the key when using GTA helptext methodslocal keyName = "primary" -- the key to get
local keyInstructional = lib.GetInstructional(keyName) -- keyInstructional is in the format ~INPUT_...~ and it will automatically show the key when using GTA helptext methodslocal keyName = "primary" -- the key to check if pressed
local isPressed = lib.IsKeyPressed(keyName) -- check if the key is currently pressed down (true or false)local keyName = "primary" -- the key to check if pressed
local justReleased = lib.IsKeyJustReleased(keyName) -- check if the key was just released (true or false)