26.01.2013, 22:41
When i have typed /playmusic the dialog shows up, i click next page, but then the next dialog dosent show up.
This is my code:
This is my code:
pawn Код:
#define DIALOG_MUSIC 3443
#define DIALOG_MUSIC2 3442
pawn Код:
COMMAND:playmusic(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Choose a song", "Sandstorm - Darude\nDanza Kuduro - Don Omar\nDragon Born - Headhunterz\nKill For Lies - Ulrik Munther\nLabrinth Ft. Emeli Sande - Beneath Your Beautiful\nDon't Laugh At Me - Mark Wills\nA1 - Caught In The Middle\nA1 - Don't Wanna Lose You Again\nEminem - Like Toy Soldiers\nEminem - Mocking Bird\nEminem - Talking To My self\nNext Page", "Select", "Close");
}
return 1;
pawn Код:
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MUSIC)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
if(listitem == 0) // They selected the first item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 1);
}
if(listitem == 1) // They selected the second item - AK-47
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 2);
}
if(listitem == 2) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 3);
}
if(listitem == 3) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 3);
}
if(listitem == 4) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 4);
}
if(listitem == 5) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 5);
}
if(listitem == 6) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 6);
}
if(listitem == 7) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 7);
}
if(listitem == 8) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 8);
}
if(listitem == 9) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 9);
}
if(listitem == 10) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 10);
}
if(listitem == 11) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 11);
}
if(listitem == 12) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerDialog(playerid, DIALOG_MUSIC2, DIALOG_STYLE_LIST, "Page 2", "Akon - Don't Matter\nSo Sick - Ne-Yo\nBehind Blue Eyes - Limp Bizkit\nSkyscraper - Demi Lovato\nUnder The Bridge - Red Hot Chili Peppers\nRidin' Dirty - Chamillionaire\nThe Axis Of Awesome 4 Chords", "Select", "Close");
}
if(dialogid == DIALOG_MUSIC2)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
if(listitem == 0) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 12);
}
if(listitem == 1) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 13);
}
if(listitem == 2) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 14);
}
if(listitem == 3) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 15);
}
if(listitem == 4) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 16);
}
if(listitem == 5) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 17);
}
if(listitem == 6) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 18);
}
if(listitem == 7) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Audio_Play(i, 21);
}
}
}
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}