• HL2RP combine Judgement wavier & autonomous Judgement wavier panel help
    5 replies, posted
Hello all, So rrcently i got nutscript and installed it for my server and changed my gamemode to HL2RP. It runs really great but i wanna create like a menu tab where when you press like a specific key it will popup with the following options and allow for a message to popup on players hud. Menu options: Judgment wavier Autonomous Judgment wavier. Hud popup: "Attention, Judgement wavier is now in effect (reason here) "Attention citizens, autonomous Judgment wavier is now in effect" This is what i have so far, but idk if im doing the code right or wrong: [CODE]local panel = {} Function PANEL:Init() If (IsValid(nut.menu.judgmentwavier)) then nut.menu.judgmentwavier: [/CODE] If anyone could tell me the best way to go about that it would be appreciated.
If you're trying to use derma, you would need to define panel as (But I recommend using DFrame with a DPanel within it) [CODE]local panel = vgui.Create("DPanel")[/CODE] Good intro to derma:[URL="https://wiki.garrysmod.com/page/Derma_Basic_Guide"]https://wiki.garrysmod.com/page/Derma_Basic_Guide[/URL]
[QUOTE=warlock123;49247642]If you're trying to use derma, you would need to define panel as (But I recommend using DFrame with a DPanel within it) [CODE]local panel = vgui.Create("DPanel")[/CODE] Good intro to derma:[URL="https://wiki.garrysmod.com/page/Derma_Basic_Guide"]https://wiki.garrysmod.com/page/Derma_Basic_Guide[/URL][/QUOTE] Thank you for the link to the guide, it will help a lot, but i am wondering how to make it so that when the button is pressed, it would turn on the audio file and in the same token turn off the audio file?
[QUOTE=gamersrule44;49250535]Thank you for the link to the guide, it will help a lot, but i am wondering how to make it so that when the button is pressed, it would turn on the audio file and in the same token turn off the audio file?[/QUOTE] [CODE] local myButton = vgui.Create("DButton") myButton:SetSize( x, y ) myButton:SetPos( x, y ) myButton:SetText("Play Sound") myButton:SetTextColor( Color( 255, 255, 255 ) ) myButton.DoClick = function () // Do Thing end [/CODE]
[QUOTE=warlock123;49252070][CODE] local myButton = vgui.Create("DButton") myButton:SetSize( x, y ) myButton:SetPos( x, y ) myButton:SetText("Play Sound") myButton:SetTextColor( Color( 255, 255, 255 ) ) myButton.DoClick = function () // Do Thing end [/CODE][/QUOTE] thanks warlock, is it okay if i add you on steam so that if i have any more questions i may ask you on there?
I'm still learning derma, but go for it
Sorry, you need to Log In to post a reply to this thread.