Jump to content

sound does not stop with stopSound


Recommended Posts

I want this sound to play only in the cities that are there.But even when I enter las venturas or los santos, the sound does not stop.can someone help me ?

cities = {
["Bone County"] = true,
["Red County"] = true,
["Tierra Robada"] = true,
["Flint County"] = true,
["Whetstone"] = true,

}


function change_weather()
	local x,y,z = getElementPosition(localPlayer)
	local city = getZoneName(x,y,z, true)
	if cities[city] then
local sound = playSound("ambiance.mp3",true)
else
stopSound (sound)
end
end
setTimer(change_weather, 1000, 1)

 

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...