Advertisement
CheezusCrust

Untitled

Feb 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.88 KB | None | 0 0
  1. @name Dimensions_E2 [Jan]
  2. @inputs [Button]:number
  3. @outputs
  4. @persist [E]:entity [L_Inch, H_Inch, W_Inch, Wheel_Base, Track, Wheel_Size, Floor_Enabled]:number
  5. @persist [Current_Car]:string [Wheels_Enabled, Wheel_Base_Enabled, Overhang_Front, Dimension_Height]:number
  6. @persist [X_Axis, Z_Axis, Y_Axis, Wheel_Color, Main_Color, Floor_Color, Sphere_Color]:vector4
  7. @persist [Sphere_Size]:vector
  8. @model models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl
  9. @trigger [Button]
  10.  
  11. if (duped() | dupefinished()) {reset()}
  12.  
  13. if (first()) {
  14.  
  15. ###############
  16. ##Made By Jan##
  17. ###############
  18.  
  19. #[
  20. First of all here are some things to know :
  21.  
  22. L_Inch is Length in Inches
  23. H_Inch is Height in Inches
  24. W_Inch is Width in Inches
  25. Wheel_Base are the Inches between the front and the rear wheels
  26. Track is the space in Inches between the left and right wheel
  27. Dimension_Height is the space between the e2 and the Dimension holo's
  28.  
  29. Have fun and good luck!
  30. ]#
  31.  
  32. ## Current_Car. ##
  33. Current_Car = "CAR NAME HERE"
  34.  
  35. ## Dimensions. ##
  36. L_Inch = 182.7
  37. H_Inch = 56.7
  38. W_Inch = 68.1
  39. Wheel_Base = 103.1
  40. Track = 53.1
  41.  
  42. ## Things to enable or disable, Also some settings. ##
  43. Wheels_Enabled = 1
  44. Wheel_Base_Enabled = 1
  45. Wheel_Size = 25
  46. Dimension_Height = 0
  47. Sphere_Size = vec(0.65, 0.65, 0.65)
  48. Overhang_Front = 19
  49. Floor_Enabled = 1
  50.  
  51. ## Colors. ##
  52. X_Axis = vec4(0, 255, 0, 255)
  53. Z_Axis = vec4(0, 0, 255, 255)
  54. Y_Axis = vec4(255, 0, 0, 255)
  55. Wheel_Color = vec4(0, 255, 0, 225)
  56. Main_Color = vec4(255, 255, 0, 0)
  57. Floor_Color = vec4(100, 100, 100, 200)
  58. Sphere_Color = vec4(0, 0, 0, 225)
  59.  
  60. ## Do not change anything below this line, the code might break if you do change things. ##
  61.  
  62. setName(
  63. "Dimensions" + "\n"
  64. + "Current_Car : " + Current_Car + "\n"
  65. + "Length : " + L_Inch + "\n"
  66. + "Height : " + H_Inch + "\n"
  67. + "Width : " + W_Inch + "\n"
  68. + "Track : " + Track + "\n"
  69. + "Wheel_Base : " + Wheel_Base + "\n"
  70. + "Overhang_Front : " + Overhang_Front + "\n"
  71. + "Wheel_Size : " + Wheel_Size + "\n"
  72. + "Made by : Jan"
  73. )
  74.  
  75. E = entity()
  76.  
  77. holoCreate(1, E:toWorld(vec(0, 0, H_Inch / 2 + Dimension_Height)))
  78. holoScale(1, vec(W_Inch / 12, L_Inch / 12, H_Inch / 12))
  79. holoAng(1, E:toWorld(ang(0, 0, 0)))
  80. holoModel(1, "models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl")
  81. holoColor(1, Main_Color)
  82.  
  83. holoCreate(2, E:toWorld(vec(0, L_Inch / 2, Dimension_Height)))
  84. holoScale(2, vec(0.75, 0.75, W_Inch / 6))
  85. holoAng(2, E:toWorld(ang(0, 90, 90)))
  86. holoModel(2, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
  87. holoColor(2, X_Axis)
  88.  
  89. holoCreate(3, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
  90. holoScale(3, vec(0.75, 0.75, H_Inch / 6))
  91. holoAng(3, E:toWorld(ang(0, 90, 0)))
  92. holoModel(3, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
  93. holoColor(3, Z_Axis)
  94.  
  95. holoCreate(4, E:toWorld(vec(-W_Inch / 2, 0, Dimension_Height)))
  96. holoScale(4, vec(0.75, 0.75, L_Inch / 12))
  97. holoAng(4, E:toWorld(ang(0, 0, 90)))
  98. holoModel(4, "models/sprops/cylinders/size_1/cylinder_1_5x12.mdl")
  99. holoColor(4, Y_Axis)
  100.  
  101. if (Floor_Enabled) {
  102. holoCreate(5, E:toWorld(vec(0, 0, Dimension_Height)))
  103. holoScale(5, vec(W_Inch / 6, L_Inch / 6, 0.5))
  104. holoAng(5, E:toWorld(ang(0, 0, 0)))
  105. holoModel(5, "models/sprops/rectangles_thin/size_1_5/rect_6x6x1_5.mdl")
  106. holoColor(5, Floor_Color)
  107. }
  108.  
  109. holoCreate(6, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, Dimension_Height)))
  110. holoScale(6, Sphere_Size)
  111. holoAng(6, E:toWorld(ang(0, 0, 0)))
  112. holoModel(6, "models/sprops/geometry/sphere_3.mdl")
  113. holoColor(6, Sphere_Color)
  114.  
  115. holoCreate(7, E:toWorld(vec(0, L_Inch / 2, Dimension_Height)))
  116. holoScale(7, Sphere_Size)
  117. holoAng(7, E:toWorld(ang(0, 0, 0)))
  118. holoModel(7, "models/sprops/geometry/sphere_3.mdl")
  119. holoColor(7, Sphere_Color)
  120.  
  121. holoCreate(8, E:toWorld(vec(W_Inch / 2, L_Inch / 2, Dimension_Height)))
  122. holoScale(8, Sphere_Size)
  123. holoAng(8, E:toWorld(ang(0, 0, 0)))
  124. holoModel(8, "models/sprops/geometry/sphere_3.mdl")
  125. holoColor(8, Sphere_Color)
  126.  
  127. holoCreate(9, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
  128. holoScale(9, Sphere_Size)
  129. holoAng(9, E:toWorld(ang(0, 0, 0)))
  130. holoModel(9, "models/sprops/geometry/sphere_3.mdl")
  131. holoColor(9, Sphere_Color)
  132.  
  133. holoCreate(10, E:toWorld(vec(W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
  134. holoScale(10, Sphere_Size)
  135. holoAng(10, E:toWorld(ang(0, 0, 0)))
  136. holoModel(10, "models/sprops/geometry/sphere_3.mdl")
  137. holoColor(10, Sphere_Color)
  138.  
  139. holoCreate(11, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch + Dimension_Height)))
  140. holoScale(11, Sphere_Size)
  141. holoAng(11, E:toWorld(ang(0, 0, 0)))
  142. holoModel(11, "models/sprops/geometry/sphere_3.mdl")
  143. holoColor(11, Sphere_Color)
  144.  
  145. holoCreate(12, E:toWorld(vec(0, L_Inch / 2, H_Inch + Dimension_Height)))
  146. holoScale(12, Sphere_Size)
  147. holoAng(12, E:toWorld(ang(0, 0, 0)))
  148. holoModel(12, "models/sprops/geometry/sphere_3.mdl")
  149. holoColor(12, Sphere_Color)
  150.  
  151. holoCreate(13, E:toWorld(vec(W_Inch / 2, L_Inch / 2, H_Inch + Dimension_Height)))
  152. holoScale(13, Sphere_Size)
  153. holoAng(13, E:toWorld(ang(0, 0, 0)))
  154. holoModel(13, "models/sprops/geometry/sphere_3.mdl")
  155. holoColor(13, Sphere_Color)
  156.  
  157. holoCreate(14, E:toWorld(vec(-W_Inch / 2, 0, Dimension_Height)))
  158. holoScale(14, Sphere_Size)
  159. holoAng(14, E:toWorld(ang(0, 0, 0)))
  160. holoModel(14, "models/sprops/geometry/sphere_3.mdl")
  161. holoColor(14, Sphere_Color)
  162.  
  163. holoCreate(15, E:toWorld(vec(W_Inch / 2, 0, Dimension_Height)))
  164. holoScale(15, Sphere_Size)
  165. holoAng(15, E:toWorld(ang(0, 0, 0)))
  166. holoModel(15, "models/sprops/geometry/sphere_3.mdl")
  167. holoColor(15, Sphere_Color)
  168.  
  169. holoCreate(16, E:toWorld(vec(-W_Inch / 2, 0, H_Inch + Dimension_Height)))
  170. holoScale(16, Sphere_Size)
  171. holoAng(16, E:toWorld(ang(0, 0, 0)))
  172. holoModel(16, "models/sprops/geometry/sphere_3.mdl")
  173. holoColor(16, Sphere_Color)
  174.  
  175. holoCreate(17, E:toWorld(vec(W_Inch / 2, 0, H_Inch + Dimension_Height)))
  176. holoScale(17, Sphere_Size)
  177. holoAng(17, E:toWorld(ang(0, 0, 0)))
  178. holoModel(17, "models/sprops/geometry/sphere_3.mdl")
  179. holoColor(17, Sphere_Color)
  180.  
  181. holoCreate(18, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, Dimension_Height)))
  182. holoScale(18, Sphere_Size)
  183. holoAng(18, E:toWorld(ang(0, 0, 0)))
  184. holoModel(18, "models/sprops/geometry/sphere_3.mdl")
  185. holoColor(18, Sphere_Color)
  186.  
  187. holoCreate(19, E:toWorld(vec(0, -L_Inch / 2, Dimension_Height)))
  188. holoScale(19, Sphere_Size)
  189. holoAng(19, E:toWorld(ang(0, 0, 0)))
  190. holoModel(19, "models/sprops/geometry/sphere_3.mdl")
  191. holoColor(19, Sphere_Color)
  192.  
  193. holoCreate(20, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, Dimension_Height)))
  194. holoScale(20, Sphere_Size)
  195. holoAng(20, E:toWorld(ang(0, 0, 0)))
  196. holoModel(20, "models/sprops/geometry/sphere_3.mdl")
  197. holoColor(20, Sphere_Color)
  198.  
  199. holoCreate(21, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, H_Inch / 2 + Dimension_Height)))
  200. holoScale(21, Sphere_Size)
  201. holoAng(21, E:toWorld(ang(0, 0, 0)))
  202. holoModel(21, "models/sprops/geometry/sphere_3.mdl")
  203. holoColor(21, Sphere_Color)
  204.  
  205. holoCreate(22, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, H_Inch / 2 + Dimension_Height)))
  206. holoScale(22, Sphere_Size)
  207. holoAng(22, E:toWorld(ang(0, 0, 0)))
  208. holoModel(22, "models/sprops/geometry/sphere_3.mdl")
  209. holoColor(22, Sphere_Color)
  210.  
  211. holoCreate(23, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, H_Inch + Dimension_Height)))
  212. holoScale(23, Sphere_Size)
  213. holoAng(23, E:toWorld(ang(0, 0, 0)))
  214. holoModel(23, "models/sprops/geometry/sphere_3.mdl")
  215. holoColor(23, Sphere_Color)
  216.  
  217. holoCreate(24, E:toWorld(vec(0, -L_Inch / 2, H_Inch + Dimension_Height)))
  218. holoScale(24, Sphere_Size)
  219. holoAng(24, E:toWorld(ang(0, 0, 0)))
  220. holoModel(24, "models/sprops/geometry/sphere_3.mdl")
  221. holoColor(24, Sphere_Color)
  222.  
  223. holoCreate(25, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, H_Inch + Dimension_Height)))
  224. holoScale(25, Sphere_Size)
  225. holoAng(25, E:toWorld(ang(0, 0, 0)))
  226. holoModel(25, "models/sprops/geometry/sphere_3.mdl")
  227. holoColor(25, Sphere_Color)
  228.  
  229. if (Wheels_Enabled) {
  230. holoCreate(26, E:toWorld(vec(-Track / 2, ((L_Inch / 2) - Overhang_Front), (Wheel_Size / 2) + Dimension_Height)))
  231. holoScale(26, vec(Wheel_Size / 25))
  232. holoAng(26, E:toWorld(ang(0, 90, 0)))
  233. holoModel(26, "models/sprops/trans/wheel_d/t_wheel25.mdl")
  234. holoColor(26, Wheel_Color)
  235.  
  236. holoCreate(27, E:toWorld(vec(Track / 2, ((L_Inch / 2) - Overhang_Front), (Wheel_Size / 2) + Dimension_Height)))
  237. holoScale(27, vec(Wheel_Size / 25))
  238. holoAng(27, E:toWorld(ang(0, -90, 0)))
  239. holoModel(27, "models/sprops/trans/wheel_d/t_wheel25.mdl")
  240. holoColor(27, Wheel_Color)
  241.  
  242. holoCreate(28, E:toWorld(vec(-Track / 2, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, (Wheel_Size / 2) + Dimension_Height)))
  243. holoScale(28, vec(Wheel_Size / 25))
  244. holoAng(28, E:toWorld(ang(0, 90, 0)))
  245. holoModel(28, "models/sprops/trans/wheel_d/t_wheel25.mdl")
  246. holoColor(28, Wheel_Color)
  247.  
  248. holoCreate(29, E:toWorld(vec(Track / 2, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, (Wheel_Size / 2) + Dimension_Height)))
  249. holoScale(29, vec(Wheel_Size / 25))
  250. holoAng(29, E:toWorld(ang(0, -90, 0)))
  251. holoModel(29, "models/sprops/trans/wheel_d/t_wheel25.mdl")
  252. holoColor(29, Wheel_Color)
  253. }
  254.  
  255. if (Wheel_Base_Enabled) {
  256. holoCreate(30, E:toWorld(vec(-W_Inch / 2 + 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base/2, 0.5 + Dimension_Height)))
  257. holoScale(30, vec(1, 1, Wheel_Base / 6))
  258. holoAng(30, E:toWorld(ang(0, 0, 90)))
  259. holoModel(30, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
  260. holoColor(30, Wheel_Color)
  261.  
  262. holoCreate(31, E:toWorld(vec(W_Inch / 2 - 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base/2, 0.5 + Dimension_Height)))
  263. holoScale(31, vec(1, 1, Wheel_Base / 6))
  264. holoAng(31, E:toWorld(ang(0, 0, 90)))
  265. holoModel(31, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
  266. holoColor(31, Wheel_Color)
  267.  
  268. holoCreate(32, E:toWorld(vec(-W_Inch / 2 + 1, (L_Inch / 2) - Overhang_Front, 0.5 + Dimension_Height)))
  269. holoScale(32, Sphere_Size)
  270. holoAng(32, E:toWorld(ang(0, 0, 90)))
  271. holoModel(32, "models/sprops/geometry/sphere_3.mdl")
  272. holoColor(32, Sphere_Color)
  273.  
  274. holoCreate(33, E:toWorld(vec(W_Inch / 2 - 1, (L_Inch / 2) - Overhang_Front, 0.5 + Dimension_Height)))
  275. holoScale(33, Sphere_Size)
  276. holoAng(33, E:toWorld(ang(0, 0, 90)))
  277. holoModel(33, "models/sprops/geometry/sphere_3.mdl")
  278. holoColor(33, Sphere_Color)
  279.  
  280. holoCreate(34, E:toWorld(vec(-W_Inch / 2 + 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, 0.5 + Dimension_Height)))
  281. holoScale(34, Sphere_Size)
  282. holoAng(34, E:toWorld(ang(0, 0, 90)))
  283. holoModel(34, "models/sprops/geometry/sphere_3.mdl")
  284. holoColor(34, Sphere_Color)
  285.  
  286. holoCreate(35, E:toWorld(vec(W_Inch / 2 - 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, 0.5 + Dimension_Height)))
  287. holoScale(35, Sphere_Size)
  288. holoAng(35, E:toWorld(ang(0, 0, 90)))
  289. holoModel(35, "models/sprops/geometry/sphere_3.mdl")
  290. holoColor(35, Sphere_Color)
  291. }
  292.  
  293. for (I = 1, 35) {holoParent(I, E),
  294. holoMaterial(I, "lights/white")
  295. }
  296.  
  297. for (I = 26, 29) {holoBodygroup(I, 1, 3)}
  298. }
  299.  
  300. if (Button) {holoAlpha(1, 0)}
  301. if (!Button) {holoColor(1, Main_Color)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement