Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. @name SuperGun
  2. @inputs Turret:entity
  3. @outputs Fire
  4. @persist Distance
  5. @trigger
  6.  
  7. runOnTick(1)
  8.  
  9. if(first())
  10. {
  11.  
  12. }
  13.  
  14. if(owner():weapon():type() == "weapon_357")
  15. {
  16. holoCreate(1)
  17. Turret:setAlpha(0)
  18. holoAlpha(1, 0)
  19. holoPos(1, owner():attachmentPos("righthand")+owner():forward()*Distance)
  20. holoAng(1, owner():eyeAngles())
  21. holoParentAttachment(1, owner(), "righthand")
  22.  
  23. Turret:setPos(holoEntity(1):pos())
  24. Turret:setAng(holoEntity(1):angles())
  25. Turret:propNotSolid(1)
  26. if(owner():keyAttack2())
  27. {
  28. Turret:parentTo(holoEntity(1))
  29. Fire = 1
  30. }
  31. else
  32. {
  33. Fire = 0
  34. }
  35. }
  36. else
  37. {
  38. holoPos(1, entity():pos())
  39. Fire = 0
  40. #holoUnparent(1)
  41. Turret:propNotSolid(0)
  42. }
  43. if(owner():keySprint())
  44. {
  45. Distance = 65
  46. }
  47. else
  48. {
  49. Distance = 25
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement