iFoReX Posted September 1, 2012 Share Posted September 1, 2012 local colores = { { 255, 0, 0 }, { 0, 255, 0 }, { 0, 0, 255 }, { 255, 255, 0 }, { 0, 255, 255 }, { 255, 255, 0 }, { 0, 0, 0 } } setTimer ( function ( ) r, g, b = unpack ( colores [ math.random ( #colores ) ] ) end ,2000, 0 ) addEventHandler("onClientResourceStart",resourceRoot,function() local elVehiculo = getPedOccupiedVehicle(getLocalPlayer()) setVehicleColor(elVehiculo,r,g,b) end ) no le veo nada malo. Link to comment
Alexs Posted September 1, 2012 Share Posted September 1, 2012 Pensé que los colores aceptables eran estos: https://wiki.multitheftauto.com/wiki/SetVehicleColor ReturnsReturns true if vehicle's color was set, false if an invalid vehicle or invalid colors were specified. Link to comment
Renkon Posted September 1, 2012 Share Posted September 1, 2012 porque el timer no se ejecuta nunca... y no hay variables r g y b entonces Link to comment
iFoReX Posted September 1, 2012 Author Share Posted September 1, 2012 lol el timer se ejecuta cada 2 segundos repetidamente. Link to comment
Recommended Posts