Scripts / [SOLVED] Audio in soundzone

Author
Message
twsa
User Offline
Joined: 10th Aug 2019
Location:
Posted: 16th Aug 2019 19:48
hello all

i have soundzone 1 and soundzone 2

i need stop music in soundzone 1 when soundzone 2 is start

thannks

The author of this post has marked a post as an answer.

Go to answer
PM
PCS
Reviewed GameGuru on Steam
3
Years of Service
User Offline
Joined: 7th Jul 2016
Location: South Africa
Posted: 16th Aug 2019 20:26
This post has been marked by the post author as the answer.
use this one to play sound in zone1

Then use this one to stop sound in zone1 and play sound in zone2
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PM
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 16th Aug 2019 20:30
Moved to scripts
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
twsa
User Offline
Joined: 10th Aug 2019
Location:
Posted: 16th Aug 2019 21:19


function play_sound1_init(e)
St_sound1 = 0
end

function play_sound1_main(e)
if g_Entity[e]['plrinzone']==1 then
LoopSound(e)
--SetSound(e,0)
--SetSoundVolume(70)

ActivateIfUsed(e)
else
if St_sound1 == 1 then
StopSound(e)
Destroy(e)
end
end
end

................................

function st_sound1_init(e)

end

function st_sound1_main(e)
if g_Entity[e]['plrinzone']==1 then
PlaySound(e,0)
--SetSound(e,0)
--SetSoundVolume(70)

ActivateIfUsed(e)
St_sound1 = 1
Destroy(e)
end
end



thankss bro with more edit of code it work 100%


PM
PCS
Reviewed GameGuru on Steam
3
Years of Service
User Offline
Joined: 7th Jul 2016
Location: South Africa
Posted: 16th Aug 2019 21:23
glad i could help you
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PM

Login to post a reply

Server time is: 2019-10-24 01:03:38
Your offset time is: 2019-10-24 01:03:38