• Weapongiver
    0 replies, posted
So far I have this menu: [CODE]local DermaFrame = vgui.Create( "DFrame" ) DermaFrame:SetPos( ScrW()/2-150, ScrH()/2-150 ) DermaFrame:SetSize( 300, 200 ) DermaFrame:SetTitle( "Weapongiver" ) DermaFrame:SetVisible( true ) DermaFrame:MakePopup() DermaFrame.Paint = function() draw.RoundedBox( 8, 0, 0, DermaFrame:GetWide(), DermaFrame:GetTall(), Color( 255, 255, 255, 150 ) ) end local DermaButton = vgui.Create( "DButton" ) DermaButton:SetParent( DermaFrame ) -- Set parent to our "DermaPanel" DermaButton:SetText( "Recharge Armor" ) DermaButton:SetPos( 50, 40 ) DermaButton:SetSize( 200, 50 ) DermaButton.DoClick = function () DermaButton.DoClick = pl:Give( "cse_glock" ) RunConsoleCommand( "rcon ent healthkit" ) -- What happens when you press the button end [/CODE] I want it so when the button is pressed, instead of a console command, it recharges your armor slowly like the hl2 health machine. Or a healthkit off darkrp. Also if possible, it'd help if someone told me how I could use this hook and integrate it into a button: [CODE]pl:Give( "cse_glock" )[/CODE] so when the button is pressed It's so I can give the player a weapon and then with the main button recharge their health for a police armory entity.
Sorry, you need to Log In to post a reply to this thread.