• want default vgui closebutton appear in my script
    2 replies, posted
I wanna add custom vgui closebutton in my script. I tried to put it everywhere, but it made errors: [ERROR] addons/efmenio421.php/lua/autorun/gbeorg_f4.lua:26: attempt to call method 'ShowCloseButton' (a nil value)   1. func - addons/efmenio421.php/lua/autorun/gbeorg_f4.lua:26    2. unknown - lua/includes/extensions/net.lua:32 here is my gbeorg_f4.lua file if SERVER then AddCSLuaFile( "vgui/f4g.lua")  util.AddNetworkString( "f4menu" )     hook.Add( "ShowSpare2" , "F4MenuHook", function( ply )       net.Start ( "f4menu" )       net.Send( ply )   end) end    if CLIENT then    include( "vgui/f4g.lua" )       net.Receive( "f4menu", function()     if ( !CSF4Menu ) then    CSF4Menu = vgui.Create( "f4g" )    CSF4Menu:SetVisible( false )    CSF4Menu:ShowCloseButton( false )         end if( CSF4Menu:IsVisible() ) then   CSF4Menu:SetVisible ( false )   gui.EnableScreenClicker( false )   CSF4Menu:ShowCloseButton( false ) else   CSF4Menu:SetVisible ( true )   gui.EnableScreenClicker( true )   CSF4Menu:ShowCloseButton( true ) end     end) end thats my main file local PANEL = { Init = function( self ) self That is supposed to be easy but i am kinda dumb plz put it in the right place, i am puzzled..
You really shouldn't make a new thread every time you have a problem related to the last thread
For the CloseButton you should on your derma use MakePopup to get the close button.. otherwise you can make your own DButton to close the window
Sorry, you need to Log In to post a reply to this thread.