19.12.2011, 10:57
How make system, when all login in my server and they hear music in background when they play?
public OnPlayerRequestClass(playerid, classid)
{
PlayerPlaySound(playerid, 1097, -2146.9839,-90.9392,41.5966);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid, 1098, -2146.9839,-90.9392,41.5966);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//---
if(strcmp(cmdtext, "/playmusicforall", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://somafm.com/tags.pls"); //Example.
}
return 1;
}
if(strcmp(cmdtext, "/stopmusicforall", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
StopAudioStreamForPlayer(i); //Example.
}
return 1;
}
//---
return 0;
}
It's easy bro.
pawn Код:
|