Witajcie, mam problem ot?? tym razem z funkcj? malowania, zrobi?em sobie przyk?adowy kod, kt?ry sprawdza czy w colcuboid jest pojazd, lecz dzia?a, ale nie maluje pojazdu kt?ry stoi w cuboidzie.
[lua]local miejsce = createColCuboid(-176.24, 2679.75, 61.80, 14.00, 6.50, 4.50)
local czerwony = createMarker(-175.97, 2686.00, 61.80, "cylinder", 1.0, 255, 0, 0)
local niebieski = createMarker(-174.71, 2686.00, 61.80, "cylinder", 1.0, 0, 0, 255)
local bialy = createMarker(-173.30, 2686.00, 61.80, "cylinder", 1.0, 255, 255, 255)
local zielony = createMarker(-171.83, 2686.00, 61.80, "cylinder", 1.0, 0, 255, 0)
local zolty = createMarker(-170.23, 2686.00, 61.80, "cylinder", 1.0, 255, 255, 0)
local czarny = createMarker(-168.76, 2686.00, 61.80, "cylinder", 1.0, 0, 0, 0)
addEventHandler("onMarkerHit", czerwony, function(el, md)
local pojazdy = getElementsWithinColShape(miejsce, "vehicle")
if #pojazdy<1 then
outputChatBox("Na stanowisku lakierniczym nie ma ?adnego pojazdu.", el)
return
end
if #pojazdy>1 then
outputChatBox("Na stanowisku lakierniczym jest zbyt du?o pojazd?w.", el)
return
end
setVehicleColor(source, 255, 0, 0)
outputChatBox("(( Bierzesz kolor czerwony ))", el)
end)/lua]
|