Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. @name danger sensor
  2. @inputs
  3. @outputs
  4. @persist A:entity Sound Doors:array Trig
  5. @trigger
  6.  
  7.  
  8. interval(1000)
  9.  
  10. if(owner():keyUse()){
  11.  
  12. Trig = 0
  13.  
  14.  
  15. for(Door=1,Doors:count()){
  16. if(Doors[Door,entity] == owner():aimEntity()){Doors:remove(Door) Trig = 1 print(owner():aimEntity():toString()+ " removed")}
  17. }
  18.  
  19. if(Trig == 0){Doors:pushEntity(owner():aimEntity()) print(owner():aimEntity():toString() + " added")}
  20.  
  21.  
  22. }
  23.  
  24.  
  25.  
  26. for(Door=1,Doors:count()){
  27.  
  28.  
  29. findInSphere(Doors[Door,entity]:pos(),100)
  30. findIncludeClass("player")
  31. A = findClosest(entity():pos())
  32.  
  33.  
  34. if(Sound == 0){
  35. if(A:weapon():type() == "lockpick"){Sound = 10
  36. print("----------------------------------")
  37. print("WARNING LOCKPICK DETECTED")
  38. print("----------------------------------")
  39. }
  40.  
  41. if(A:weapon():type() == "keypad_cracker"){Sound = 10
  42. print("----------------------------------")
  43. print("WARNING KEYPAD CRACKER DETECTED")
  44. print("----------------------------------")
  45. }
  46.  
  47. if(A:weapon():type() == "door_ram"){Sound = 10
  48. print("----------------------------------")
  49. print("WARNING DOOR RAM DETECTED")
  50. print("----------------------------------")
  51. }
  52. }
  53.  
  54.  
  55. if(Sound == 10){
  56. owner():soundPlay(1,0,"npc_barney.ba_danger02")
  57. }
  58.  
  59. if(Sound!=0){Sound--}
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement