Sign in to follow this  
Black Syrex

Add Music

Recommended Posts

getAllPlayers() 
{
	return getEntArray( "player", "classname" );
}

playSoundOnAllPlayers( soundAlias )
{
	players = getAllPlayers();
	for(i=0;i<players.size;i++) 
		players[i] playLocalSound(soundAlias);
}

Call this from where you want to start the music, it will play it on all players, but you have to add a soundalias in your mod, along with the sound file in the correct folder in your .iwd

Share this post


Link to post
Share on other sites
On 2/3/2020 at 6:03 AM, Kreator said:

getAllPlayers() { return getEntArray( "player", "classname" ); } playSoundOnAllPlayers( soundAlias ) { players = getAllPlayers(); for(i=0;i<players.size;i++) players[i] playLocalSound(soundAlias); }

Hello good Morning!
Do you think it is possible to apply this code to the finalkillcam an HC, without using mods? note that there are a lot of mass sounds inside the iwd, I was a little confused where to insert or file

 

On 2/3/2020 at 6:03 AM, Kreator said:

soundAlias

/\ is the name of the sound file without the extension?

 thank you!

_finalkillcam.gsc

Share this post


Link to post
Share on other sites

You cant use this without mods, where will you put the music files, on non modded servers you cant download files from the server, hence no music can be used, you could use stock files only. 

And yeah soundAlias is just a string, you have to call the code with the correct name e.g.  soundalias = endround10, without extensions.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this