Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Sfera
- @persist [E O]:entity White:array Size Distans
- interval(100)
- if(first()){
- #noDuplications()
- E = entity()
- O = owner()
- Size = 1 #Max 7
- Distans = 5 #Max 10
- holoCreate(0,E:toWorld(vec(0)),vec(1)*Size,E:toWorld(ang()),vec(255,25,25),"icosphere3")
- holoMaterial(0,"models/XQM/LightLinesRed_tool") holoAlpha(0,150)
- # Sphere
- holoCreate(1,E:toWorld(vec(0)),vec(7)*Size,ang(),vec(25,250,25),"models/props_phx/construct/metal_dome360.mdl")
- #holoCreate(1,E:toWorld(vec(0,0,0)),vec(7)*Size,ang(),vec(25,250,25),"models/props_phx/construct/glass/glass_angle360.mdl")
- #holoCreate(2,E:toWorld(vec(0)),-vec(7)*Size,ang(),vec(25,25,25),"models/props_phx/construct/metal_dome360.mdl")
- holoMaterial(1,"debug/debugdrawflat")
- #holoMaterial(2,"debug/debugdrawflat")
- holoParent(0,E)
- holoParent(1,E)
- #holoParent(2,E)
- White:pushEntity(findPlayerByName("<hsv>Boop</hsv>"))
- } else {
- findIncludeClass("player")
- findIncludeClass("prop")
- if(findCanQuery()){
- findInSphere(E:pos(),330*Size)
- F = findToArray()
- local I = 0
- while( I < F:count() & perf() ){
- I++
- local Who = F:entity(I)
- local CanKill = 1
- foreach(J, E:entity = White) {
- if(E:name() == Who:name()) {
- findExcludePlayerProps(E:name())
- CanKill = 0
- break
- }
- }
- if(CanKill) {
- if(Who:isPlayer()){
- Who:setVel( (Who:pos() - E:pos())*Distans )
- }
- elseif(Who:isPhysics()){
- Who:setVel( (Who:pos() - E:pos())*Distans )
- Who:remove(1)
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement