Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. @name PartyRaidingAlertSystem
  2. @outputs
  3. @persist Party:array OSaid:array Player:entity Radius I
  4. @persist Vec:vector Distance
  5.  
  6. if(first() == 1 | duped() == 1){
  7. Party:pushEntity(owner())
  8. owner():sendMessage("Welcome to Reaper's Alarm System.")
  9. owner():sendMessage("To Use the Alarm Chip all commands must be preceded by a !")
  10. owner():sendMessage("Use !AddPlayer (player's name) to include someone to the whitelist")
  11. owner():sendMessage("Use !SetRadius followed by a number to set the radius of which the chip will detect someone")
  12. owner():sendMessage("Be Careful with who you add because you will now be able to remove them later unless you respawn the chip")
  13. }
  14.  
  15. I = 0
  16. OSaid = owner():lastSaid():explode(" ")
  17. interval(500)
  18. runOnChat(1)
  19.  
  20.  
  21.  
  22. if(OSaid[1,string] == "!AddPlayer" & chatClk(owner())){
  23. Party:pushEntity(findPlayerByName(OSaid[2,string]))
  24. concmd(
  25. "say "+findPlayerByName(OSaid[2,string]):name()+" has been added to your party!"
  26. )
  27. }
  28.  
  29. elseif(OSaid[1,string] == "!SetRadius" & chatClk(owner())){
  30. Radius = OSaid[2,string]:toNumber()
  31. concmd("say Radius Set!")
  32. }
  33.  
  34.  
  35. findByClass("player")
  36. findExcludeEntities(Party)
  37. Player = findClosest(entity():pos())
  38. Vec = Player:pos() - entity():pos()
  39. Distance = sqrt(Vec:x()^2 + Vec:y()^2)
  40.  
  41. if(Distance <= Radius){
  42. if(timerRunning("alarm") == 1){
  43.  
  44. }
  45. elseif(timerRunning("alarm") != 1){
  46. timer("alarm",2500)
  47. concmd("say /p (E2 Alarm Chip) We are being raided!")
  48. }
  49. }
  50. elseif(Distance > Radius){
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement