Jump to content

(AYUDA) Velocidad de Vehiculos


Diablomta

Recommended Posts

Tengo esto pero no me funciona 

function applyVehicleSpecials(vehicle)
    local vehID = getElementModel(vehicle)
    if vehID == 602 or vehID == 602 then
        setVehicleHandling(vehicle, "mass", 1500)
        setVehicleHandling(vehicle, "turnMass", 1500)
        setVehicleHandling(vehicle, "dragCoeff", 2)
        setVehicleHandling(vehicle, "centerOfMass", { 0, 0.1, -0.2 } )
        setVehicleHandling(vehicle, "percentSubmerged", 85)
        setVehicleHandling(vehicle, "tractionMultiplier", 1.2)
        setVehicleHandling(vehicle, "tractionLoss", 1.2)
        setVehicleHandling(vehicle, "tractionBias", 0.5)
        setVehicleHandling(vehicle, "numberOfGears", 5)
        setVehicleHandling(vehicle, "maxVelocity", 320)
        setVehicleHandling(vehicle, "engineAcceleration", 50)
        setVehicleHandling(vehicle, "engineInertia", 1.5)
        setVehicleHandling(vehicle, "driveType", "awd")
        setVehicleHandling(vehicle, "engineType", "Petrol")
        setVehicleHandling(vehicle, "brakeDeceleration", 100000)
        setVehicleHandling(vehicle, "brakeBias", 0.55)
    elseif vehID == 602 then
        setElementData(vehicle, "vehicleType", "PremiumCar")
        local handlingTable = getVehicleHandling ( vehicle )
        local newVelocity = ( handlingTable["maxVelocity"] + ( handlingTable["maxVelocity"] / 100 * 40 ) )
        setVehicleHandling ( vehicle, "numberOfGears", 5 )
        setVehicleHandling ( vehicle, "driveType", 'awd' )
        setVehicleHandling ( vehicle, "maxVelocity", newVelocity )
        setVehicleHandling ( vehicle, "engineAcceleration", handlingTable["engineAcceleration"] +8 )
    end
end

Link to comment
addEventHandler("onVehicleEnter", root,
	function(p)
		local vehicle = getPedOccupiedVehicle(p)
		if getElementModel(vehicle) == 429 then -- Banshee
			setVehicleHandling(vehicle, "maxVelocity", 400.0)
			setVehicleHandling(vehicle, "engineAcceleration", 25 )
		end
	end
)

 

  • Like 2
Link to comment
  • 1 month later...

y si quiero que el auto sea 4x4 como hago?

On 19/1/2017 at 22:56, #Dv^ said:

addEventHandler("onVehicleEnter", root,
	function(p)
		local vehicle = getPedOccupiedVehicle(p)
		if getElementModel(vehicle) == 429 then -- Banshee
			setVehicleHandling(vehicle, "maxVelocity", 400.0)
			setVehicleHandling(vehicle, "engineAcceleration", 25 )
		end
	end
)

 

 

Edited by BluRay
Link to comment
  • Recently Browsing   0 members

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