All Random
-- zorrigas 18:32 GMT-4 30/SEPT/2011
resRoot = getResourceRootElement(getThisResource())
addEventHandler("onResourceStop", resRoot,
function()
resetWaterColor()
resetSkyGradient()
resetVehicleColor()
end)
addEventHandler("onResourceStart", resRoot,
function()
setTimer(colores,275,0)
end)
function colores()
-- se definen los colores
setSkyGradient(math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255))
setWaterColor(math.random(0,255),math.random(0,255),math.random(0,255))
for i, auto in ipairs( getElementsByType( "vehicle" ) ) do
setVehicleColor ( auto,math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255),math.random(0,255) )
end
end