Advertisement
Guest User

Untitled

a guest
Nov 27th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. include( "shared.lua" )
  2.  
  3. function set_team()
  4.  
  5. local frame = vgui.Create( "DFrame" )
  6. frame:SetPos( 100, ScrH() / 2 )
  7. frame:SetSize( 200, 210 )
  8. frame:SetTitle( "Change Team" )
  9. frame:SetVisible( true )
  10. frame:SetDraggable( false )
  11. frame:ShowCloseButton( true )
  12. frame:MakePopup()
  13.  
  14. ghost = vgui.Create( "DButton", frame )
  15. ghost:SetPos( frame:GetTall() / 2, 5 )
  16. ghost:SetSize( 50, 100 )
  17. ghost:SetText( "Spectators" )
  18. ghost.DoClick = function()
  19.     RunConsoleCommand( "Spectator" )
  20. end
  21.  
  22. death = vgui.Create( "DButton", frame )
  23. death:SetPos( frame:GetTall() / 2, 105 )
  24. death:SetSize( 50, 100 )
  25. death:SetText( "Death" )
  26. death.DoClick = function()
  27.     RunConsoleCommand( "Death" )
  28. end
  29.  
  30. surviver = vgui.Create( "DButton", frame )
  31. surviver:SetPos( frame:GetTall() / 2, 205 )
  32. surviver:SetSize( 50, 100 )
  33. surviver:SetText( "Survivers" )
  34. surviver.DoClick = function()
  35.     RunConsoleCommand( "Surviver" )
  36. end
  37.  
  38. end
  39. concommand.Add( "changeteam", set_team )
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement