if(dialogid == 772)
{
TogglePlayerControllable(playerid, 1);
if(!response) { return 1; }
switch(listitem)
{
case 0:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/DaviDGuettaShotMeDown.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 1:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/TurnDownForWhat.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 2:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/Disclosure.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/NApontadope.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 4:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/WeDemBoyz.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 5:
{
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/SkrillexRaggaBombwithRaggaTwins.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 6:
{
StopAudioStreamForPlayer(playerid);
format(string, sizeof(string), "O Player %s[%d]Parou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
}
}
for(new i; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
// Inicia audio
}
}
Passa um loop por todos os jogadores, e inicia o audio pra eles.
PHP код:
|
if(dialogid == 772)
{
TogglePlayerControllable(playerid, 1);
if(!response) { return 1; }
switch(listitem)
{
case 0:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/DaviDGuettaShotMeDown.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 1:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/TurnDownForWhat.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 2:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/Disclosure.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 3:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/NApontadope.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 4:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/WeDemBoyz.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 5:
{
MusicaTodos("https://dl.dropboxusercontent.com/u/238210935/DJ/SkrillexRaggaBombwithRaggaTwins.mp3");
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 6:
{
for(new i; i <MAX_PLAYERS; i++)
{
StopAudioStreamForPlayer(i);
format(string, sizeof(string), "O Player %s[%d]Parou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessagel(i, COR_CV, string);
}
}
}
stock MusicaTodos(musica[])
{
for(new i; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, musica);
}
}
return 1;
}
Bom nгo testei, nгo sei se funciona mбs estб ai:
PHP код:
|
stock MusicaTodos(musica[], Float:x, Float:y, Float:z, Float:Distancia)
{
for(new i; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, musica, x, y, z, Distancia);
}
}
return 1;
}
MusicaTodos("LinkDaMusica", 0, 0, 5, 40.5);
Mude o stock para
PHP код:
PHP код:
|
case 0:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/DaviDGuettaShotMeDown.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 1:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/TurnDownForWhat.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 2:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/Disclosure.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 3:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/NApontadope.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 4:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/WeDemBoyz.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
case 5:
{
MusicaTodos(playerid, "https://dl.dropboxusercontent.com/u/238210935/DJ/SkrillexRaggaBombwithRaggaTwins.mp3",1484.7277,-1748.0680,20.4053,180,1);
format(string, sizeof(string), "O Player %s[%d]Iniciou como DJ na prefeitura de Los Santos!!", PlayerName(playerid), playerid);
SendClientMessageToAll(COR_CV, string);
}
error 035: argument type mismatch (argument 1)