11.09.2012, 16:39
should be like that, not sure tbh
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 999:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
ShowPlayerDialog(playerid, HELP6, DIALOG_STYLE_MSGBOX, "LSPD","/door (/r)adio (/d)epartments (/m)egaphone (/su)spect /lspd /mdc /detain /arrest /wanted /cuff /tazer /showbadge\n/leofrisk /take /ticket (/gov)ernment /deliver /clothes /invite /giverank /deployspikes /deletespike(s)","okay","Close");
}
}
case 1: // The second item listed
{
SendClientMessage(playerid, COLOR_GREEN, "FBI to go here.");
}
}
}
}
}
return 1;
}