Configuration
Change open key
To change the key that opens the x menu you have to go to the config.lua
in line 4 and change the key to what ever you want it to be. Be carefuel, you only can chnage it once.
In Config.KeyDescription
you can chnage the Description for the Keymapping shown in the GTA Settigs.
Move while open & click on close
In the config.lua you will notice at the very top you will notice these two options
But what do they mean?
If true, the menu closes automaticly after you click a button, if false the menu is still open after clicking. If you only want the x menu to close on certian button, you can add this to the buttons config:
If true, your controls are still enabled while the menu is open and you can still walk. If false your controls are getting blocked while the menu is open and you cant move.
Configure the default menu
In the 'Config.Buttons' section, you can set the buttons for the default menu that can be opened by all players if the job lock is inactive. An example is provided in the configuration, but I'll explain it here. You need to add seven elements, named button0 to button6. Button0 is the middle button, which typically serves as a display for the logo and has no function. I'll walk you through how to build one of these 'button elements'.
active
This value determines the button's active status. If set to false, the button will be inactive and not be clickable.
image
Here you can configure what image is shown on the button. jp, png, svg are supported. Either put a path to a image in the /html/imgs folder or a direct link to the image. leave it blank for no image.
hovertext
Whether you want to show a text while hovering the button or not
text
Here you can set the text which is shwon on hover if hovertext = true
execute
This function is executed if the button is klicked, you can put anything there
Submenus
The X Menu supports to set a unique submenu for every button.
How to configure a Submenu?
Just set active = true
in the submenu section. Now you have to add three Button elements, similar to them in the main menu to the submenu. The names always have to be button1, button2 and button3
.
Heres a example:
Block the menu
The menu can be blocked under certein circumstances.
While player is dead
If you want the x menu to be blocked while the player is dead. You can do this in config.lua line 135 - 138. Just set Config.BlockMenuIfDead = true
and if not already done configure the events for the death & revive.
While player is cuffed, etc.
You can lock the x menu under any circumstance, for example when the player is tied up. You only have to configure the function ShouldMenuBeLocked()
, for example with an export of your cuff script, so that it returns true if the menu is to be blocked.
while player is swinning or falling
You can lock the x menu in case the player is falling or swimming at the moment with thes two config options in line 140 & 141:
exports
You also can lock and unlock the x menu from other scripts whith these exports:
Last updated