Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name RiderE2V2
- @inputs
- @outputs
- @persist [E O Seat Seat2]:entity Speed XVel Col ADSpeed Act AR:array Music:array I Mode Aut
- @trigger
- @model models/hunter/plates/plate075x2.mdl
- # # # # # # # # # # # # # # # # # # # # # # # # #
- # BY ARKiSS 27.10.2021[updated 02.11.21] #
- # # # # # # # # # # # # # # # # # # # # # # # # #
- Driver = Seat:driver()
- W = Driver:keyForward()
- S = Driver:keyBack()
- A = Driver:keyLeft()
- D = Driver:keyRight()
- R = Driver:keyReload() # TO RESET RADAR
- Fafa = Driver:keyPressed("F") # FAFA
- if(duped()){ selfDestructAll() }
- if(first())
- {
- noDuplications()
- function entity cHolo(I:number,P:vector,Ang:angle,S:vector,C:vector){ holoCreate(I) holoPos(I,P) holoAng(I,Ang) holoScale(I,S) holoColor(I,C) holoParent(I,entity()) return holoEntity(I) }
- function entity cHolo(I:number,P:vector,Ang:angle,S:vector,C:vector,M:string){ holoCreate(I) holoPos(I,P) holoAng(I,Ang) holoScale(I,S) holoColor(I,C) holoParent(I,entity()) holoModel(I,M) return holoEntity(I) }
- function entity cHolo(I:number,P:vector,Ang:angle,S:vector,C:vector,Ent:entity){ holoCreate(I) holoPos(I,P) holoAng(I,Ang) holoScale(I,S) holoColor(I,C) holoParent(I,Ent) return holoEntity(I)}
- function entity cHolo(I:number,P:vector,Ang:angle,S:vector,C:vector,M:string,Ent:entity){ holoCreate(I) holoPos(I,P) holoAng(I,Ang) holoScale(I,S) holoColor(I,C) holoModel(I,M) holoParent(I,Ent) return holoEntity(I)}
- O = owner()
- E = entity()
- E:setAlpha(0)
- Seat = seatSpawn("models/nova/airboat_seat.mdl",1)
- Seat:setPos(E:toWorld(vec(-6,0,3)))
- Seat:setAng(E:toWorld(ang(0,0,0)))
- Seat:setMass(0)
- Seat:setAlpha(0)
- Seat2 = seatSpawn("models/nova/airboat_seat.mdl",1)
- Seat2:setPos(E:toWorld(vec(-6,-30,4)))
- Seat2:setAng(E:toWorld(ang(0,0,0)))
- Seat2:setMass(0)
- Seat2:setAlpha(0)
- E:setMass(500)
- Speed = 7
- ADSpeed = 30
- E["height",number] = 60
- holoCreate(1) holoAlpha(1,0)
- holoCreate(2) holoAlpha(2,0)
- holoParent(1,E)
- holoParent(2,E)
- # # # # # # # # # # # # # # # # # # # # # # # # # # WHEELS # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- cHolo(3,holoEntity(1):toWorld(vec(0,0,22)),holoEntity(1):toWorld(ang(0,0,0)),vec(0.7,1,1),vec(255),"models/nateswheel/nateswheel.mdl",holoEntity(1))
- cHolo(4,holoEntity(2):toWorld(vec(0,0,22)),holoEntity(2):toWorld(ang(0,0,0)),vec(0.7,1,1),vec(255),"models/nateswheel/nateswheel.mdl",holoEntity(2))
- cHolo(5,holoEntity(3):toWorld(vec(0,0,0)),holoEntity(3):toWorld(ang(90,0,0)),vec(1.95,1.95,1),vec(255),"models/mechanics/wheels/wheel_smooth_24.mdl",holoEntity(3))
- cHolo(6,holoEntity(4):toWorld(vec(0,0,0)),holoEntity(4):toWorld(ang(90,0,0)),vec(1.95,1.95,1),vec(255),"models/mechanics/wheels/wheel_smooth_24.mdl",holoEntity(4))
- cHolo(7,holoEntity(3):toWorld(vec(0,0,0)),holoEntity(3):toWorld(ang(90,0,0)),vec(1.3,1.3,1.6),vec(0,0,250),"models/mechanics/wheels/wheel_smooth_24.mdl",holoEntity(3))
- cHolo(8,holoEntity(4):toWorld(vec(0,0,0)),holoEntity(4):toWorld(ang(90,0,0)),vec(1.3,1.3,1.6),vec(0,0,250),"models/mechanics/wheels/wheel_smooth_24.mdl",holoEntity(4))
- # # # # # # # # # # # # # # # # # # # # # # # # # # END # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # BODY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- cHolo(9,E:toWorld(vec(-6,55,20)),E:toWorld(ang(-90,-90,0)),vec(0.4,0.5,0.6),vec(200),"models/props_combine/tprotato2.mdl",E)
- cHolo(10,E:toWorld(vec(-6,-55,15)),E:toWorld(ang(-4,90,0)),vec(1.2,0.8,0.35),vec(200),"models/vehicles/prisoner_pod.mdl",E)
- cHolo(11,E:toWorld(vec(-14,40,0)),E:toWorld(ang(0,0,90)),vec(1.0,1.5,1.8),vec(255),"models/props_combine/combine_light002a.mdl",E)
- cHolo(12,E:toWorld(vec(2,40,0)),E:toWorld(ang(0,180,-90)),vec(1.0,1.5,1.8),vec(255),"models/props_combine/combine_light002a.mdl",E)
- cHolo(13,E:toWorld(vec(0,32,10)),E:toWorld(ang(0,0,90)),vec(3.5,3.5,5.8),vec(255),"models/Items/battery.mdl",E)
- cHolo(14,E:toWorld(vec(-11.9,32,10)),E:toWorld(ang(180,0,90)),vec(3.5,3.5,5.8),vec(255),"models/Items/battery.mdl",E)
- cHolo(15,E:toWorld(vec(-6,-40,14)),E:toWorld(ang(0,0,-90)),vec(3.5,3.5,5.8),vec(255),"models/Items/combine_rifle_ammo01.mdl",E)
- cHolo(16,E:toWorld(vec(-6,-55,14)),E:toWorld(ang(0,0,-90)),vec(3.5,3.5,5.8),vec(255),"models/Items/combine_rifle_ammo01.mdl",E)
- cHolo(17,E:toWorld(vec(-6,0,27)),E:toWorld(ang(0,0,-95)),-vec(2,2,10),vec(0,75,110),"hq_sphere",E)
- holoClipEnabled(17,1)
- holoClip(17,1,vec(0,109.6,80),vec(0,-1,1),0)
- cHolo(18,E:toWorld(vec(-6,0,27)),E:toWorld(ang(0,0,-95)),vec(2.1,2.1,10),vec(0,200,255),"hq_sphere",E)
- holoMaterial(18,"debug/debugbrushwireframe") holoMaterial(17,"debug/debugdrawflat")
- holoClipEnabled(18,1)
- holoClip(18,1,vec(0,109.6,80),vec(0,-1,1),0)
- cHolo(19,E:toWorld(vec(-6-14,-46,0)),E:toWorld(ang(0,-90,-90)),vec(1.5,1.0,1.0),vec(0,0,70),"models/sprops/trans/exhaust/tip_4.mdl",E)
- cHolo(20,E:toWorld(vec(-6+14,-46,0)),E:toWorld(ang(0,-90,90)),vec(1.5,1.0,1.0),vec(0,0,70),"models/sprops/trans/exhaust/tip_4.mdl",E)
- cHolo(21,E:toWorld(vec(-6,-30,9)),E:toWorld(ang(-90,90,0)),vec(3.6,3.8,4.5),vec(0,0,70),"models/Items/combine_rifle_ammo01.mdl",E)
- cHolo(22,E:toWorld(vec(-6,31,20)),E:toWorld(ang(104,90,0)),vec(3.6,3.5,4.8),vec(0,0,70),"models/Items/combine_rifle_ammo01.mdl",E)
- cHolo(23,E:toWorld(vec(-6,31,20)),E:toWorld(ang(104,90,0)),vec(2,3.5,4.8),vec(0,0,70),"models/Items/combine_rifle_ammo01.mdl",E)
- cHolo(24,E:toWorld(vec(-6,0,27)),E:toWorld(ang(0,0,-95)),-vec(1.9,1.9,10),vec(255),"hq_sphere",E)
- holoMaterial(24,"debug/debugbrushwireframe")
- holoClipEnabled(24,1)
- holoClip(24,1,vec(0,109.6,80),vec(0,-1,1),0)
- cHolo(25,E:toWorld(vec(-6,0,27)),E:toWorld(ang(0,0,-95)),vec(2,2,10),vec(0,75,110),"hq_sphere",E)
- holoClipEnabled(25,1)
- holoClip(25,1,vec(0,109.6,80),vec(0,-1,1),0)
- holoAlpha(17,50)
- holoAlpha(24,10)
- holoAlpha(25,200)
- holoMaterial(3,"phoenix_storms/black_chrome") holoMaterial(5,"debug/debugdrawflat") holoMaterial(7,"models/shiny")
- holoMaterial(4,"phoenix_storms/black_chrome") holoMaterial(6,"debug/debugdrawflat") holoMaterial(8,"models/shiny")
- timer("par",300)
- holoCreate(26,E:toWorld(vec(-6,22.7,26.5))) #####
- holoScale(26,vec(1,0.5,0.5))
- holoColor(26,vec(0))
- holoModel(26,"models/sprops/trans/misc/gauge_3.mdl")
- holoAng(26,E:toWorld(ang(-28,-90,0)))
- holoSkin(26,4)
- holoParent(26,E)
- holoCreate(27,E:toWorld(vec(-6,21.5,26.5)))
- holoScale(27,vec(0.02))
- holoColor(27,vec(155,0,0))
- holoModel(27,"hq_sphere")
- holoAng(27,E:toWorld(ang(130,0,0)))
- holoParent(27,E)
- holoCreate(28,holoEntity(27):toWorld(vec(0,0,-0.4)))
- holoScale(28,vec(0.005,0.005,0.2))
- holoColor(28,vec(155,0,0))
- holoAng(28,holoEntity(27):toWorld(ang(0,0,0)))
- holoParent(28,27)
- holoMaterial(27,"debug/debugdrawflat")
- holoMaterial(28,"debug/debugdrawflat")
- cHolo(29,E:toWorld(vec(-6,31,21)),E:toWorld(ang(0,0,0)),vec(1.4,2,1.2),vec(0,110,200),"hq_sphere",E)
- holoMaterial(29,"phoenix_storms/indenttiles2")
- # cHolo(30,E:toWorld(vec()),E:toWorld(ang(0,0,0)),vec(10,20,12),vec(255),"hq_sphere",E)
- # holoMaterial(30,"models/weapons/v_smg1/texture5")
- #holoMaterial(30,"Models/effects/vol_light001")
- holoEntity(19):setTrails(30,50,0.5,"trails/physbeam",vec(220),200)
- holoEntity(20):setTrails(30,50,0.5,"trails/physbeam",vec(220),200)
- soundPlay("go",0,"vehicles/diesel_loop2.wav")
- holoCreate(31,E:toWorld(vec(-6,7.5,26.3))) holoModel(31,"models/bull/dynamicbuttonflat.mdl")
- holoColor(31,vec(0,150,220))
- holoScale(31,vec(1.5))
- holoParent(31,E)
- holoCreate(32,E:toWorld(vec(-6,7.5,26.3))) holoModel(32,"models/bull/dynamicbuttonflat.mdl")
- holoColor(32,vec(0,0,75))
- holoScale(32,vec(1.5))
- holoMaterial(32,"models/wireframe")
- holoParent(32,E)
- cHolo(200,E:toWorld(vec(18,-48,35)),E:toWorld(ang(0,180,-270)),vec(3.2,4.2,2.8),vec(200),"models/vehicles/inner_pod_rotator.mdl",E)
- Music[1,string] = "https://drive.google.com/uc?export=download&id=11AGSfxAiUFb6oOUUiwe-Ri6DDQQi6Esk"
- Music[2,string] = "https://drive.google.com/uc?export=download&id=16ZbHHwqnmtub3oNr8O0EF22msVMBSTag"
- Music[3,string] = "https://drive.google.com/uc?export=download&id=1U0D_gn42BCFzcmRD1Zh6VphIlgt6JfVM"
- Music[4,string] = "https://drive.google.com/uc?export=download&id=1E8QY356qkVSYSJSAm-5kfn07amsaae_H"
- Music[5,string] = "https://drive.google.com/file/d/1pRB05kOqpnrAxwLx1V62ldZoKUE5nz7u/view?usp=sharing"
- I = 0
- soundURLparent("1",E)
- function void numMus()
- {
- if(changed(!Seat:driver())){ Mode = 0 }
- local KLeft = Seat:driver():keyPressed("left")
- local KRight = Seat:driver():keyPressed("right")
- local KUp = Seat:driver():keyPressed("up")
- local KDown = Seat:driver():keyPressed("down")
- local TKey = Seat:driver():keyPressed("T")
- if(changed(TKey)&TKey){ Aut = !Aut }
- if(Aut & Seat:driver()){ Mode = 1 }else{ Mode = 0 }
- if(Mode == 1){ W = 1 }else{ W = W }
- if(changed(Mode==1)&Mode==1){ E:soundPlay("aut",0,"hl1/fvox/powermove_overload.wav") }
- if(changed(Mode==0)&Mode==0){ E:soundPlay("autDisable",0,"hl1/fvox/deactivated.wav") soundStop("aut")}
- if(changed(KLeft)&KLeft){ I-=1 E:soundPlay("ck2",0,"buttons/button17.wav") soundURLPurge() soundURLload("1",Music[I,string],100,0,E)}
- if(changed(KRight)&KRight){ I+=1 E:soundPlay("ck2",0,"buttons/button17.wav") soundURLPurge() soundURLload("1",Music[I,string],100,0,E)}
- if(changed(KUp)&KUp){ E:soundPlay("ck2",0,"buttons/button17.wav") soundURLplay("1") }
- if(changed(KDown)&KDown){ E:soundPlay("ck2",0,"buttons/button17.wav") soundURLpause("1") }
- if(I<=-1){ I = 0 }
- }
- }
- interval(40)
- numMus()
- Z = O:keyPressed("z")
- if(clk("par")){ Seat:setParent(E) Seat2:setParent(E) E:propFreeze(0) stoptimer("par") }
- rangerFilter(E:getConstraints():add(players()))
- FW = rangerOffset(E["height",number],E:toWorld(vec(-6,55,0)),-E:up())
- rangerFilter(E:getConstraints():add(players()))
- BW = rangerOffset(E["height",number],E:toWorld(vec(-6,-55,0)),-E:up())
- rangerFilter(E:getConstraints():add(players()))
- FW2 = rangerOffset(50,E:toWorld(vec(0,80,20)),-E:right())
- rangerFilter(E:getConstraints():add(players()))
- BW2 = rangerOffset(50,E:toWorld(vec(0,-80,20)),E:right())
- rangerFilter(E:getConstraints():add(players()))
- if(FW2:hit()){ W = 0 applyForce(E:right()*150*E:mass()) FW2:entity():applyForce(-E:right()*FW2:entity():mass()*120-FW2:entity():velL())}
- if(BW2:hit()){ S = 0 applyForce(-E:right()*150*E:mass()) BW2:entity():applyForce(E:right()*BW2:entity():mass()*120-BW2:entity():velL())}
- if(FW:hit()|BW:hit())
- {
- applyForce( ( vec( 0,0,(FW:hit()|BW:hit())*E["height",number]*0.7 - ((FW:distance()+BW:distance())/2 ))+-E:right()*(W-S) * Speed*2.15 - E:toWorldAxis(E:velL() * vec(0.025,0.020125,0.045)) )*E:mass() * 90/(500/13) )
- local StabFW = ((E:velL():x() * -E:forward() * (1.2 - 0)) + (E:velL():y() * E:right() * (-0.02 - (0+0)) ))*E:mass()
- applyForce(StabFW)
- Yaw = (A-D)
- Roll = (BW:distance()-FW:distance())/8
- local AngYaw = clamp(Yaw*ADSpeed*8,-55,55)*E:mass()*20
- E:applyTorque(vec(0,AngYaw,0))
- applyAngForce(( (-E:angles()*7 ):setYaw(0) - E:angVel()*2+ang(0,Yaw*ADSpeed*8-E:angVel():yaw(),clamp(Roll,-90,90)*100 ))*E:mass())
- }
- holoPos(1,FW:pos())
- holoPos(2,BW:pos())
- XVel=XVel+-E:velL():y()
- holoAng(3,holoEntity(1):toWorld(ang(0,0,XVel/2)))
- holoAng(4,holoEntity(2):toWorld(ang(0,0,XVel/2)))
- Col = (Col+0.1)%360
- holoColor(5,hsv2rgb(Col,Col,1))
- holoColor(6,hsv2rgb(Col,Col,1))
- holoColor(7,hsv2rgb(Col,Col,1))
- holoColor(8,hsv2rgb(Col,Col,1))
- soundPitch("go",abs(E:velL():y())/1.2*0.1+40)
- if(E:velL():y()>=0)
- {
- local YA = -180+clamp(E:velL():y()/4.1,0,450)
- holoAng(27,E:toWorld(ang(180+20,90,0-YA)))
- }
- if(E:velL():y()<0)
- {
- local YA = -180+clamp(-E:velL():y()/4.1,0,450)
- holoAng(27,E:toWorld(ang(180+20,90,0-YA)))
- }
- if(Fafa)
- {
- E:soundPlay("ss",0,"simulated_vehicles/horn_1.wav")
- timer("stp",300)
- }
- if(clk("stp"))
- {
- #soundStop("ss")
- stoptimer("stp")
- }
- if(changed(R)&R){ Act = !Act }
- if(Z){ propDeleteAll() selfDestruct()}
- findIncludeClass("player*")
- findInSphere(E:pos(),300)
- AR = findToArray()
- foreach(I,V:entity=AR)
- {
- if(V:owner() != owner()&V:isAlive())
- {
- Size = 70
- VPosX = V:pos():x()-E:pos():x()
- VPosY = V:pos():y()-E:pos():y()
- Pos = holoEntity(31):toWorld(vec(VPosX*cos(360/25*I),VPosY*sin(360/25*I),50)/Size)
- if(changed(AR:count())|AR:count()){ holoDisableShading(33+I,1) holoCreate(33+I) holoPos(33+I,Pos) holoParent(33+I,holoEntity(31)) holoModel(33+I,"hq_sphere") holoScale(33+I,vec(0.05)) holoColor(33+I,teamColor(V:team()))}
- if(V:pos():distance(E:pos())>290|AR:count()==0|!V:isAlive()){holoUnparent(33+I) holoDelete(33+I)}
- }
- }
- if(changed(R)&R)
- {
- for(I=1,30)
- {
- holoUnparent(33+I) holoDelete(33+I)
- }
- }
- setName("Rider-E2 by Arkiss")
Add Comment
Please, Sign In to add comment