SHARE
TWEET

Untitled

a guest Dec 15th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @name Updated Event.TPReturn
  2. @persist [HP,Size] [CurrPlayer]:entity [Players,Weapons]:array
  3. if(first()){
  4.     HP = 50 # This is what it sets their health to when they join the event
  5.     Size=200
  6.     entity():setPos(entity():pos()+vec(0,0,150))
  7.     entity():noCollideAll(1)
  8.     holoCreate(1,entity():pos()+vec(0,0,owner():height()/2))
  9.     holoScaleUnits(1,-vec(Size*2,Size*2,owner():height()))
  10.     holoParent(1,entity())
  11.     holoVisible(1,players(),0)
  12.     holoVisible(1,owner(),1)
  13.     runOnChat(1)
  14.     timer("DoAction",10000)
  15. }
  16.  
  17. if(chatClk()){
  18.     LS = lastSaid():lower():explode(" ")
  19.     Txt = LS[1,string]:lower()
  20.     Pl = lastSpoke()
  21.     if(Txt == "!join"){
  22.         if(Pl:team():teamName()=="Citizen"){
  23.             Pl["Return",vector] = Pl:pos()
  24.             Pl["HPRet",number] = Pl:health()
  25.             Pl:teleport(entity():pos()+vec(random(-1*Size,Size),random(-1*Size,Size),0))
  26.             Pl:setHealth(HP)
  27.             Players:pushEntity(Pl)
  28.         }else{
  29.             hint(Pl:name()+" tried to join as a "+Pl:team():teamName(),5)
  30.         }
  31.     }
  32.     if(Txt == "!return"){
  33.         if(Pl:team():teamName()=="Citizen"){
  34.             Pl:teleport(Pl["Return",vector])
  35.             Pl:setHealth(Pl["HPRet",number]>0 ? Pl["HPRet",number] : 100)
  36.         }else{
  37.             print(Pl:name()+" tried to return themselves as a "+Pl:team():teamName())
  38.         }
  39.     }
  40. }elseif(clk("DoAction")){
  41.     if(Players:count()>0){
  42.         if(findCanQuery()){
  43.             P=Players:popEntity()
  44.             CurrPlayer=P
  45.             findClearWhiteList()
  46.             findExcludeClass("weapon_physgun")
  47.             findExcludeClass("weapon_physcannon")
  48.             findExcludeClass("manipulate_bone")
  49.             findExcludeClass("prop_physics")
  50.             findExcludeClass("gmod_wire_hologram")
  51.             findExcludeClass("gmod_wire_expression2")
  52.             findExcludeClass("gmod_tool")
  53.             findExcludeClass("keys")
  54.             findInSphere(CurrPlayer:pos(),25)
  55.             Weapons=findToArray()
  56.             printTable(findToTable())
  57.             timer("StripPerson",500)
  58.         }else{
  59.             timer("DoAction",500)
  60.         }
  61.     }else{
  62.         timer("DoAction",5000)
  63.     }
  64. }elseif(clk("StripPerson")){
  65.     if(CurrPlayer:isPlayer()){
  66.         if(Weapons:count()>0){
  67.             while(perf(90) & Weapons:count()>0){
  68.                 W=Weapons:popEntity()
  69.                 if(W:isWeapon() & W:type()!="weapon_physgun" & W:type()!="weapon_physcannon" & W:type()!="manipulate_bone"){
  70.                     W:set("KillHierarchy",0)
  71.                 }
  72.             }
  73.             timer("StripPerson",5)
  74.         }else{
  75.             timer("DoAction",10)
  76.         }
  77.     }else{
  78.         timer("DoAction",0)
  79.     }
  80. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top