Atouk Posted April 17, 2018 Share Posted April 17, 2018 Hola, necesito ayuda con una funcion... El problema es que quiero que tome el valor del handling actual y no el original.... Por ejemplo: si el hand actual es 5. Que tome el de 5 + el upgrade. No que tome el original de GTA SA. Aqui el script: addEventHandler("tuning->PerformanceUpgrade", root, function(vehicle, data) if vehicle then if data then local vehicleModel = getElementModel(vehicle) if not data[1][2] then -- Default upgrade for _, property in ipairs(data) do setVehicleHandling(vehicle, property[1], nil, false) end else for _, property in ipairs(data) do local defaultHandling = getOriginalHandling(vehicleModel)[property[1]] setVehicleHandling(vehicle, property[1], defaultHandling, false) setVehicleHandling(vehicle, property[1], defaultHandling + property[2], false) end end end end end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now