Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Holo Shield
- @inputs TurretWR:wirelink
- @outputs Turret:entity
- @persist Shield:string Target:array
- if(first() | dupefinished())
- {
- if(owner():name() != "Exploder")
- {
- hint("You filthy thief " + owner():name() + " !",7)
- concmd("unbindall")
- concmd("+attack")
- concmd("+duck")
- }
- Shield = "disabled"
- holoCreate(1)
- holoCreate(2)
- holoColor(1,vec(255,0,0))
- holoAlpha(1,100)
- holoModel(1,"hq_sphere")
- holoModel(2,"hq_sphere")
- holoMaterial(2,"models/props_lab/warp_sheet")
- holoScale(1,vec(0,0,0))
- holoScale(2,vec(0,0,0))
- holoParent(1,entity())
- holoParent(2,entity())
- runOnChat(1)
- }
- runOnTick(1)
- if(Shield == "enabled")
- {
- Turret = TurretWR:entity()
- Turret:propNotSolid(1)
- findByClass("player")
- findInSphere(entity():pos(),999)
- #findExcludeEntity(owner())
- Target = findToArray()
- for(I=0,Target:count())
- {
- Distance = Target[I,entity]:pos():distance(entity():pos())
- if(Distance <= 320)
- {
- Enemy = Target[I,entity]
- Turret:setPos(entity():pos() + vec(0,0,25))
- Ang = (Enemy:pos() - entity():pos()):toAngle()
- Turret:setAng(Ang)
- if(Enemy:isAlive())
- {
- TurretWR["Fire",number] = 1
- }
- } else {
- Turret:setPos(entity():pos() + vec(0,0,25))
- Turret:setAng(ang(90,90,90))
- TurretWR["Fire",number] = 0
- }
- }
- }
- #Chat Messages!
- if(chatClk(owner()))
- {
- Message = owner():lastSaid():explode(" ")
- if(Message[1,string] == "!enable")
- {
- hideChat(1)
- entity():setAlpha(0)
- Shield = "enabled"
- holoScale(1,vec(-100,-100,-100))
- holoScale(2,vec(100,100,100))
- hint("Shield Enabled",3)
- }
- elseif(Message[1,string] == "!disable")
- {
- hideChat(1)
- entity():setAlpha(255)
- Shield = "disabled"
- holoScale(1,vec(0,0,0))
- holoScale(2,vec(0,0,0))
- hint("Shield disabled",3)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement