Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Yaka Arrow
- @persist [Prop,E,O,Target,Holo,Chest]:entity Targets:table [Off,Threat,Attack,Mode,Idle,Num,Timer,Z,SortOut]
- @persist [Forward,RedGlow]:vector [Modes,Infos,ArrayTargets,Sort]:array Ranger:ranger
- runOnTick(1)
- if(first()|dupefinished()) {
- E = entity()
- O = owner()
- Off = 1
- Idle = 1
- Prop = propSpawn("models/props_c17/tools_wrench01a.mdl",0)
- Prop:setAlpha(0)
- Prop:propGravity(0)
- Prop:setMass(50000)
- Mode = 0
- Threat = 0
- Num = 1
- Z = 1
- Modes = array("Single Target (Threat)", "Attack Target", "Group Selection", "Large Area Selection", "Front View Selection")
- Infos = array("Use to threat the target, the arrow will float around the target's head ready to kill him; Press E on someone to make the arrow float and point at him, press E once again to kill him or ALT to retreave the arrow.",
- "It will go to the position you are looking at, it will have no target but you can kill manually, hold E to make it move where you are aiming, release to make it go back.", "Select groups of targets, after killing the current target it will go for the next one, hold E while moving your mouse to select all the targets and release the button to send the arrow.",
- "Same as Group Selection, but selects all the targets around an area of about 6 meters of radius where you are aiming at, hold your E key to start selecting the targets and release it to send the arrow.",
- "Will select everyone in your field of view in a range of about 50 meters from you, press your E key once to release the arrow.")
- E:propNotSolid(1)
- E:setAlpha(0)
- #MainHolo#
- holoCreate(42)
- holoPos(42,Prop:pos())
- holoAng(42,Prop:angles())
- holoParent(42,Prop)
- holoAlpha(42,0)
- holoCreate(44)
- holoPos(44,O:attachmentPos("chest")) #This is some utter bullshit, i tried everything to fix the problem with the attachmentPos function but for some stupid reason this works, i hate my job
- holoAng(44,O:attachmentAng("chest"))
- holoParentAttachment(44,O,"chest")
- holoAlpha(44,0)
- holoCreate(43)
- holoPos(43,holoEntity(44):pos())
- holoAng(43,O:attachmentAng("chest"))
- holoParentAttachment(43,O,"chest")
- holoAlpha(43,0)
- Chest = holoEntity(43)
- ##Body##
- holoCreate(1)
- holoModel(1,"hq_cone")
- holoPos(1,holoEntity(42):toWorld(vec(0,-36,0)))
- holoAng(1,holoEntity(42):angles()+ang(0,0,90))
- holoParent(1,holoEntity(42))
- holoScale(1,vec(0.03,0.03,7))
- holoMaterial(1,"phoenix_storms/metal_plate")
- holoColor(1, vec(190))
- holoClipEnabled(1,1)
- holoClip(1, vec(0,0,-30),vec(0,0,-1),0)
- #########
- ##Head##
- holoCreate(2)
- holoModel(2,"pyramid")
- holoPos(2,holoEntity(42):toWorld(vec(0,-7.15,0)))
- holoAng(2,holoEntity(42):angles()+ang(45,0,90))
- holoParent(2,holoEntity(42))
- holoScale(2,vec(0.025,0.025,0.16))
- holoMaterial(2,"phoenix_storms/metal_plate")
- holoColor(2, vec(190))
- #########
- ##RedRing##
- holoCreate(3)
- holoModel(3,"hq_cylinder")
- holoPos(3,holoEntity(42):toWorld(vec(0,-6.05,0)))
- holoAng(3,holoEntity(42):angles()+ang(45,0,90))
- holoParent(3,holoEntity(42))
- holoScale(3,vec(0.023,0.023,0.03))
- holoColor(3, vec(145,0,0))
- #########
- ##YakaContainerBody1##
- holoCreate(4)
- holoModel(4,"hq_cylinder")
- holoPos(4,holoEntity(42):toWorld(vec(0,5.5,0.04)))
- holoAng(4,holoEntity(42):angles()+ang(0,0,91.1))
- holoParent(4,holoEntity(42))
- holoScale(4,vec(0.02,0.04,0.2))
- holoMaterial(4,"phoenix_storms/metal_plate")
- holoColor(4, vec(190))
- holoCreate(5)
- holoModel(5,"hq_cylinder")
- holoPos(5,holoEntity(42):toWorld(vec(0,5.5,-0.06)))
- holoAng(5,holoEntity(42):angles()+ang(0,0,88.9))
- holoParent(5,holoEntity(42))
- holoScale(5,vec(0.02,0.04,0.2))
- holoMaterial(5,"phoenix_storms/metal_plate")
- holoColor(5, vec(190))
- holoCreate(6)
- holoModel(6,"hq_sphere")
- holoPos(6,holoEntity(42):toWorld(vec(0,4.3,0)))
- holoAng(6,holoEntity(42):angles()+ang(0,0,90))
- holoParent(6,holoEntity(42))
- holoScale(6,vec(0.02,0.0431,0.2))
- holoMaterial(6,"phoenix_storms/metal_plate")
- holoColor(6, vec(190))
- holoCreate(7)
- holoModel(7,"hq_sphere")
- holoPos(7,holoEntity(42):toWorld(vec(0,6.7,-0.005)))
- holoAng(7,holoEntity(42):angles()+ang(0,0,90))
- holoParent(7,holoEntity(42))
- holoScale(7,vec(0.02,0.052,0.08))
- holoMaterial(7,"phoenix_storms/metal_plate")
- holoColor(7, vec(190))
- #########
- ##Yaka##
- holoCreate(8)
- holoModel(8,"hq_rcylinder")
- holoPos(8,holoEntity(42):toWorld(vec(0,5.35,-0.005)))
- holoAng(8,holoEntity(42):angles()+ang(0,0,90))
- holoParent(8,holoEntity(42))
- holoScale(8,vec(0.04,0.03,0.24))
- holoColor(8, vec(145,0,0))
- #########
- ##YakaContainerBody2##
- holoCreate(9)
- holoModel(9,"hq_cylinder")
- holoPos(9,holoEntity(42):toWorld(vec(0,5,-0.005)))
- holoAng(9,holoEntity(42):angles()+ang(0,0,90))
- holoParent(9,holoEntity(42))
- holoScale(9,vec(0.042,0.03,0.03))
- holoMaterial(9,"phoenix_storms/metal_plate")
- holoColor(9, vec(190))
- holoCreate(10)
- holoModel(10,"hq_cylinder")
- holoPos(10,holoEntity(42):toWorld(vec(0,5.85,-0.005)))
- holoAng(10,holoEntity(42):angles()+ang(0,0,90))
- holoParent(10,holoEntity(42))
- holoScale(10,vec(0.042,0.03,0.03))
- holoMaterial(10,"phoenix_storms/metal_plate")
- holoColor(10, vec(190))
- holoCreate(11)
- holoModel(11,"hq_cylinder")
- holoPos(11,holoEntity(42):toWorld(vec(0,6.4,-0.005)))
- holoAng(11,holoEntity(42):angles()+ang(0,0,90))
- holoParent(11,holoEntity(42))
- holoScale(11,vec(0.042,0.03,0.02))
- holoMaterial(11,"phoenix_storms/metal_plate")
- holoColor(11, vec(190))
- #########
- ##YakaContainerBody3##
- holoCreate(12)
- holoModel(12,"hq_sphere")
- holoPos(12,holoEntity(42):toWorld(vec(0,6.7,-0.005)))
- holoAng(12,holoEntity(42):angles()+ang(90,0,90))
- holoParent(12,holoEntity(42))
- holoScale(12,vec(0.03,0.04,0.09))
- holoMaterial(12,"phoenix_storms/metal_plate")
- holoColor(12, vec(190))
- holoCreate(13)
- holoModel(13,"hq_sphere")
- holoPos(13,holoEntity(42):toWorld(vec(0,4,-0.005)))
- holoAng(13,holoEntity(42):angles()+ang(90,0,90))
- holoParent(13,holoEntity(42))
- holoScale(13,vec(0.03,0.04,0.16))
- holoMaterial(13,"phoenix_storms/metal_plate")
- holoColor(13, vec(190))
- #########
- ##Body2##
- holoCreate(14)
- holoModel(14,"hq_cone")
- holoPos(14,holoEntity(42):toWorld(vec(0,12.9,-0.005)))
- holoAng(14,holoEntity(42):angles()+ang(0,180,90))
- holoParent(14,holoEntity(42))
- holoScale(14,vec(0.03,0.03,1))
- holoMaterial(14,"phoenix_storms/metal_plate")
- holoColor(14, vec(190))
- holoClipEnabled(14,1)
- holoClip(14,vec(0,0,-4.5),vec(0,0,-1),0)
- holoCreate(15)
- holoModel(15,"hq_sphere")
- holoPos(15,holoEntity(42):toWorld(vec(0,7.8,-0.005)))
- holoAng(15,holoEntity(42):angles()+ang(0,0,90))
- holoParent(15,holoEntity(42))
- holoScale(15,vec(0.028,0.028,0.3))
- holoMaterial(15,"phoenix_storms/gray_chrome")
- holoColor(15, vec(80))
- holoClipEnabled(15,1)
- holoClip(15,vec(0,0,-0.6),vec(0,0,-1),0)
- #########
- ##SmallRings##
- holoCreate(16)
- holoModel(16,"hq_torus_thick")
- holoPos(16,holoEntity(42):toWorld(vec(0,9.3,-0.005)))
- holoAng(16,holoEntity(42):angles()+ang(0,0,90))
- holoParent(16,holoEntity(42))
- holoScale(16,vec(0.02,0.02,0.02))
- holoColor(16, vec(145,0,0))
- holoCreate(17)
- holoModel(17,"hq_torus_thick")
- holoPos(17,holoEntity(42):toWorld(vec(0,9.55,-0.005)))
- holoAng(17,holoEntity(42):angles()+ang(0,0,90))
- holoParent(17,holoEntity(42))
- holoScale(17,vec(0.01,0.01,0.01))
- holoColor(17, vec(145,0,0))
- #########
- holoCreate(100)
- holoScale(100,vec())
- holoPos(100,O:attachmentPos("eyes"))
- Holo = holoEntity(100)
- print("To activate/disactivate it press your Left Shift and your R key, to change mode press your left/right arrow key, to print in chat the commands and how the mode you selected works, press your Down key")
- }
- Forward = Prop:right()
- ##GlowingRedEffect##
- RedGlow = Off ? vec(75,0,0) : vec((cos(curtime()*800)*40)+190,0,0)
- holoColor(3, RedGlow)
- holoColor(8, RedGlow)
- holoColor(16, RedGlow)
- holoColor(17, RedGlow)
- ############
- holoPos(100,O:attachmentPos("eyes"))
- holoAng(100,O:eyeAngles():setRoll(0))
- if(O:keyPressed("LSHIFT")) {
- if(changed(O:keyPressed("R"))&O:keyPressed("R")) {
- Off = !Off
- }
- }
- if(Off) {
- Prop:propNotSolid(1)
- }
- if(!Off) {
- if(!Target & Mode+1!=2) {
- Idle = 1
- Threat = 0
- }
- if(Idle) {
- Prop:propNotSolid(1)
- if(!inrange(Prop:pos(),O:pos()+vec(0,0,O:height()/2)-vec(100),O:pos()+vec(0,0,O:height()/2)+vec(100))) {
- Prop:setAng(((Prop:pos()-(O:pos()+vec(0,0,O:height()/2))):toAngle():setRoll(-(Prop:pos()-(O:pos()+vec(0,0,O:height()/2))):toAngle():pitch()))-ang(0,90,0))
- Prop:setPos(Prop:pos()+Forward*50)
- Prop:propFreeze(1)
- Target = noentity()
- }
- else {
- Prop:propFreeze(1)
- Prop:propNotSolid(1)
- Prop:setPos(Holo:toWorld(vec(10,-20,(cos(curtime()*90)*5))))
- Prop:setAng(O:eyeAngles()+ang(0,90,0))
- Target = noentity()
- }
- }
- if(changed(O:keyPressed("RIGHT"))&O:keyPressed("RIGHT")) {
- Mode = (Mode+1)%5
- print(_HUD_PRINTCENTER,Modes:string(Mode+1))
- soundPlay(1,100,"buttons/button22.wav")
- }
- if(changed(O:keyPressed("LEFT"))&O:keyPressed("LEFT")) {
- Mode = (Mode-1)%5
- print(_HUD_PRINTCENTER,Modes:string(Mode+1))
- soundPlay(1,100,"buttons/button22.wav")
- }
- if(changed(O:keyPressed("DOWN"))&O:keyPressed("DOWN")) {
- print(_HUD_PRINTCENTER,Modes:string(Mode+1))
- print(" " + Infos:string(Mode+1))
- soundPlay(1,100,"buttons/button22.wav")
- }
- if(Mode+1 == 1) {
- if(changed(O:keyPressed("E"))&O:keyPressed("E")) {
- if(Threat == 0) {
- Target = O:aimEntity()
- if(Target:isAlive()) {
- Idle = 0
- Threat = 1
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()*0.7))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()*0.7))):toAngle():pitch()))-ang(0,90,0))
- }
- }
- elseif(Threat == 1) {
- Prop:propFreeze(0)
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()/3))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()/3))):toAngle():pitch()))-ang(0,90,0))
- Prop:propNotSolid(0)
- Prop:applyForce(Forward*100000000)
- Prop:propNotSolid(0)
- Threat = 0
- timer("Idle1",400)
- }
- }
- elseif(changed(O:keyPressed("LALT"))&O:keyPressed("LALT")) {
- Threat = 0
- Idle = 1
- }
- if(Threat == 1) {
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()*0.85))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()*0.85))):toAngle():pitch()))-ang(0,90,0))
- Prop:setPos((((O:pos()+vec(0,0,O:height()/1.1))*0.97+(Target:pos()+vec(0,0,Target:height()/1.1))*1.03)/2)+vec(0,0,(cos(curtime()*170)*1.3)))
- }
- if(clk("Idle1")) {
- Idle = 1
- }
- }
- elseif(Mode+1 == 2) {
- if(inrange(Prop:pos(),O:pos()-vec(O:height()),O:pos()+vec(O:height()))) {
- Prop:propNotSolid(1)
- }
- else {
- Prop:propNotSolid(0)
- }
- if(O:keyPressed("E")) {
- Idle = 0
- if(!inrange(Prop:pos(),(O:aimPos())-vec(15),(O:aimPos()+vec(0,0,5))+vec(15))) {
- Prop:setAng(((Prop:pos()-(O:aimPos()+vec(0,0,5))):toAngle():setRoll(-(Prop:pos()-(O:aimPos()+vec(0,0,5))):toAngle():pitch()))-ang(0,90,0))
- Prop:applyForce(Forward*100000000)
- Prop:propFreeze(0)
- if(!inrange(Prop:pos(),O:pos()-vec(25,25,30),O:pos()+vec(25,25,100)) & !inrange(Prop:pos(),O:pos()-vec(O:height()),O:pos()+vec(O:height()))) {
- Prop:propNotSolid(0)
- }
- else {
- Prop:propNotSolid(1)
- }
- }
- else {
- Prop:propFreeze(1)
- Prop:setAng(((Prop:pos()-(O:aimPos()+vec(0,0,5))):toAngle():setRoll(-(Prop:pos()-(O:aimPos()+vec(0,0,5))):toAngle():pitch()))-ang(0,90,0))
- }
- }
- else {
- Idle = 1
- }
- }
- elseif(Mode+1 == 3) {
- if(inrange(Prop:pos(),O:pos()-vec(O:height()*2),O:pos()+vec(O:height()*2))) {
- Prop:propNotSolid(1)
- }
- else {
- Prop:propNotSolid(0)
- }
- if(O:keyPressed("E")) {
- if(O:aimEntity():isAlive()) {
- if(!Targets:exists(O:aimEntity():toString())) {
- Targets[O:aimEntity():toString(),entity] = O:aimEntity()
- ArrayTargets:insertEntity(1,O:aimEntity())
- print(_HUD_PRINTCENTER, ArrayTargets:count():toString() + " targets selected.")
- }
- }
- }
- else {
- if(changed(ArrayTargets:count()>0)) {
- if(ArrayTargets:count()>0) {
- Timer = curtime()+(0.005*ArrayTargets:count())
- }
- }
- if(Timer <= curtime() & Timer) {
- if(ArrayTargets:entity(Num):isAlive()) {
- Target = ArrayTargets:entity(Num)
- Idle = 0
- Prop:propFreeze(0)
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():pitch()))-ang(0,90,0))
- if(inrange(Prop:pos(),O:pos()-vec(O:height()),O:pos()+vec(O:height()))) {
- Prop:propNotSolid(0)
- }
- Prop:applyForce(Forward*1000000*((Prop:pos()-Target:pos()):length()/1.5))
- Ranger = rangerOffset(35,Prop:pos(),Forward)
- rangerHitEntities(1)
- rangerHitWater(0)
- if(Ranger:hit()) {
- if(!Ranger:entity():isAlive()) {
- Prop:propNotSolid(1)
- if(changed(Ranger:hit())) {
- Prop:soundPlay(1,100,"MetalVent.ImpactHard")
- }
- }
- else {
- Prop:propNotSolid(0)
- }
- }
- }
- else {
- Num += 1
- print(_HUD_PRINTCENTER, (ArrayTargets:count()-Num+1) + " targets left.")
- }
- if(Num > ArrayTargets:count()) {
- Idle = 1
- Targets:clear()
- ArrayTargets:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- print(_HUD_PRINTCENTER, "All targets have been killed.")
- }
- }
- }
- }
- elseif(Mode+1 == 4) {
- if(inrange(Prop:pos(),O:pos()-vec(O:height()*2),O:pos()+vec(O:height()*2))) {
- Prop:propNotSolid(1)
- }
- else {
- Prop:propNotSolid(0)
- }
- if(O:keyPressed("E")) {
- findInSphere(O:aimPos(),300)
- findIncludeClass("player")
- findIncludeClass("npc_*")
- Sort = findToArray()
- if(Sort:count()) {
- for(I=1,Sort:count()) {
- if(Sort:entity(I):isAlive()&!Sort:entity(I):inNoclip()) {
- if(!Targets:exists(Sort:entity(I):toString()) & Sort:entity(I)!=O) {
- Targets[Sort:entity(I):toString(),entity] = Sort:entity(I)
- ArrayTargets:insertEntity(1,Sort:entity(I))
- print(_HUD_PRINTCENTER, ArrayTargets:count():toString() + " targets selected.")
- }
- }
- else {
- Sort:removeEntity(I)
- }
- }
- ###DoubleCheck## The first time is not enought, this seems to work fine
- for(I=1,Sort:count()) {
- if(Sort:entity(I):isAlive()&!Sort:entity(I):inNoclip()) {
- if(!Targets:exists(Sort:entity(I):toString()) & Sort:entity(I)!=O) {
- Targets[Sort:entity(I):toString(),entity] = Sort:entity(I)
- ArrayTargets:insertEntity(1,Sort:entity(I))
- print(_HUD_PRINTCENTER, ArrayTargets:count():toString() + " targets selected.")
- }
- }
- else {
- Sort:removeEntity(I)
- }
- }
- }
- }
- else {
- if(changed(ArrayTargets:count()>0)) {
- if(ArrayTargets:count()>0) {
- Timer = curtime()+(0.005*ArrayTargets:count())
- }
- }
- if(Timer <= curtime() & Timer) {
- if(ArrayTargets:entity(Num):isAlive()&!ArrayTargets:entity(Num):inNoclip()) {
- Target = ArrayTargets:entity(Num)
- Idle = 0
- Prop:propFreeze(0)
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():pitch()))-ang(0,90,0))
- if(inrange(Prop:pos(),O:pos()-vec(O:height()),O:pos()+vec(O:height()))) {
- Prop:propNotSolid(0)
- }
- else {
- Prop:propNotSolid(1)
- }
- Prop:applyForce(Forward*1000000*((Prop:pos()-Target:pos()):length()/1.5))
- Ranger = rangerOffset(35,Prop:pos(),Forward)
- rangerHitEntities(1)
- rangerHitWater(0)
- if(Ranger:hit()) {
- if(!Ranger:entity():isAlive()) {
- Prop:propNotSolid(1)
- if(changed(Ranger:hit())) {
- Prop:soundPlay(1,100,"MetalVent.ImpactHard")
- }
- }
- else {
- Prop:propNotSolid(0)
- }
- }
- }
- else {
- Num += 1
- print(_HUD_PRINTCENTER, (ArrayTargets:count()-Num+1) + " targets left.")
- }
- if(Num > ArrayTargets:count()) {
- Idle = 1
- Targets:clear()
- ArrayTargets:clear()
- Sort:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- print(_HUD_PRINTCENTER, "All targets have been killed.")
- }
- }
- }
- }
- elseif(Mode+1 == 5) {
- if(inrange(Prop:pos(),O:pos()-vec(O:height()*2),O:pos()+vec(O:height()*2))) {
- Prop:propNotSolid(1)
- }
- else {
- Prop:propNotSolid(0)
- }
- if(changed(O:keyPressed("E"))&O:keyPressed("E")) {
- findInCone(O:shootPos(),O:eyeAngles():forward(),2500,53)
- findIncludeClass("player")
- findIncludeClass("npc_*")
- Sort = findToArray()
- }
- if(changed(Sort:count())) {
- SortOut = 1
- }
- if(SortOut == 1) {
- if(Sort:entity(Z):isAlive()&!Sort:entity(Z):inNoclip()) {
- if(!Targets:exists(Sort:entity(Z):toString()) & Sort:entity(Z)!=O) {
- Targets[Sort:entity(Z):toString(),entity] = Sort:entity(Z)
- ArrayTargets:insertEntity(1,Sort:entity(Z))
- Z += 1
- print(_HUD_PRINTCENTER, ArrayTargets:count():toString() + " targets selected.")
- }
- }
- else {
- Sort:removeEntity(Z)
- }
- }
- if(changed(ArrayTargets:count()) & ArrayTargets:count()) {
- if(ArrayTargets:count()>0) {
- Timer = curtime()+(0.005*Sort:count())
- }
- }
- if(Timer <= curtime() & Timer) {
- if(ArrayTargets:entity(Num):isAlive()&!ArrayTargets:entity(Num):inNoclip()) {
- Target = ArrayTargets:entity(Num)
- Idle = 0
- Prop:propFreeze(0)
- Prop:setAng(((Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():setRoll(-(Prop:pos()-(Target:pos()+vec(0,0,Target:height()/1.3))):toAngle():pitch()))-ang(0,90,0))
- if(inrange(Prop:pos(),O:pos()-vec(O:height()),O:pos()+vec(O:height()))) {
- Prop:propNotSolid(0)
- }
- else {
- Prop:propNotSolid(1)
- }
- Prop:applyForce(Forward*1000000*((Prop:pos()-Target:pos()):length()/1.5))
- Ranger = rangerOffset(35,Prop:pos(),Forward)
- rangerHitEntities(1)
- rangerHitWater(0)
- if(Ranger:hit()) {
- if(!Ranger:entity():isAlive()) {
- Prop:propNotSolid(1)
- if(changed(Ranger:hit())) {
- Prop:soundPlay(1,100,"MetalVent.ImpactHard")
- }
- }
- else {
- Prop:propNotSolid(0)
- }
- }
- }
- else {
- Num += 1
- print(_HUD_PRINTCENTER, (ArrayTargets:count()-Num+1) + " targets left.")
- }
- if(Num > ArrayTargets:count()) {
- Idle = 1
- Targets:clear()
- ArrayTargets:clear()
- Sort:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- Z = 1
- SortOut = 0
- print(_HUD_PRINTCENTER, "All targets have been killed.")
- }
- }
- }
- if(changed(Mode)) {
- Idle = 1
- Targets:clear()
- ArrayTargets:clear()
- Sort:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- Z = 1
- SortOut = 0
- }
- }
- else {
- Prop:setPos(Chest:toWorld(vec(0,-8.5,-5)))
- }
- if(changed(Off)) {
- if(!Off) {
- holoEntity(16):setTrails(1,1,4,"trails/laser",vec(255,0,0),255)
- print(_HUD_PRINTCENTER,Modes:string(Mode+1))
- holoPos(42,Prop:pos())
- holoAng(42,Prop:angles())
- holoParent(42,Prop)
- Idle = 1
- Targets:clear()
- ArrayTargets:clear()
- Sort:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- Z = 1
- SortOut = 0
- }
- elseif(Off) {
- holoEntity(16):removeTrails()
- holoUnparent(42)
- holoPos(42,Chest:toWorld(vec(0,-8.5,-5)))
- holoAng(42, Chest:angles()+ang(0,90,-30))
- holoParent(42,Chest)
- Prop:propNotSolid(1)
- }
- }
- if(!Prop:isValid()) {
- E:propDelete()
- }
- if(ops() == (maxquota()*0.9)) {
- Idle = 1
- ArrayTargets:clear()
- Targets:clear()
- Target = noentity()
- Num = 1
- Timer = 0
- Sort:clear()
- SortOut = 0
- Z = 1
- print(_HUD_PRINTCENTER,"Too many targets selected! Action aborted!")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement