Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Simple Gauges
- @inputs Engine:entity
- @outputs
- @persist I
- @trigger none
- if( first() | duped() | dupefinished() )
- {
- ###########################################################################
- ## Welcome to Simple Gauges! Just wire Engine and parent this chip to your gate. ##
- ## This chip is made by DatAmazingCheese, feel free to give out but don't say it's yours :> ##
- GaugeColor = vec(255,255,255)
- NeedleColor = vec(200,0,0)
- Mode = "kph" ## Either "kph" or "mph" ##
- ###########################################################################
- ## Gauges
- holoCreate(1) # Speedometer
- holoModel(1,"models/sprops/trans/misc/gauge_1.mdl")
- holoColor(1,GaugeColor)
- holoSkin(1,1)
- holoPos(1,entity():toWorld(vec(0,3,0)))
- holoAng(1,entity():toWorld(ang(0,0,0)))
- holoParent(1,entity())
- holoCreate(2) # Tachometer
- holoModel(2,"models/sprops/trans/misc/gauge_1.mdl")
- holoColor(2,GaugeColor)
- holoSkin(2,0)
- holoPos(2,entity():toWorld(vec(0,-3,0)))
- holoAng(2,entity():toWorld(ang(0,0,0)))
- holoParent(2,entity())
- ## Needle Dummies
- holoCreate(3)
- holoModel(3,"")
- holoColor(3,NeedleColor)
- holoSkin(3,0)
- holoScale(3,vec(0.1,0.05,0.05))
- holoPos(3,entity():toWorld(vec(0,3,0)))
- holoAng(3,entity():toWorld(ang(0,0,0)))
- holoParent(3,entity())
- holoCreate(4)
- holoModel(4,"")
- holoColor(4,NeedleColor)
- holoSkin(4,0)
- holoScale(4,vec(0.1,0.05,0.05))
- holoPos(4,entity():toWorld(vec(0,-3,0)))
- holoAng(4,entity():toWorld(ang(0,0,0)))
- holoParent(4,entity())
- ## Needles
- holoCreate(5)
- holoModel(5,"models/holograms/prism.mdl")
- holoColor(5,NeedleColor)
- holoSkin(5,0)
- holoScale(5,vec(0.03,0.03,0.18))
- holoPos(5,entity():toWorld(vec(0.35,3,1.3)))
- holoAng(5,entity():toWorld(ang(0,90,0)))
- holoParent(5,3)
- holoCreate(6)
- holoModel(6,"models/holograms/prism.mdl")
- holoColor(6,NeedleColor)
- holoSkin(6,0)
- holoScale(6,vec(0.03,0.03,0.18))
- holoPos(6,entity():toWorld(vec(0.35,-3,1.3)))
- holoAng(6,entity():toWorld(ang(0,90,0)))
- holoParent(6,4)
- }
- interval(100)
- if( Mode == "kph" )
- {
- Speed = floor(entity():vel():length() / 10.9)
- }
- else
- {
- Speed = floor(entity():vel():length() / 17.6)
- }
- RPM = Engine:acfRPM()
- holoAng(3,Engine:vel():length():toWorld(ang(0,0,180-RPM/28.3)))
- holoAng(4,Engine:vel():length():toWorld(ang(0,0,180-Speed/0.565)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement