Advertisement
Guest User

Untitled

a guest
Dec 28th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. @name Flashbang by James White
  2. @outputs A:array Once Flash B:array Start
  3. @persist Player:entity Timer Click Pla Alpha Start
  4. @trigger all
  5. @model models/weapons/w_eq_flashbang.mdl
  6.  
  7. interval(100)
  8. E = entity()
  9. E:setMass(5)
  10. E:setColor(255,255,255)
  11. if(first()){
  12.  
  13. hint("MADE BY James White",100)
  14.  
  15. Alpha = 255
  16. E:removeTrails()
  17. findByClass("player")
  18. A=findToArray()
  19. }
  20.  
  21. for(I=1,A:count()){
  22. Player = A[I,entity]
  23. if(Player:keyUse() & Player:aimEntity()==entity() & Once==0){
  24. hint("Acti",100)
  25. Once = 1
  26. }
  27. }
  28.  
  29. if(Once){
  30. Timer += 0.5
  31. Click += 0.5
  32. if(Timer == 1){
  33. E:soundPlay(4000,4000,"weapons/pinpull.wav")
  34. E:setTrails(10,10,5,"trails/laser",vec(255,0,0),200)
  35. }
  36. if(Click == 3){
  37. E:soundPlay(1000,1000,"weapons/grenade/tick1.wav")
  38. }
  39.  
  40. if(Click >= 4){
  41. soundStop(1000)
  42. Click = 0
  43. }
  44. if(Timer == 10){
  45. E:soundPlay(2000,2000,"weapons/flashbang/flashbang_explode1.wav")
  46. E:soundPlay(3000,3000,"weapons/flashbang/flashbang_explode2.wav")
  47. }
  48. if(Timer >= 10){
  49. soundStop(1000)
  50. Flash = 1
  51. }
  52. }
  53.  
  54.  
  55. if(Flash){
  56. E:setAlpha(0)
  57. holoCreate(1)
  58. holoModel(1,"icosphere3")
  59. holoAlpha(1,0)
  60. holoPos(1,E:pos()+vec(0,0,0))
  61. holoScale(1,vec(-50,-50,-50))
  62. holoParent(1,E)
  63. EE=holoEntity(1)
  64.  
  65. for(I=0,A:count()){
  66. Player = A[I,entity]
  67.  
  68. if(
  69. (Player:pos():distance(EE:pos())<400)
  70. ){
  71.  
  72. Start = 1
  73. }
  74. }
  75. }
  76.  
  77.  
  78. if(Start){
  79.  
  80.  
  81. for(I=1,A:count()){
  82. Player = A[I,entity]
  83.  
  84.  
  85. if(Player:pos():distance(EE:pos())<400)
  86. {
  87. if(Alpha > 0) {Alpha-=1}
  88. if(Alpha <= 0){selfDestructAll()}
  89. holoCreate(I+1)
  90. holoParentAttachment(I+1,Player,"anim_attachment_head")
  91. holoModel(I+1,"hqicosphere")
  92. holoPos(I+1,Player:pos()+vec(0,0,50))
  93. holoScale(I+1,vec(-5,-5,-5))
  94. holoColor(I+1,vec(255,255,255))
  95. holoAlpha(I+1,Alpha)
  96.  
  97. }
  98. Start = 0 }
  99. }
  100.  
  101. if(duped()){selfDestructAll()}
  102. if(duped()){selfDestructAll()}
  103.  
  104. ## Druecke E und es funktioniert ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement