Advertisement
quintosh

ink trigger

Feb 5th, 2012
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement