#define DIALOG_GRITAR 17123
dcmd(gritar, cmdtext);
dcmd_gritar(playerid, params[])
{
#pragma unused params
ShowPlayerDialog(playerid, DIALOG_GRITAR, DIALOG_STYLE_LIST, "Grito de guerra", "CMD\nTD3\nLLL\nMLC\nORGS", "OK", "Cancelar");
return 1;
}
if(dialogid == DIALOG_GRITAR) //PГµem em OnDialogResponse
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid,"https://aladfar.sscdn.co/palcomp3/4/c/7/0/Tamodesoci-audio-cmd-3-e1052fcf.mp3");
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid,"https://alamach.sscdn.co/palcomp3/6/4/4/6/Tamodesoci-audio-3cp-2-0bce8067.mp3");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid,"https://adara.sscdn.co/palcomp3/b/c/d/5/Tamodesoci-audio-lll-1-f4877ed5.mp3");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid,"https://japeto.sscdn.co/palcomp3/4/c/9/7/Tamodesoci-audio-1-mlc-ee8928f4.mp3");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(playerid,"https://adara.sscdn.co/palcomp3/a/3/c/c/Tamodesoci-audio-ext-3-7477ae78.mp3");
}
}
}
for (new i=0; i < MAX_PLAYERS; i++)
for (new i=0; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, "http://24.media.v4.skyrock.net/music/245/dcd/245dcdbcbc5b0e5b2f89c26fc1eed062.mp3"); } e para players que estгo perto й assim: new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, /*Ratio*/, Pos[0], Pos[1], Pos[2])) { PlayAudioStreamForPlayer(i, "http://24.media.v4.skyrock.net/music/245/dcd/245dcdbcbc5b0e5b2f89c26fc1eed062.mp3"); } }
if(dialogid == DIALOG_GRITAR) //PГµem em OnDialogResponse
{
if(response)
{
if(listitem == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: X, Float: Y, Float:
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid,"https://aladfar.sscdn.co/palcomp3/4/c/7/0/Tamodesoci-audio-cmd-3-e1052fcf.mp3", X, Y, Z, 20.0, 1);
}
}
}
if(listitem == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: X, Float: Y, Float:
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid,"https://alamach.sscdn.co/palcomp3/6/4/4/6/Tamodesoci-audio-3cp-2-0bce8067.mp3", X, Y, Z, 20.0, 1);
}
}
}
if(listitem == 2)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: X, Float: Y, Float:
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid,"https://adara.sscdn.co/palcomp3/b/c/d/5/Tamodesoci-audio-lll-1-f4877ed5.mp3", X, Y, Z, 20.0, 1);
}
}
}
if(listitem == 3)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: X, Float: Y, Float:
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid,"https://japeto.sscdn.co/palcomp3/4/c/9/7/Tamodesoci-audio-1-mlc-ee8928f4.mp3", X, Y, Z, 20.0, 1);
}
}
}
if(listitem == 4)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: X, Float: Y, Float:
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid,"https://adara.sscdn.co/palcomp3/a/3/c/c/Tamodesoci-audio-ext-3-7477ae78.mp3", X, Y, Z, 20.0, 1);
}
}
}
}
}
Adiiti neste caso iria acabar sendo para todos do servidor... e ele estб querendo que seja para quem estб proximo, nгo estб errado mas estб incompleto, sou nvt em pawno mas pelo menos to tentando + REP por ajudar tmb Adiiti
|
PlayAudioStreamForPlayer(playerid,"https://alamach.sscdn.co/palcomp3/6/4/4/6/Tamodesoci-audio-3cp-2-0bce8067.mp3", X, Y, Z, /* DISTANCIA AQUI */, 1);