I made something and i want to have the possibility to modify it with the spawnmenu
Here the code:
It's not the complet code but what is necessary to help me
-- lua/autorun/client/cl_hudreplacement.lua
draw.SimpleText(HUD_MESSAGE_HP, "healthf2", 20, ScrH() - 36, Color(0,0,0,255), TEXT_ALIGN_LEFT)
-- lua/autorun/client/cl_spawnmenu.lua
hook.Add( "PopulateToolMenu", "CustomMenuSettings", function()
spawnmenu.AddToolMenuOption( "Utilities", "Basic_HUD", "Custom_Menu", "Basic_HUD text", "", "", function( panel )
panel:ClearControls()
panel:TextEntry( "Basic_hud HP text", "HUD_MESSAGE_HP" );
end )
end )
-- lua/autorun/config.lua
HUD_MESSAGE_HP = "Vie:"
I want to have the possibility to modify it in the spawn menu and i have a second thing that i want to modify in the spawn menu
-- lua/autorun/client/cl_rules.lua
local PANEL_TITLE = "TEST"
local frame = vgui.Create("DFrame")
frame:SetTitle(PANEL_TITLE)
frame:Center(true)
frame:SetVisible(true)
frame:SetSize(300, 300)
frame:MakePopup()
frame:ShowCloseButton(true)
For this one same i want to modify it in a spawnmenu section but im not able pls can you help me
pas sur que ca puisse t'aider, mais j'ai ca dans mes cartons :
Lien Github
Merci je vais verifier ;)
Is anyone can help me with the second pls
pls
Sorry, you need to Log In to post a reply to this thread.