Jump to content

Diferencias


Arsilex

Recommended Posts

pos no entendi bien tio :S es que mira ize esto en lo de los colores

  
addEvent("onPlayerPickUpRacePickup",true) 
    function Colores ( ) 
        if sort == "vehiclechange" then 
            for _, car in ipairs ( getElementsByType 'vehicle' ) do 
                setVehicleColor ( car, math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); 
            end 
        end 
    end 
addEventHandler("onPlayerPickUpRacePickup",getRootElement(),Colores) 

tendria que ponerlo asi

addEvent("onPlayerPickUpRacePickup",true) 
addEventHandler("onPlayerPickUpRacePickup",getRootElement(),Colores) 
    function Colores ( ) 
        if sort == "vehiclechange" then 
            for _, car in ipairs ( getElementsByType 'vehicle' ) do 
                setVehicleColor ( car, math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); 
            end 
        end 
    end 
triggerEvent ( "onPlayerPickUpRacePickup", localPlayer ) 

Link to comment

No, para que necesitas ejecutar el evento si ya lo ejecuta el race?

addEvent ( "onPlayerPickUpRacePickup", true ) 
addEventHandler ( "onPlayerPickUpRacePickup", root, 
    function ( pickupID, pickupType, vehicleModel ) 
        if ( pickupType == "vehiclechange" ) then 
            local theVehicle = getPedOccupiedVehicle ( source ) 
            setVehicleColor ( theVehicle, math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ) 
        end 
    end 
) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...