Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Speedometer e2
- @inputs RPM Gear
- @persist A
- @trigger
- #KPH
- if(first()|dupefinished()){
- Colour = vec(255,0,0)
- holoCreate(0,entity():toWorld(vec(1,-5,0)),vec()+0.03,entity():toWorld(ang()),Colour,"hq_cylinder")
- holoCreate(1,holoEntity(0):toWorld(vec(0,0,-0.08)),vec(0.55,0.015,0.03),holoEntity(0):toWorld(ang(0,0,0)),Colour,"hq_cylinder")
- holoParent(0,entity())
- holoParent(1,0)
- holoClipEnabled(1,1,1)
- holoClip(1,1,vec(-0.6,0,0),vec(1,0,0),0)
- }
- interval(33)
- Speed=round(toUnit("km/h",entity():vel():length()))
- AngleS = Speed*1.77 + 90
- holoAng(0,entity():toWorld(ang(AngleS,90,90)))
- #RPM
- if(first()|dupefinished()){
- holoCreate(2,entity():toWorld(vec(1,5,0)),vec()+0.03,entity():toWorld(ang()),Colour,"hq_cylinder")
- holoCreate(3,holoEntity(2):toWorld(vec(0,0,-0.08)),vec(0.55,0.015,0.03),holoEntity(0):toWorld(ang(-90,0,0)),Colour,"hq_cylinder")
- holoParent(2,entity())
- holoParent(3,2)
- holoClipEnabled(3,1,1)
- holoClip(3,1,vec(-0.6,0,0),vec(1,0,0),0)
- }
- AngleR = RPM/6 + 90
- holoAng(2,entity():toWorld(ang(AngleR,90,90)))
- #gagues
- if(first()|dupefinished()){
- holoCreate(4,entity():toWorld(vec(0,5,0)),vec(1),entity():toWorld(ang(0,0,0)),vec(50),"models/sprops/trans/misc/gauge_2.mdl")
- holoCreate(5,entity():toWorld(vec(0,-5,0)),vec(1),entity():toWorld(ang(0,0,0)),vec(50),"models/sprops/trans/misc/gauge_2.mdl")
- holoParent(4,entity())
- holoParent(5,entity())
- holoSkin(4,1)
- holoCreate(6,entity():toWorld(vec(0.7,6,-3)),vec(0.05,0.05,0.005),entity():toWorld(ang(90,0,0)),vec(10,10,10),"hq_cylinder")
- holoParent(6,entity())
- }
- if(RPM>=1600){A = !A}else{A =0}
- if(A){holoColor(6,vec(255,0,0))}else{holoColor(6,vec(10,10,10))}
- #gear
- if(first()|dupefinished()){
- holoCreate(7,entity():toWorld(vec(0,0,3)),vec(0.05),entity():toWorld(ang(90,0,0)),vec(50),"models/props_phx/construct/metal_wire1x1.mdl")
- holoCreate(8,entity():toWorld(vec(0,0,3)),vec(0.02,0.18,0.18),entity():toWorld(ang(0,0,0)),vec(50),"cube")
- holoMaterial(7,"wtp/paint_2")
- holoParent(7,entity())
- holoParent(8,entity())
- holoCreate(9,entity():toWorld(vec(0.1,0,3)),vec(0.1,0.1,0.1),entity():toWorld(ang(0,-90,0)),vec(200,0,0),"models/sprops/misc/alphanum/alphanum_0.mdl")
- holoParent(9,entity())
- holoMaterial(9,"wtp/paint_2")
- }
- if(Gear==-1){holoModel(9,"models/sprops/misc/alphanum/alphanum_r.mdl")}elseif(Gear==0){holoModel(9,"models/sprops/misc/alphanum/alphanum_n.mdl")}else
- {holoModel(9,"models/sprops/misc/alphanum/alphanum_"+Gear+".mdl")}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement