Jump to content

TURBO sound


Recommended Posts

  • 2 weeks later...
  • 4 weeks later...

Szia...

 

function checkVehiclesGearboxChange()
	local vehicle = getPedOccupiedVehicle(localPlayer)
	if vehicle and getElementData(vehicle, "tuning.vehicle.turbo") >= 4 then
		newState = getVehicleCurrentGear(vehicle)
		
		if newState ~= oldState then
			oldState = newState
			
			local x, y, z = getElementPosition(vehicle)
			local sound = playSound3D("files/turbo.mp3", x, y, z, false)
			setSoundMaxDistance(sound, 100)
			setSoundVolume(sound, 0.7)
		end
	end
end
setTimer(checkVehiclesGearboxChange, 500, 0)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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