Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name PartyRaidingAlertSystem
- @outputs
- @persist Party:array OSaid:array Player:entity Radius I
- @persist Vec:vector Distance
- if(first() == 1 | duped() == 1){
- Party:pushEntity(owner())
- owner():sendMessage("Welcome to Reaper's Alarm System.")
- owner():sendMessage("To Use the Alarm Chip all commands must be preceded by a !")
- owner():sendMessage("Use !AddPlayer (player's name) to include someone to the whitelist")
- owner():sendMessage("Use !SetRadius followed by a number to set the radius of which the chip will detect someone")
- owner():sendMessage("Be Careful with who you add because you will now be able to remove them later unless you respawn the chip")
- }
- I = 0
- OSaid = owner():lastSaid():explode(" ")
- interval(500)
- runOnChat(1)
- if(OSaid[1,string] == "!AddPlayer" & chatClk(owner())){
- Party:pushEntity(findPlayerByName(OSaid[2,string]))
- concmd(
- "say "+findPlayerByName(OSaid[2,string]):name()+" has been added to your party!"
- )
- }
- elseif(OSaid[1,string] == "!SetRadius" & chatClk(owner())){
- Radius = OSaid[2,string]:toNumber()
- concmd("say Radius Set!")
- }
- findByClass("player")
- findExcludeEntities(Party)
- Player = findClosest(entity():pos())
- Vec = Player:pos() - entity():pos()
- Distance = sqrt(Vec:x()^2 + Vec:y()^2)
- if(Distance <= Radius){
- if(timerRunning("alarm") == 1){
- }
- elseif(timerRunning("alarm") != 1){
- timer("alarm",2500)
- concmd("say /p (E2 Alarm Chip) We are being raided!")
- }
- }
- elseif(Distance > Radius){
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement