#define DIALOG_1 1001
CMD:zenebe(playerid, params[])
{
if(!IsPlayerAdmin) return SendClientMessage(playerid, szín, \"Nem vagy admin!\");
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST,\"Zene\", \"Zene 1\\nZene 2\",\"Lejátszás\",\"Kilép\");
return 1;
}
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
if(dialogid == DIALOG_1)
{
if(response)
{
switch(listitem)
{
case 0:
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayAudioStreamForAll(playerid, \"zenelink\", x, y, z, 50, 1);
}
case 1:
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayAudioStreamForAll(playerid, \"zenelink\", x, y, z, 50, 1);
}
}
}
return 1;
}
return 0;
}
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}