Don't like ads? PRO users don't see any ads ;-)

ink trigger

By: quintosh on Feb 5th, 2012  |  syntax: Lua  |  size: 0.36 KB  |  hits: 192  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. local InkTb = CreateClientConVar("Ink_Trigger" , "0" , true , false)
  2.  
  3. function Trigger()
  4. local Eye = LocalPlayer():GetEyeTrace().Entity
  5. if InkTb:GetBool() then
  6. if (Eye:IsNPC() or Eye:IsPlayer()) then
  7. RunConsoleCommand("+Attack")
  8. else
  9. timer.Simple(0.50, function()
  10. RunConsoleCommand("-Attack")
  11.                         end)
  12.                 end
  13.         end
  14.                 end
  15.  
  16. hook.Add("Tick", "Test", Trigger)