Advertisement
Guest User

animator.lua

a guest
Mar 11th, 2014
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.85 KB | None | 0 0
  1. --CODE BY NORWAY174
  2. --Act console reference sheet: http://steamcommunity.com/sharedfiles/filedetails/?id=152152088
  3. local version = "1.0";
  4.  
  5. function frame_create()
  6.     frame = vgui.Create("DFrame")
  7.     frame:SetPos(50,50)
  8.     frame:SetSize(465,358)
  9.     frame:SetTitle("Player Animator "..version)
  10.     frame:SetVisible(false)
  11.     frame:SetDraggable(true)
  12.     frame:ShowCloseButton(true)
  13.     frame:SetBackgroundBlur(false)
  14.     frame:MakePopup()
  15.     frame:Center()
  16.     frame.OnClose = function()
  17.         frame_create();
  18.     end
  19.    
  20. local DLabel = vgui.Create( "DLabel", frame )
  21. DLabel:SetPos( 360, 342 )
  22. DLabel:SetText( "Made by Norway174" )
  23. DLabel:SizeToContents()
  24.  
  25. --ROW 1
  26. --Salute
  27.     button = vgui.Create("DButton",frame)
  28.     button:SetText("Salute")
  29.     button:SetPos(5,27)
  30.     button:SetSize(150,50)
  31.     button.DoClick = function()
  32.         RunConsoleCommand("act", "salute");
  33.         frame_close();
  34.     end
  35.    
  36. --Dance
  37.     button = vgui.Create("DButton",frame)
  38.     button:SetText("Dance")
  39.     button:SetPos(5,80)
  40.     button:SetSize(150,50)
  41.     button.DoClick = function()
  42.         RunConsoleCommand("act", "dance");
  43.         frame_close();
  44.     end
  45.    
  46. --Cheer
  47.     button = vgui.Create("DButton",frame)
  48.     button:SetText("Cheer")
  49.     button:SetPos(5,133)
  50.     button:SetSize(150,50)
  51.     button.DoClick = function()
  52.         RunConsoleCommand("act", "cheer");
  53.         frame_close();
  54.     end
  55.    
  56.    
  57. --Laugh
  58.     button = vgui.Create("DButton",frame)
  59.     button:SetText("Laugh")
  60.     button:SetPos(5,186)
  61.     button:SetSize(150,50)
  62.     button.DoClick = function()
  63.         RunConsoleCommand("act", "laugh");
  64.         frame_close();
  65.     end
  66.    
  67. --Halt
  68.     button = vgui.Create("DButton",frame)
  69.     button:SetText("Halt")
  70.     button:SetPos(5,239)
  71.     button:SetSize(150,50)
  72.     button.DoClick = function()
  73.         RunConsoleCommand("act", "halt");
  74.         frame_close();
  75.     end
  76.    
  77. --pers
  78.     button = vgui.Create("DButton",frame)
  79.     button:SetText("Pers")
  80.     button:SetPos(5,292)
  81.     button:SetSize(150,50)
  82.     button.DoClick = function()
  83.         RunConsoleCommand("act", "pers");
  84.         frame_close();
  85.     end
  86.    
  87. --ROW 2
  88. --Agree
  89.     button = vgui.Create("DButton",frame) --Note that I have changed the variables to button and frame. This is important to you.
  90.     button:SetText("Agree")
  91.     button:SetPos(157,27)
  92.     button:SetSize(150,50)
  93.     button.DoClick = function()
  94.         RunConsoleCommand("act", "agree");
  95.         frame_close();
  96.     end
  97.    
  98. --Disagree
  99.     button = vgui.Create("DButton",frame)
  100.     button:SetText("Disagree")
  101.     button:SetPos(157,80)
  102.     button:SetSize(150,50)
  103.     button.DoClick = function()
  104.         RunConsoleCommand("act", "disagree");
  105.         frame_close();
  106.     end
  107.    
  108. --Muscle
  109.     button = vgui.Create("DButton",frame)
  110.     button:SetText("Muscle")
  111.     button:SetPos(157,133)
  112.     button:SetSize(150,50)
  113.     button.DoClick = function()
  114.         RunConsoleCommand("act", "muscle");
  115.         frame_close();
  116.     end
  117.    
  118.    
  119. --Wave
  120.     button = vgui.Create("DButton",frame)
  121.     button:SetText("Wave")
  122.     button:SetPos(157,186)
  123.     button:SetSize(150,50)
  124.     button.DoClick = function()
  125.         RunConsoleCommand("act", "wave");
  126.         frame_close();
  127.     end
  128.    
  129. --Bow
  130.     button = vgui.Create("DButton",frame)
  131.     button:SetText("Bow")
  132.     button:SetPos(157,239)
  133.     button:SetSize(150,50)
  134.     button.DoClick = function()
  135.         RunConsoleCommand("act", "bow");
  136.         frame_close();
  137.     end
  138.    
  139. --Becon
  140.     button = vgui.Create("DButton",frame)
  141.     button:SetText("Becon")
  142.     button:SetPos(157,292)
  143.     button:SetSize(150,50)
  144.     button.DoClick = function()
  145.         RunConsoleCommand("act", "becon");
  146.         frame_close();
  147.     end
  148.  
  149. --ROW 3
  150. --Zombie
  151.     button = vgui.Create("DButton",frame)
  152.     button:SetText("Zombie")
  153.     button:SetPos(310,27)
  154.     button:SetSize(150,50)
  155.     button.DoClick = function()
  156.         RunConsoleCommand("act", "zombie");
  157.         frame_close();
  158.     end
  159.    
  160. --Group
  161.     button = vgui.Create("DButton",frame)
  162.     button:SetText("Group")
  163.     button:SetPos(310,80)
  164.     button:SetSize(150,50)
  165.     button.DoClick = function()
  166.         RunConsoleCommand("act", "group");
  167.         frame_close();
  168.     end
  169.    
  170. --Forward
  171.     button = vgui.Create("DButton",frame)
  172.     button:SetText("Forward")
  173.     button:SetPos(310,133)
  174.     button:SetSize(150,50)
  175.     button.DoClick = function()
  176.         RunConsoleCommand("act", "forward");
  177.         frame_close();
  178.     end
  179.    
  180.    
  181. --Robot
  182.     button = vgui.Create("DButton",frame)
  183.     button:SetText("Robot")
  184.     button:SetPos(310,186)
  185.     button:SetSize(150,50)
  186.     button.DoClick = function()
  187.         RunConsoleCommand("act", "robot");
  188.         frame_close();
  189.     end
  190.    
  191. --UNUSED
  192.     button = vgui.Create("DButton",frame)
  193.     button:SetText("<<UNUSED>>")
  194.     button:SetPos(310,239)
  195.     button:SetSize(150,50)
  196.     button.DoClick = function()
  197.         --RunConsoleCommand("act", "");
  198.         --frame_close();
  199.     end
  200.    
  201. --UNUSED
  202.     button = vgui.Create("DButton",frame)
  203.     button:SetText("<<UNUSED>>")
  204.     button:SetPos(310,292)
  205.     button:SetSize(150,50)
  206.     button.DoClick = function()
  207.         --RunConsoleCommand("act", "");
  208.         --frame_close();
  209.     end
  210. end
  211.  
  212. function frame_open()
  213.     frame:SetVisible(true)
  214. end
  215.  
  216. function frame_close()
  217.     frame:SetVisible(false)
  218. end
  219.  
  220. concommand.Add("-acts",frame_close)
  221. concommand.Add("+acts",frame_open)
  222. hook.Add("Initialize","frame_create",frame_create)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement