21.11.2010, 19:56
Ai galera como coloco depositar e sacar em dialog ? Agradeзo desde ja!
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);
}
}