Hi,
So i'm making a map that has a custom song (music.mp3) and at one point in the map i play a custom sound (music2.mp3 - 3seconds).
Unfortunately the second sound is not loud enough because of the bg music.
So, can someone please provide me a simple script to fade out music.mp3 when music2.mp3 plays and then fade in music.mp3 again?
I'm using this script for the custom sound (music2.mp3 -3 seconds).
--speedboosts--
function start()
SpeedBoost = {
createMarker ( -1906.3000488281, -5613.7001953125, 117.30000305176, "corona", 0, 0, 0, 0, 255),
}
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start )
Multiplier = 1
function SpeedBoost (player)
if player ~= getLocalPlayer() then return end
if getElementType(player) == "player" then
if isPedInVehicle ( player ) then
local car = getPedOccupiedVehicle(player)
if getVehicleController(car) == player then
speedx, speedy, speedz = getElementVelocity ( car )
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
sound = playSound("files/liberty.mp3")
setSoundVolume(sound, 1)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost )