03.03.2013, 02:11
pawn Код:
#include <a_samp>
#define RADIOADMIN (3)
dcmd_musica(playerid, params[])
{
static str[1024];
strcat(str, "Nombre del Tema 1\n");
strcat(str, "Nombre del Tema 2\n");
strcat(str, "Nombre del Tema 3\n");
strcat(str, "Nombre del Tema 4\n");
strcat(str, "Nombre del Tema 5\n");
strcat(str, "Nombre del Tema 6\n");
strcat(str, "Nombre del Tema 7\n");
strcat(str, "Nombre del Tema 8\n");
strcat(str, "Nombre del Tema 9\n");
strcat(str, "Nombre del Tema 10\n");
strcat(str, "Nombre del Tema 11");
ShowPlayerDialog(playerid, RADIOADMIN+0, DIALOG_STYLE_LIST, "Lista de musica del servidor", str, "Confirmar", "Siguiente");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
static str[1024];
switch(dialogid) {
case RADIOADMIN+0: {
if(!response) {
strcat(str, "Nombre del Tema 1\n");
strcat(str, "Nombre del Tema 2\n");
strcat(str, "Nombre del Tema 3\n");
strcat(str, "Nombre del Tema 4\n");
strcat(str, "Nombre del Tema 5\n");
strcat(str, "Nombre del Tema 6\n");
strcat(str, "Nombre del Tema 7\n");
strcat(str, "Nombre del Tema 8\n");
strcat(str, "Nombre del Tema 9\n");
strcat(str, "Nombre del Tema 10\n");
strcat(str, "Nombre del Tema 11");
ShowPlayerDialog(playerid, RADIOADMIN+1, DIALOG_STYLE_LIST, "Lista de musica del servidor", str, "Confirmar", "Siguiente");
}
if(response) {
switch(listitem) {
case 0: //Tu PlayAudioStreamForAll
case 1: //Tu PlayAudioStreamForAll
case 2: //Tu PlayAudioStreamForAll
case 3: //Tu PlayAudioStreamForAll
case 4: //Tu PlayAudioStreamForAll
case 5: //Tu PlayAudioStreamForAll
case 6: //Tu PlayAudioStreamForAll
case 7: //Tu PlayAudioStreamForAll
case 8: //Tu PlayAudioStreamForAll
case 9: //Tu PlayAudioStreamForAll
case 10: //Tu PlayAudioStreamForAll
}
}
}
case RADIOADMIN+1: {
if(!response) {
strcat(str, "Nombre del Tema 1\n");
strcat(str, "Nombre del Tema 2\n");
strcat(str, "Nombre del Tema 3\n");
strcat(str, "Nombre del Tema 4\n");
strcat(str, "Nombre del Tema 5\n");
strcat(str, "Nombre del Tema 6\n");
strcat(str, "Nombre del Tema 7\n");
strcat(str, "Nombre del Tema 8\n");
strcat(str, "Nombre del Tema 9\n");
strcat(str, "Nombre del Tema 10\n");
strcat(str, "Nombre del Tema 11");
ShowPlayerDialog(playerid, RADIOADMIN+2, DIALOG_STYLE_LIST, "Lista de musica del servidor", str, "Confirmar", "Inicio");
}
if(response) {
switch(listitem) {
case 0: //Tu PlayAudioStreamForAll
case 1: //Tu PlayAudioStreamForAll
case 2: //Tu PlayAudioStreamForAll
case 3: //Tu PlayAudioStreamForAll
case 4: //Tu PlayAudioStreamForAll
case 5: //Tu PlayAudioStreamForAll
case 6: //Tu PlayAudioStreamForAll
case 7: //Tu PlayAudioStreamForAll
case 8: //Tu PlayAudioStreamForAll
case 9: //Tu PlayAudioStreamForAll
case 10: //Tu PlayAudioStreamForAll
}
}
}
case RADIOADMIN+2: {
if(!response) {
strcat(str, "Nombre del Tema 1\n");
strcat(str, "Nombre del Tema 2\n");
strcat(str, "Nombre del Tema 3\n");
strcat(str, "Nombre del Tema 4\n");
strcat(str, "Nombre del Tema 5\n");
strcat(str, "Nombre del Tema 6\n");
strcat(str, "Nombre del Tema 7\n");
strcat(str, "Nombre del Tema 8\n");
strcat(str, "Nombre del Tema 9\n");
strcat(str, "Nombre del Tema 10\n");
strcat(str, "Nombre del Tema 11");
ShowPlayerDialog(playerid, RADIOADMIN+0, DIALOG_STYLE_LIST, "Lista de musica del servidor", str, "Confirmar", "Siguiente");
}
if(response) {
switch(listitem) {
case 0: //Tu PlayAudioStreamForAll
case 1: //Tu PlayAudioStreamForAll
case 2: //Tu PlayAudioStreamForAll
case 3: //Tu PlayAudioStreamForAll
case 4: //Tu PlayAudioStreamForAll
case 5: //Tu PlayAudioStreamForAll
case 6: //Tu PlayAudioStreamForAll
case 7: //Tu PlayAudioStreamForAll
case 8: //Tu PlayAudioStreamForAll
case 9: //Tu PlayAudioStreamForAll
case 10: //Tu PlayAudioStreamForAll
}
}
}
}
return 1;
}
stock PlayAudioStreamForAll(url[]) {
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsPlayerConnected(i)) break;
PlayAudioStreamForPlayer(i, url);
}
Tu Problema esta tambien en ke ecediste el numero de id, Maximo es 32767 https://sampwiki.blast.hk/wiki/ShowPlayerDialog
y tambien exediste el maximo de listitem por dialog.