Нуу.... Я вообще ф другом файле делал а код забыл((
Вот ТРУДНЫЙ код(делал неделю +4 дня) :
car.lua
Car = {
{.05, .05, white, -1, -1, -1}, -- 0 front botomright #dummy triangle
{0, .05, white, -1, 0, -1}, -- 4 topleft
{0, 0, white, 1, 0, -1}, -- 5 topright
--[[
{.1, .1, white, -1, -1, 1}, -- 0 front
{0, 0, white, 1, 1, 1}, -- 5
{.1, 0, white, 1, -1, 1}, -- 1
]]
{149/255, 199/255, white, -1, -1, -1}, -- 3 back; bottom-left facing player #bottom-right
{50/255, 199/255, white, 1, -1, -1}, -- 2 #bottom-left
{50/255, 150/255, white, 1, 0, -1}, -- 6 #top-left
{149/255, 199/255, white, -1, -1, -1}, -- 3 back; top-right facing player #bottom-right
{50/255, 150/255, white, 1, 0, -1}, -- 6 #top-left
{149/255, 150/255, white, -1, 0, -1}, -- 7 #top-right
--[[
{0, 1, white, 1, -1, -1}, -- 0 left side; bottom left #bottom-right
{0, 0, white, 1, -1, 1}, -- 3 #bottom-left
{1, 0, white, 1, 0, 1}, -- 7 #top-left
]]
{0, 149/255, white, 1, -1, -1}, -- 0 left side; top-right #bottom-right
{0, 0, white, 1, -1, 2}, -- 7 #bottom-left
{49/255, 149/255, white, 1, 0, -1}, -- 4 #top-right
{199/255, 149/255, white, -1, -1, -1}, -- 0 right side; top left #bottomleft 10
{150/255, 149/255, white, -1, 0, -1}, -- 3#topleft 11
{199/255, 0, white, -1, -1, 2}, -- 7#bottomright ######******Z 01
--[[
{1, 1, white, -1, -1, -1}, -- 0 right side; righttri #bottomleft 10
{0, 0, white, -1, 0, 1}, -- 7#topright 01
{1, 0, white, -1, -1, 1}, -- 4#bottomright 00
]]
{149/255, 149/255, white, -1, 0, -1}, -- 0 TOP: bottom-left tri; #bottom-right 00
{50/255, 149/255, white, 1, 0, -1}, -- 1 #bottom-left 10
{50/255, 0, white, 1, -1, 2}, -- 2 #top-left 11
{149/255, 149/255, white, -1, 0, -1}, -- 0 TOP:top-right; #bottom-right
{50/255, 0, white, 1, -1, 2}, -- 2 #top-left
{149/255, 0, white, -1, -1, 2}, -- 3 #top-right
--[[
{1, 1, white, -1, -1, -1}, -- 4 presumly bottom
{0, 1, white, -1, -1, 1}, -- 7
{0, 0, white, 1, -1, 1}, -- 6
{1, 1, white, -1, -1, -1}, -- 4
{0, 0, white, 1, -1, 1}, -- 6
{1, 0, white, 1, -1, -1}, -- 5
]]
}
--[[
Grid={
{yellow,-10,0,-10},
{yellow,10,0,-10},
{yellow,-10,0,-9},
{yellow,10,0,-9},
{yellow,-10,0,-8},
{yellow,10,0,-8},
{yellow,-10,0,-7},
{yellow,10,0,-7},
{yellow,-10,0,-6},
{yellow,10,0,-6},
{yellow,-10,0,-5},
{yellow,10,0,-5},
{yellow,-10,0,-4},
{yellow,10,0,-4},
{yellow,-10,0,-3},
{yellow,10,0,-3},
{yellow,-10,0,-2},
{yellow,10,0,-2},
{yellow,-10,0,-1},
{yellow,10,0,-1},
{yellow,-10,0,0},
{yellow,10,0,0},
{yellow,-10,0,1},
{yellow,10,0,1},
{yellow,-10,0,2},
{yellow,10,0,2},
{yellow,-10,0,3},
{yellow,10,0,3},
{yellow,-10,0,4},
{yellow,10,0,4},
{yellow,-10,0,5},
{yellow,10,0,5},
{yellow,-10,0,6},
{yellow,10,0,6},
{yellow,-10,0,7},
{yellow,10,0,7},
{yellow,-10,0,8},
{yellow,10,0,8},
{yellow,-10,0,9},
{yellow,10,0,9},
{yellow,-10,0,10},
{yellow,10,0,10},
---------------------------
{yellow,-10, 0, -10},
{yellow,-10, 0, 10},
{yellow,-9, 0, -10},
{yellow,-9, 0, 10},
{yellow,-8, 0, -10},
{yellow,-8, 0, 10},
{yellow,-7, 0, -10},
{yellow,-7, 0, 10},
{yellow,-6, 0, -10},
{yellow,-6, 0, 10},
{yellow,-5, 0, -10},
{yellow,-5, 0, 10},
{yellow,-4, 0, -10},
{yellow,-4, 0, 10},
{yellow,-3, 0, -10},
{yellow,-3, 0, 10},
{yellow,-2, 0, -10},
{yellow,-2, 0, 10},
{yellow,-1, 0, -10},
{yellow,-1, 0, 10},
{yellow,0, 0, -10},
{yellow,0, 0, 10},
{yellow,1, 0, -10},
{yellow,1, 0, 10},
{yellow,2, 0, -10},
{yellow,2, 0, 10},
{yellow,3, 0, -10},
{yellow,3, 0, 10},
{yellow,4, 0, -10},
{yellow,4, 0, 10},
{yellow,5, 0, -10},
{yellow,5, 0, 10},
{yellow,6, 0, -10},
{yellow,6, 0, 10},
{yellow,7, 0, -10},
{yellow,7, 0, 10},
{yellow,8, 0, -10},
{yellow,8, 0, 10},
{yellow,9, 0, -10},
{yellow,9, 0, 10},
{yellow,10, 0, -10},
{yellow,10, 0, 10},
}
]]
Grid = {}
for a=-10,10 do
table.insert(Grid,{yellow,-10,0,a})
table.insert(Grid,{yellow,10,0,a})
end
for a=-10,10 do
table.insert(Grid,{yellow,a,0,-10})
table.insert(Grid,{yellow,a,0,10})
end