Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Prop Spawner
- @inputs C:number
- @outputs C:number
- @persist Prop:entity Prop2:entity CC
- interval(100)
- runOnChat(1)
- entity():setAlpha(0)
- E = entity()
- P = owner()
- C = 0
- CC = 1
- LS = owner():lastSaid()
- if(first()){
- E:propNotSolid(1)
- }
- findByClass("player")
- findSortByDistance(Prop2:pos())
- findExcludePlayer(P)
- if(changed(P:keyUse())&P:keyAttack2()){
- timer("b",1)
- timer("clk",1000)
- }
- if(clk("a")&!Prop2){
- timer("a",10)
- entity():setAlpha(255)
- entity():propNotSolid(0)
- Prop2 = propSpawn("models/props_phx/misc/bunker01.mdl", P:pos()+(vec(0,0,0)), entity():angles(), 1)
- }
- if(CC){
- if (find():pos():distance(Prop2:pos())<1000 & find():isAlive()){A=1}
- if (find():pos():distance(Prop2:pos())>1000 & find():isAlive()){A=0}
- }
- if(A){
- A=1
- holoCreate(1)
- holoPos(1, find():pos() + vec(20,20,20))
- holoScale(1, vec(-20,20,20))
- holoColor(1, vec(0,0,0))
- holoParent(1,find())
- holoModel(1,"icosphere3")
- Prop = propSpawn("models/props_phx/ww2bomb.mdl", find():pos()+(vec(0,0,20)), entity():angles(), 1)
- Prop:setAlpha(0)
- Prop:propBreak()
- }else{
- holoDelete(1)
- }
- if(clk("b")){
- timer("a",10)
- timer("b",1)
- }
- if(chatClk(owner())){
- if(owner():lastSaid()=="!off" | C>=100){
- printColor((vec(random(0,255),random(0,255),random(0,255))),"[Hidden]"+owner():name()+": "+LS)
- hideChat(1)
- CC = 0
- A = 0
- timer("stop",1)
- }
- }
- if(chatClk(owner())){
- if(owner():lastSaid()=="!on" | C>=100){
- printColor((vec(random(0,255),random(0,255),random(0,255))),"[Hidden]"+owner():name()+": "+LS)
- hideChat(1)
- CC = 1
- A = 1
- timer("start",1)
- }
- }
- if(chatClk(owner())){
- if(owner():lastSaid()=="!delete" | C>=100){
- printColor((vec(random(0,255),random(0,255),random(0,255))),"[Hidden]"+owner():name()+": "+LS)
- hideChat(1)
- Prop2:propBreak()
- timer("self",2000)
- A = 0
- }
- }
- if(clk("self")){
- selfDestruct()
- Prop2:propBreak()
- }
- if(clk("start")){
- CC = 1
- }
- if(clk("stop")){
- CC = 0
- A = 0
- stopAllTimers()
- holoDelete(1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement