17.12.2012, 02:32
Hello!
I got another issue, when i pick up a pickup that shows me a dialog, it does show me the dialog correctly but when the function OnDialogresponse is trying to work, the 1st dialog comes again, so the 2nd dialog doesn't show (It just shows like 2 seconds, then the 1st dialog comes again)
Thanks in advance
I got another issue, when i pick up a pickup that shows me a dialog, it does show me the dialog correctly but when the function OnDialogresponse is trying to work, the 1st dialog comes again, so the 2nd dialog doesn't show (It just shows like 2 seconds, then the 1st dialog comes again)
PHP код:
if(pickupid == ATM1)
{
ShowPlayerDialog(playerid, ATM, DIALOG_STYLE_LIST,"ATM","Deposit\nWithdraw\nCurrent Balance\n{FF0000}Attempt Robbery{FF0000}","Ok","Close");
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{ if(dialogid == ATM)
{
if(response)
{
if(listitem == 0) //Deposit
{
ShowPlayerDialog(playerid, Deposit, DIALOG_STYLE_INPUT,"ATM","Enter the amount of cash you want to deposit","Deposit","Cancel");
}
if(listitem == 1) //Withdraw
{
ShowPlayerDialog(playerid, Withdraw, DIALOG_STYLE_INPUT,"ATM","Enter the amount of cash you want to withdraw ","Withdraw","Cansel");
}
if(listitem == 2) //Balance
{
ShowPlayerDialog(playerid, Balance, DIALOG_STYLE_MSGBOX,"ATM","Your cash : ...","Ok","Close");
}
if(listitem == 3) //Attemp roberry
{
SendClientMessage(playerid,COLOR_GREEN,"This Feature is currently dissabled");
}
}
}