update
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-- @shared
|
||||
-- @name Audi A6 2012
|
||||
-- @author Opti1337, DarkSupah
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name Audi A6 2012
|
||||
--@author Opti1337, DarkSupah
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
@@ -193,10 +193,5 @@ if SERVER then
|
||||
|
||||
builder:build("DashDials", Vector(0), Angle(0), SCALE, Colors.DashDials, Materials.DashDials, this, this)
|
||||
|
||||
local result = builder:getResult()
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
-- @shared
|
||||
-- @name BMW 850CSi 96
|
||||
-- @author Opti1337, DarkSupah
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
--@shared
|
||||
--@name BMW 850CSi 96
|
||||
--@author Opti1337, DarkSupah
|
||||
--@include /libs/meshbuilder.txt
|
||||
|
||||
--@include koptilnya/libs/flux.txt
|
||||
|
||||
local flux = require("koptilnya/libs/flux.txt")
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
local LINK = "http://82.179.248.158/bmw_850csi_96.obj#baaz"
|
||||
local LINK = "https://raw.githubusercontent.com/koptilnya/gmod-data/main/bmw_850csi_96.obj"
|
||||
local SCALE = Vector(1)
|
||||
|
||||
local Materials =
|
||||
@@ -129,7 +130,7 @@ if SERVER then
|
||||
builder:build("headlightl_black_plastic", Vector(0), Angle(0), SCALE, Colors.BlackPlastic, Materials.BlackPlastic, headlightL, this)
|
||||
builder:build("headlightl_chrome", Vector(0), Angle(0), SCALE, Colors.Chrome, Materials.Chrome, headlightL, this)
|
||||
|
||||
local result = builder:getResult()
|
||||
local result = builder:apply()
|
||||
|
||||
local headlightl = {
|
||||
angle = 0
|
||||
@@ -140,8 +141,8 @@ if SERVER then
|
||||
}
|
||||
|
||||
function openHeadlights()
|
||||
flux.to(headlightl, 1, { angle = 28 }):delay(0.3):ease("quartout")
|
||||
flux.to(headlightr, 1, { angle = 28 }):ease("quartout")
|
||||
flux.to(headlightl, 1, { angle = 2 }):delay(0.3):ease("quartout")
|
||||
flux.to(headlightr, 1, { angle = -2 }):ease("quartout")
|
||||
end
|
||||
|
||||
function closeHeadlights()
|
||||
@@ -165,9 +166,4 @@ if SERVER then
|
||||
closeHeadlights()
|
||||
end
|
||||
end)
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- @shared
|
||||
-- @name BMW M4 G82 Competition
|
||||
-- @author Koptilnya1337
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name BMW M4 G82 Competition
|
||||
--@author Koptilnya1337
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
@@ -36,10 +36,5 @@ if SERVER then
|
||||
builder:build("Trunk", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("Roof", Vector(0), Angle(0), SCALE, Colors.Carbon, Materials.Carbon, this, this)
|
||||
|
||||
local result = builder:getResult()
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
-- @shared
|
||||
-- @name Ford Mustang GT 2015
|
||||
-- @author Opti1337, DarkSupah
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
-- @include /koptilnya/car_systems/lights_controller.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
require("/koptilnya/car_systems/lights_controller.txt")
|
||||
--@shared
|
||||
--@name Ford Mustang GT 2015
|
||||
--@author Opti1337, DarkSupah
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
@@ -50,8 +48,10 @@ local COLORS = {
|
||||
local builder = {}
|
||||
local lightsController = {}
|
||||
|
||||
builder = MeshBuilder:new(LINK)
|
||||
|
||||
if SERVER then
|
||||
builder = MeshBuilder:new(LINK)
|
||||
|
||||
builder.onObjectParsed = function(builder, objectsNames)
|
||||
printTable(objectsNames)
|
||||
end
|
||||
@@ -91,52 +91,5 @@ if SERVER then
|
||||
local HighBeamLights = builder:build("HighBeamLights_body1_model0.017", Vector(0), Angle(0), SCALE, COLORS.LightsBase, MATERIALS.LightsBase, chip(), chip())
|
||||
local FogLights = builder:build("FogLights_body1_model0.018", Vector(0), Angle(0), SCALE, COLORS.LightsBase, MATERIALS.LightsBase, chip(), chip())
|
||||
|
||||
local result = builder:getResult()
|
||||
|
||||
local lights = {
|
||||
StopLights = {Entities = {LeftStopLight1, LeftStopLight2, LeftStopLight3, RightStopLight1, RightStopLight2, RightStopLight3}, LerpSpeed = 0.2, Colors = {On = Color(250, 0, 0), Off = Color(30, 0, 0), Active = Color(90, 0, 0)}},
|
||||
ReverseLights = {Entities = {ReverseLights}, LerpSpeed = 0.1, Colors = {On = Color(255, 255, 255), Off = Color(20, 20, 20)}},
|
||||
LowBeamLights = {Entities = {LowBeamLights}, LerpSpeed = 0.1, Colors = {On = Color(255, 255, 255), Off = Color(20, 20, 20)}},
|
||||
HighBeamLights = {Entities = {HighBeamLights}, LerpSpeed = 0.1, Colors = {On = Color(255, 255, 255), Off = Color(20, 20, 20)}},
|
||||
FogLights = {Entities = {FogLights}, LerpSpeed = 0.1, Colors = {On = Color(255, 255, 255), Off = Color(20, 20, 20)}}
|
||||
TurnLights = {LeftEntities = {LeftStopLight1, LeftStopLight2, LeftStopLight3}, RightEntities = {RightStopLight1, RightStopLight2, RightStopLight3}, LerpSpeed = 0.2, Colors = {On = Color(250, 120, 0), Off = Color(30, 0, 0)}}
|
||||
}
|
||||
|
||||
-- local lightsEntities = {StopLights = {StopLights}, ReverseLights = {ReverseLights}, LowBeamLights = {LowBeamLights}, HighBeamLights = {HighBeamLights}}
|
||||
-- local lightColors = {StopLights = {On = Color(250, 0, 0), Off = Color(30, 0, 0), Active = Color(90, 0, 0)}, ReverseLights = {On = Color(255, 255, 255), Off = Color(20, 20, 20), Active = Color(20, 20, 20)}}
|
||||
-- local lights = {Lights = lightsEntities, Colors = lightColors}
|
||||
|
||||
lightsController = LightsController:new(lights)
|
||||
|
||||
wire.adjustPorts({LightInputs = "table"}, {})
|
||||
|
||||
hook.add("think", "lights", function()
|
||||
lightsController:useStopLights(wire.ports.LightInputs.Stop)
|
||||
lightsController:useReverseLights(wire.ports.LightInputs.Reverse)
|
||||
lightsController:useLowBeam(wire.ports.LightInputs.LowBeam)
|
||||
lightsController:useHighBeam(wire.ports.LightInputs.HighBeam)
|
||||
|
||||
lightsController:setActive(wire.ports.LightInputs.LowBeam == 1)
|
||||
|
||||
lightsController:update()
|
||||
end
|
||||
)
|
||||
else
|
||||
function init()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
|
||||
|
||||
if hasPermission("http.get") and hasPermission("mesh") and hasPermission("entities.setRenderProperty", chip()) then
|
||||
init()
|
||||
else
|
||||
setupPermissionRequest({"http.get", "mesh", "entities.setRenderProperty"}, "", true)
|
||||
|
||||
hook.add("permissionrequest", "_permissionrequest", function()
|
||||
if permissionRequestSatisfied() then
|
||||
init()
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- @shared
|
||||
-- @name Ford F-150 Raptor
|
||||
-- @author Opti1337, .hemp
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name Ford F-150 Raptor
|
||||
--@author Opti1337, .hemp
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
@@ -50,10 +50,5 @@ if SERVER then
|
||||
|
||||
builder:build("Railing", Vector(0), Angle(0), SCALE, Color(255, 255, 255), "sprops/trans/wheels/wheel_d_rim1", chip(), chip())
|
||||
|
||||
local result = builder:getResult()
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
-- @shared
|
||||
-- @name JDM Wheels
|
||||
-- @author Opti1337, .hemp
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name JDM Wheels
|
||||
--@author Opti1337, .hemp
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
local LINK = "https://raw.githubusercontent.com/koptilnya/gmod-data/main/jdmwheel1.obj?d=1"
|
||||
local SCALE = Vector(0.6)
|
||||
@@ -63,12 +62,7 @@ if SERVER then
|
||||
}, wheel, wheel)
|
||||
end
|
||||
|
||||
builder:getResult()
|
||||
builder:apply()
|
||||
end
|
||||
end)
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- @shared
|
||||
-- @name Porsche 911 Turbo S 2017
|
||||
-- @author Opti1337, DarkSupah
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name Porsche 911 Turbo S 2017
|
||||
--@author Opti1337, DarkSupah
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
@@ -11,21 +11,80 @@ local SCALE = Vector(0.9)
|
||||
|
||||
local builder = {}
|
||||
|
||||
local objectNames = {"Gear_stick_handle",
|
||||
"Locks",
|
||||
"Left_door_panel",
|
||||
"Seat_base",
|
||||
"Torpedo",
|
||||
"Front_bumper_details",
|
||||
"Dashboard_interior",
|
||||
"Right_door_body",
|
||||
"Body",
|
||||
"Seatbelts",
|
||||
"Seatbelts_caps",
|
||||
"Dials",
|
||||
"Dashboard_panel",
|
||||
"Lower_dashboard",
|
||||
"Rear_mirror",
|
||||
"Dials_base",
|
||||
"Front_lights_glass",
|
||||
"Rear_logo",
|
||||
"Exhaust_pipes",
|
||||
"Torpedo_panel",
|
||||
"Seats",
|
||||
"Dials_glass",
|
||||
"Gear_stick_base",
|
||||
"Bonnet",
|
||||
"Rear_lights_base",
|
||||
"Torpedo_buttons",
|
||||
"Seat_controls",
|
||||
"Carpets",
|
||||
"Steering_wheel",
|
||||
"Interior_base",
|
||||
"Front_bumper",
|
||||
"Front_lights_bulbs",
|
||||
"Doors_rubbers",
|
||||
"Bottom",
|
||||
"Seatbelts_caps_plastic",
|
||||
"Windows_lines",
|
||||
"Exterior_plastic",
|
||||
"Front_lights_strips",
|
||||
"Gear_stick_details",
|
||||
"Exhaust_collector",
|
||||
"Left_door_mirror",
|
||||
"Dashboard_vents",
|
||||
"Dashboard_plastic",
|
||||
"Seatbelts_locks",
|
||||
"Right_door_panel",
|
||||
"Left_door_body",
|
||||
"Right_door_mirror",
|
||||
"Rear_lights_glass",
|
||||
"Stitches",
|
||||
"Right_front_turn",
|
||||
"Timer",
|
||||
"Front_lights_borders",
|
||||
"Front_indicators_glass",
|
||||
"Door_frames",
|
||||
"Front_lights_base",
|
||||
"Left_front_turn",
|
||||
"Rear_details",
|
||||
"Rear_spoiler_glass",
|
||||
"Clothes_hooks",
|
||||
"Exhaust_bumper",
|
||||
"Left_side_indicator",
|
||||
"Dashboard",
|
||||
"Door_plastic",
|
||||
"Rear_bumper",
|
||||
"Seats_plastic",
|
||||
"Right_side_indicator",
|
||||
"Steering_wheel_details"}
|
||||
|
||||
if SERVER then
|
||||
builder = MeshBuilder:new(LINK)
|
||||
builder.onObjectParsed = function(builder, objectsNames)
|
||||
timer.simple(3, function()
|
||||
for k, v in pairs(objectsNames) do
|
||||
for k, v in pairs(objectNames) do
|
||||
|
||||
builder:build(v, Vector(0), Angle(0), SCALE, Color(360 / #objectsNames * k, 1, 1):hsvToRGB(), "models/debug/debugwhite", chip(), chip())
|
||||
builder:build(v, Vector(0), Angle(0), SCALE, Color(360 / #objectNames * k, 1, 1):hsvToRGB(), "models/debug/debugwhite", chip(), chip())
|
||||
end
|
||||
|
||||
local result = builder:getResult()
|
||||
end)
|
||||
end
|
||||
else
|
||||
PERMA.onPermissionsGained = function()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
PERMA.build()
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
-- @shared
|
||||
-- @name Toyota Altezza
|
||||
-- @author Opti1337, .hemp
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
--@shared
|
||||
--@name Toyota Altezza
|
||||
--@author Opti1337, .hemp
|
||||
--@include /libs/meshbuilder.txt
|
||||
local MeshBuilder = require("/libs/meshbuilder.txt")
|
||||
|
||||
DEBUG_MODE = true
|
||||
|
||||
local LINK = "https://www.dropbox.com/s/0vnd3nir8cyolz5/is300_3.obj?dl=1"
|
||||
local SCALE = Vector(0.8, 0.79, 0.8)
|
||||
|
||||
local builder = {}
|
||||
local builder = MeshBuilder:new(LINK)
|
||||
|
||||
if SERVER then
|
||||
builder = MeshBuilder:new(LINK)
|
||||
|
||||
|
||||
builder:build("body_Mesh_0", Vector(0), Angle(0), SCALE, Color(40, 40, 40), "models/debug/debugwhite", chip(), chip())
|
||||
builder:build("chrome_Mesh_1", Vector(0), Angle(0), SCALE, Color(255, 255, 255), "sprops/textures/sprops_chrome", chip(), chip())
|
||||
@@ -24,33 +24,5 @@ if SERVER then
|
||||
builder:build("Reshetka_Mesh_7", Vector(0), Angle(0), SCALE, Color(225, 255, 255, 255), "models/props_interiors/metalfence007a", chip(), chip())
|
||||
builder:build("w_plastic_Mesh_8", Vector(0), Angle(0), SCALE, Color(225, 255, 255, 255), "models/combine_scanner/scanner_eye", chip(), chip())
|
||||
|
||||
builder:getResult()
|
||||
else
|
||||
function init()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
builder.onHologramsReceived = function(builder, objects)
|
||||
local mat = material.create("VertexLitGeneric")
|
||||
mat:setTextureURL("$basetexture", "https://i.imgur.com/gw4kfYv.jpg",
|
||||
function(m, url, w, h, layout)
|
||||
layout(0, 0, 2048, 2048)
|
||||
end,
|
||||
function(m, url)
|
||||
objects[1].holo:setMaterial("")
|
||||
objects[1].holo:setMeshMaterial(m)
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if hasPermission("http.get") and hasPermission("mesh") and hasPermission("entities.setRenderProperty", chip()) then
|
||||
init()
|
||||
else
|
||||
setupPermissionRequest({"http.get", "mesh", "entities.setRenderProperty"}, "", true)
|
||||
|
||||
hook.add("permissionrequest", "_permissionrequest", function()
|
||||
if permissionRequestSatisfied() then
|
||||
init()
|
||||
end
|
||||
end)
|
||||
end
|
||||
builder:apply()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user