Hi there !
Just a lil question, if i want to change the menu location on the screen wich args do i need to edit ?
Thank you,
Nathan
Hi there !
Just a lil question, if i want to change the menu location on the screen wich args do i need to edit ?
Thank you,
Nathan
Bonjour, excuse moi je nāest pas compris ou installer cāest deux script
function NameOfMenu()
MenuTitle = "Title of the menu"
ClearMenu()
Menu.addButton("First Button","FunctionName1","arg")
Menu.addButton("Second Button","FunctionName2",nil) -- No arg
-- ...
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1,Keys["H"]) then
NameOfMenu() -- Menu to draw
Menu.hidden = not Menu.hidden -- Hide/Show the menu
end
Menu.renderGUI() -- Draw menu on each tick if Menu.hidden = false
end
end)
Merci de votre aide.
Hello, excuse me I am not understood or install it is two script
function NameOfMenu()
MenuTitle = "Title of the menu"
ClearMenu()
Menu.addButton("First Button","FunctionName1","arg")
Menu.addButton("Second Button","FunctionName2",nil) -- No arg
-- ...
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1,Keys["H"]) then
NameOfMenu() -- Menu to draw
Menu.hidden = not Menu.hidden -- Hide/Show the menu
end
Menu.renderGUI() -- Draw menu on each tick if Menu.hidden = false
end
end)
Thank you for your help.
Salut,
il faut que tu fasse un nouveau fichier .lua par exemple āmenu.luaā et que tu y mettes ce deux bout de code.
Tu auras donc les fichiers suivants : GUI.lui, __resource.lua, Menu.lua et dans ton fichier __ressource.lua, le code suivant :
resource_manifest_version "77731fab-63ca-442c-a67b-abc70f28dfa5"
client_scripts {
"GUI.lua",
"Menu.lua"
}
Hi, you have to create a new file (for example āMenu.luaā) and paste in it the code below :
function NameOfMenu()
MenuTitle = "Title of the menu"
ClearMenu()
Menu.addButton("First Button","FunctionName1","arg")
Menu.addButton("Second Button","FunctionName2",nil) -- No arg
-- ...
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1,Keys["H"]) then
NameOfMenu() -- Menu to draw
Menu.hidden = not Menu.hidden -- Hide/Show the menu
end
Menu.renderGUI() -- Draw menu on each tick if Menu.hidden = false
end
end)
You will have these files : GUI.lua, __resource.lua, Menu.lua
and your __resource.lua will look like this :
resource_manifest_version "77731fab-63ca-442c-a67b-abc70f28dfa5"
client_scripts {
"GUI.lua",
"Menu.lua"
}
[EN]
Hi! I was wondering if it could be possible to set a command to a button (Iām new to LUA).
Suppose that I installed a mod āloadoutsā that can change my player model, and the only way to activate it is by command system (writing ā/loadout copā in the chat). Can I set a command to a button of my menu, that way we just have to click a button and it change. Thank you
This doesnāt exists already ?
Take example here (see the giveJob function)
Just link the function with one of your buttons.
Then inside the function, well trigger some client/server events and it should be itā¦
(I guess, I have not scripted a menu yet, just sharing what I could have read so far)
Tell me if I was wrong (I also learn with failure XD) Good luck
Where do all the files go?
Hey,
Iām removing the download link as the Keys table still exists and has spread
Just remove it and reupload, Otherwise
Did you release the download please?
Hello,
In order to test a few scripts and menus I had pasted copy
But when I do H nothing happens ā¦
No errors in console
But in the game console I have this and this as soon as loading the game without even pressing the H key: http://hpics.li/61a0280