11.08.2012, 13:12
you put a '}' before the next dialog so it wasn't in OnDialogResponse.
that should work
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 8000:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
GivePlayerWeapon(playerid, 3, 1);
}
case 1: // The second item listed
{
GivePlayerWeapon(playerid, 16, 2);
}
case 2: // The third item listed
{
GivePlayerWeapon(playerid, 17, 2);
}
case 3:// The first item listed
{
GivePlayerWeapon(playerid, 23, 50);
}
case 4:// The first item listed
{
GivePlayerWeapon(playerid, 25, 50);
}
case 5:// The first item listed
{
GivePlayerWeapon(playerid, 29, 130);
}
case 6:// The first item listed
{
GivePlayerWeapon(playerid, 31, 130);
}
case 7:// The first item listed
{
GivePlayerWeapon(playerid, 34, 50);
}
case 8:// The first item listed
{
GivePlayerWeapon(playerid, 41, 250);
}
case 9:// The first item listed
{
GivePlayerWeapon(playerid, 43, 50);
}
case 10:// The first item listed
{
GivePlayerWeapon(playerid, 44, 50);
}
case 11:// The first item listed
{
GivePlayerWeapon(playerid, 45, 50);
}
}
}
case 8001:
{
switch(listitem)
{
case 0:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/18961700/Usher%20-%20Scream%20(Radio%20Edit).mp3");
}
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/96146856/I'm%20A%20New%20Soul%20-%20Jay%20Z%20ft.%20Yael%20Naim-.mp3");
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/96146856/TROLLOLOL%20FULL.mp3");
}
}
}
}
}
return 0;
}