Jump to content
Sign in to follow this  
laverniusregalis

Play sound while in vehicle?

Recommended Posts

I've been having a bit of trouble with this - I want to play a sound while the player is in a vehicle, but it's always muted from the 1st person view. Any way to fix this? I've been using playSound "<sound>".

Share this post


Link to post
Share on other sites

Use array overload and pass true as second parameter.

playSound ["SoundName", true];

Share this post


Link to post
Share on other sites

if (player == assignedDriver (vehicle player)) then
{
playSound ["SoundName", true];
};

alternatively you can check if the engine is on:

if (isEngineOn (vehicle player)) then
{
playSound ["SoundName", true];
};

Edit: changed engineON to isEngineON :p

Edited by trnapster

Share this post


Link to post
Share on other sites

Simply fantastic - I was wondering how to sort this. Thanks!

Share this post


Link to post
Share on other sites

Thank you so much! There's going to be lots of car stereos running soon ;-)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×