Adding bmw x5m e70 model

This commit is contained in:
Иван Грачёв 2021-10-30 17:40:08 +05:00
parent b3a7283489
commit b2fd2d88f3

View File

@ -0,0 +1,110 @@
-- @shared
-- @name BMW X5M E70
-- @author DarkSupah
-- @include /koptilnya/mesh_loader/builder.txt
require("/koptilnya/mesh_loader/builder.txt")
DEBUG_MODE = true
local LINK = "https://drive.google.com/u/0/uc?id=181xY-amHmR_fmIeqIjsSboCy3gBx3iWA&export=download"
local SCALE = Vector(1)
local Materials =
{
Body = "models/debug/debugwhite",
Shadow = "models/debug/debugwhite",
Plastic = "models/debug/debugwhite",
Exhaust = "models/shiny",
Seatbelts = "models/debug/debugwhite",
Ceiling = "models/debug/debugwhite",
Interior = "models/debug/debugwhite",
Seats = "models/debug/debugwhite",
Dashboard = "models/debug/debugwhite",
Chrome = "models/shiny",
DoorMaps = "models/debug/debugwhite",
LightsChrome = "models/shiny",
RearLights = "models/debug/debugwhite",
LightsGlass = "models/debug/debugwhite"
}
local Colors =
{
Body = Color(220,220,220),
Shadow = Color(0,0,0),
Bumper = Color(30,30,30),
Grille = Color(20,20,20),
Plastic = Color(20,20,20),
Exhaust = Color(120,120,120),
Seatbelts = Color(20,20,20),
Ceiling = Color(45,45,45),
Interior = Color(40,40,40),
Seats = Color(40,40,40),
Dashboard = Color(35,35,35),
Chrome = Color(140,140,140),
DoorMaps = Color(40,40,40),
LightsChrome = Color(160,160,160),
RearLights = Color(180,50,50),
LightsGlass = Color(180,50,50)
}
local builder = {}
if SERVER then
builder = MeshBuilder:new(LINK)
local this = chip()
// Body group
builder:build("Body", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("RearBumper", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("FrontBumper", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("Doors", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("Trunk", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("Hatch", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("Bonnet", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
builder:build("Mirrors", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
// Plastic stuff
builder:build("Bumper_Plastic", Vector(0), Angle(0), SCALE, Colors.Bumper, Materials.Plastic, this, this)
builder:build("Grille", Vector(0), Angle(0), SCALE, Colors.Grille, Materials.Plastic, this, this)
builder:build("Plastic", Vector(0), Angle(0), SCALE, Colors.Plastic, Materials.Plastic, this, this)
// Misc group
builder:build("Shadow", Vector(0), Angle(0), SCALE, Colors.Shadow, Materials.Shadow, this, this)
builder:build("Exhaust_Chrome", Vector(0), Angle(0), SCALE, Colors.Exhaust, Materials.Exhaust, this, this)
builder:build("Seatbelts", Vector(0), Angle(0), SCALE, Colors.Seatbelts, Materials.Seatbelts, this, this)
// Interior
builder:build("Ceiling", Vector(0), Angle(0), SCALE, Colors.Ceiling, Materials.Ceiling, this, this)
builder:build("Interior", Vector(0), Angle(0), SCALE, Colors.Interior, Materials.Interior, this, this)
builder:build("Door_Maps", Vector(0), Angle(0), SCALE, Colors.DoorMaps, Materials.DoorMaps, this, this)
builder:build("Seats", Vector(0), Angle(0), SCALE, Colors.Seats, Materials.Seats, this, this)
builder:build("Interior_2", Vector(0), Angle(0), SCALE, Colors.Interior, Materials.Interior, this, this)
builder:build("Dashboard", Vector(0), Angle(0), SCALE, Colors.Dashboard, Materials.Dashboard, this, this)
builder:build("Chrome", Vector(0), Angle(0), SCALE, Colors.Chrome, Materials.Chrome, this, this)
builder:build("Lights_Chrome", Vector(0), Angle(0), SCALE, Colors.LightsChrome, Materials.Lights_Chrome, this, this)
//builder:build("RearLights_Lights", Vector(0), Angle(0), SCALE, Colors.RearLights, Materials.RearLights, this, this)
builder:build("RearLights_Glass", Vector(0), Angle(0), SCALE, Colors.LightsGlass, Materials.LightsGlass, this, this)
local result = builder:getResult()
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
end