Advertisement
LordNoobIV

Untitled

Apr 3rd, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. myTimer = Timer()
  2.  
  3. function Foo(args)
  4. if args.input == Action.FireRight then
  5. local results = LocalPlayer:GetAimTarget()
  6. if results.entity and myTimer:GetMilliseconds() > 1000 then
  7. local entityType = results.entity.__type
  8. if entityType == "Vehicle" or entityType == "Player" then
  9. Chat:Print("You are aiming at a "..entityType..": "..tostring(results.entity), Color(255, 255, 255))
  10. local args = {}
  11. args.player = LocalPlayer
  12. args.target = results.entity
  13. Network:Send("Shoot", args)
  14. myTimer:Restart()
  15. end
  16. end
  17. end
  18. end
  19.  
  20. Events:Subscribe("LocalPlayerInput", Foo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement