21.11.2010, 20:16
pawn Код:
ShowPlayerDialog(playerid, 21, DIALOG_STYLE_LIST, "Banco", "Sacar\nDepositar", "Confirmar", "Cancelar");
no OnDialogResponse
new string[64];
if(dialogid == 21)
{
if(response == 0)
{
return 1;
}
if(response >= 1)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 54, DIALOG_STYLE_INPUT, "Quantia", "Digite a quantia a sacar", "Confirmar", "Cancelar");
return 1;
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 60, DIALOG_STYLE_INPUT, "Quantia", "Digite a quantia a depositar", "Confirmar", "Cancelar");
return 1;
}
}
}
if(dialogid == 54)
{
if(response == 0)
{
return 1;
}
if(response >= 1)
{
format(string,sizeof(string),"/sacar %d ",inputtext);
OnPlayerCommandText(playerid,string);
}
}
if(dialogid == 60)
{
if(response == 0)
{
return 1;
}
if(response >= 1)
{
format(string,sizeof(string),"/depositar %d ",inputtext);
OnPlayerCommandText(playerid,string);
}
}