Posts: 303
Threads: 71
Joined: Mar 2011
I want a little system wherewhen I type /music [1-10] or something likethat, itwill playmy preset music or it will play it from a website. Anyone know of something likethis? Note:I want to playto everyone in the game, not just to me.
+REP!
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by Tanush123
|
Yes thanks I saw that but it says it's only for a specific player. I want it for all. Do you know how please?
Posts: 701
Threads: 91
Joined: Mar 2012
try this:
Код:
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}
Posts: 303
Threads: 71
Joined: Mar 2011
Okay thanks sir for this and what do I put for the x, y, z, an distance? Or do I leave it blank?
Posts: 701
Threads: 91
Joined: Mar 2012
leave them blank or put as 1.
Huh... what about my rep+1
Posts: 303
Threads: 71
Joined: Mar 2011
Okay thanks. I will try that and let you know how it goes. Then I will give you a +rep.
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by Avi57
try this:
Код:
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}
|
Nope that doesn't work. I was expecting it to play when the player joined the game but nope. But I actually wanted it so when I type /music 1 or /music 2 it will play my previously saved music and /stopmusic would stop the music.
Posts: 929
Threads: 17
Joined: Mar 2012
Reputation:
0
what command system are you using?
zcmd,ycmd,dcmd ?
strcmp?
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by Jonny5
what command system are you using?
zcmd,ycmd,dcmd ?
strcmp?
|
I'm using zcmd