Advertisement
artemx32

priborka v2

Dec 5th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.44 KB | None | 0 0
  1. @name panel
  2. @inputs [Fuel RPM]:normal SpeedTarg:entity
  3. @outputs
  4. @persist [Arrows Others]:vector [RPM_PEAK Fuel_PEAK Speed_PEAK] [C_rpm C_fuel C_speed]
  5.  
  6. if(first()){
  7.  
  8.     Others      = vec(0,88,88)
  9.     Arrows      = vec(0,255,0)
  10.  
  11.     RPM_PEAK   = 5500
  12.     Fuel_PEAK  = 83.7
  13.     Speed_PEAK = 180
  14.  
  15.     holoCreate(0, entity():toWorld(vec(-7,3,0)), vec(1.17,0.01,0.7), entity():toWorld(ang(0,-3,5))), holoParent(0, entity()), holoMaterial(0, "models/shiny"), holoColor(0, vec(0,50,50))
  16.    
  17.     holoCreate(1, entity():toWorld(vec(7,3,0)), vec(1.17,0.01,0.7), entity():toWorld(ang(0,-177,-5))), holoParent(1, entity()), holoMaterial(1, "models/shiny"), holoColor(1, vec(0,50,50))
  18.    
  19.     holoCreate(2, entity():toWorld(vec(0,3.25,0)), vec(0.7,0.7,0.15), entity():toWorld(ang(90,90,0))), holoModel(2, "models/holograms/hq_tube.mdl"), holoParent(2, entity()), holoMaterial(2, "models/shiny"), holoColor(2, vec(0,50,50))
  20.  
  21.     holoCreate(2e3, entity():toWorld(vec(0,2.5,0)), vec(1), entity():toWorld(ang(0,90,0))), holoModel(2e3, "models/sprops/trans/misc/gauge_2.mdl"), holoParent(2e3, entity())
  22.        
  23.         holoClip(2e3, 1, vec(0.72,0,0),vec(-1,0,0), 0), holoClipEnabled(2e3, 1, 1)
  24.  
  25.     holoCreate(3, entity():toWorld(vec(6.2,3.25,-1)), vec(0.35,0.35,0.15), entity():toWorld(ang(90,100,0))), holoModel(3, "models/holograms/hq_tube_thin.mdl"), holoParent(3, entity()), holoMaterial(3, "models/shiny"), holoColor(3, vec(0,50,50))
  26.  
  27.         holoCreate(3e3, entity():toWorld(vec(6.13,3.6,-1)), vec(0.46), entity():toWorld(ang(0,100,0))), holoModel(3e3, "models/sprops/trans/misc/gauge_2.mdl"), holoSkin(3e3, 5), holoParent(3e3, entity())
  28.  
  29.         holoCreate(5020, entity():toWorld(vec(6.0802,3.9,-1)), vec(0.24), entity():toWorld(ang(90,100,0))), holoModel(5020, "models/holograms/hq_torus_thin.mdl"), holoMaterial(5020, "lights/white"), holoParent(5020, entity())
  30.  
  31.             holoClip(5020, 1, vec(),vec(0,-1,0), 0), holoClipEnabled(5020, 1, 1)
  32.  
  33.         holoCreate(5021, entity():toWorld(vec(6.0802,3.9,-1)), vec(0.24), entity():toWorld(ang(90,100,7))), holoModel(5021, "models/holograms/hq_torus_thin.mdl"), holoMaterial(5021, "lights/white"), holoParent(5021, entity())
  34.  
  35.             holoClip(5021, 1, vec(),vec(-1,1,0), 0), holoClipEnabled(5021, 1, 1)
  36.  
  37.  
  38.     holoCreate(4, entity():toWorld(vec(-6.2,3.25,-1)), vec(0.35,0.35,0.15), entity():toWorld(ang(90,80,0))), holoModel(4, "models/holograms/hq_tube_thin.mdl"), holoParent(4, entity()), holoMaterial(4, "models/shiny"), holoColor(4, vec(0,50,50))
  39.    
  40.         holoCreate(4e3, entity():toWorld(vec(-6.13,3.6,-1)), vec(0.46), entity():toWorld(ang(0,80,0))), holoModel(4e3, "models/sprops/trans/misc/gauge_2.mdl"), holoSkin(4e3, 6)   , holoParent(4e3, entity())
  41.  
  42.         holoCreate(5022, entity():toWorld(vec(-6.076,3.9,-1)), vec(0.24), entity():toWorld(ang(90,80,0))), holoModel(5022, "models/holograms/hq_torus_thin.mdl"), holoMaterial(5022, "lights/white"), holoParent(5022, entity())
  43.  
  44.             holoClip(5022, 1, vec(),vec(-0.77,-1,0), 0), holoClipEnabled(5022, 1, 1)
  45.        
  46.         holoCreate(5023, entity():toWorld(vec(-6.076,3.9,-1)), vec(0.24), entity():toWorld(ang(90,80,0))), holoModel(5023, "models/holograms/hq_torus_thin.mdl"), holoMaterial(5023, "lights/white"), holoParent(5023, entity())
  47.  
  48.             holoClip(5023, 1, vec(),vec(-0.82,1,0), 0), holoClipEnabled(5023, 1, 1)
  49.  
  50.     for(I = 0, 19){
  51.      
  52.         holoCreate(5e3 + I, entity():toWorld(vec(0.13+sin(I*18 + 3)*1.75,3.2,cos(I*18 + 3)*1.75)), vec(0.015,0.015,0.01), entity():toWorld(ang(90,90,0))), holoModel(5e3 + I, "models/holograms/hq_cylinder.mdl"), holoMaterial(5e3 + I, "lights/white"), holoParent(5e3 + I, entity())
  53.        
  54.     }
  55.  
  56.     # axles
  57.    
  58.     holoCreate(100, entity():toWorld(vec(0,3.2, 0)), vec(0.01), entity():toWorld(ang())), holoParent(100, entity())
  59.        
  60.         #ifdef entity:setdLight(vector, number, number)
  61.            
  62.             holoEntity(100):setdLight(Arrows, 3,10)
  63.        
  64.         #else
  65.  
  66.         #endif
  67.  
  68.     holoCreate(200, entity():toWorld(vec(6.13,3.9,-1)), vec(0.01), entity():toWorld(ang(0,100,0))), holoParent(200, entity())
  69.  
  70.     holoCreate(300, entity():toWorld(vec(-6.13,3.9,-1)), vec(0.01), entity():toWorld(ang(0,80,0))), holoParent(300, entity())
  71.  
  72.  
  73.     holoCreate(5024, entity():toWorld(vec(0,3.2, -2.2)), vec(0.02), entity():toWorld(ang(0,90,0))), holoParent(5024, 100), holoModel(5024, "models/holograms/prism.mdl"), holoMaterial(5024, "lights/white")
  74.  
  75.     holoCreate(5025, entity():toWorld(vec(6.13,3.9,-2.58)), vec(0.015), entity():toWorld(ang(0,10,0))), holoParent(5025, 200), holoModel(5025, "models/holograms/prism.mdl"), holoMaterial(5025, "lights/white")
  76.  
  77.     holoCreate(5026, entity():toWorld(vec(-6.13,3.9,-2.58)), vec(0.015), entity():toWorld(ang(0,-10,0))), holoParent(5026, 300), holoModel(5026, "models/holograms/prism.mdl"), holoMaterial(5026, "lights/white")
  78.  
  79.     for(I = 0, 26){
  80.  
  81.         if(I<24){
  82.  
  83.             holoColor(5e3+I, Others)
  84.  
  85.         }
  86.         if(I == 24 | I == 25 | I == 26){holoColor(5e3+I, Arrows)}
  87.    
  88.     }
  89.    
  90.     holoColor(5e3 + 10, vec(255))
  91.     holoColor(5e3 + 12, vec(255))
  92.     holoDelete(5e3 + 11)
  93.  
  94. }
  95.  
  96. interval(30)
  97.  
  98. E = entity()
  99.  
  100. C_rpm = -clamp(RPM,0,RPM_PEAK )/37
  101. C_fuel = -40 - clamp(Fuel,0,Fuel_PEAK )
  102. C_speed = clamp( (toUnit("km/h", SpeedTarg:vel():length())) ,0,Speed_PEAK )
  103.  
  104. holoAng(100, entity():toWorld(ang(0,90,-C_speed*1.75 )))
  105. holoAng(200, entity():toWorld(ang(0,100,C_rpm * 2 )))
  106. holoAng(300, entity():toWorld(ang(0,80,C_fuel * 2.6 )))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement