Dialog response ain't workin'
#1

Hi!

I have a little problem: My Dialog Reponse ain't workin :S - It does show, but it doesn't respond at anything

OnDialogResponse
pawn Код:
elseif(dialogid == DIALOG_BREASON){
            if(response){
                switch(listitem){
                    case 0: HandleBankGate(1);
                    case 1: HandleBankGate(1);
                    case 2: SendClientMessage(playerid, COLOR_GRAY, "Access denied");
                    default: SendClientMessage(playerid, COLOR_GRAY, "Access denied");
                }
            }
        }
        elseif(dialogid == DIALOG_BKEY){ // 'cuz I couldn't open the gate, I didn't test this one yet
            if(response){
                if(!strcmp(inputtext, iConfig[BankKeyCode], false))
                    HandleBankGate(2);
            }
        }
Calling the dialogs (in OnPlayerKeyStateChange -> Pressing F)
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.5, 2730.9091796875, -1741.7846679688, 55.878452301025))
            ShowPlayerDialog(playerid, DIALOG_BREASON, DIALOG_STYLE_LIST, "Why do you wanna enter the bank?", "I want to deposit money\nI want to withdraw money\nI want to rob the bank", "Confirm", "Cancel");
        elseif(IsPlayerInRangeOfPoint(playerid, 1.5, 2729.380859375, -1771.9201660156, 56.225128173828) || IsPlayerInRangeOfPoint(playerid, 1.5, 2737.6711425781, 1774.3137207031, 56.100120544434))
            ShowPlayerDialog(playerid, DIALOG_BKEY, DIALOG_STYLE_INPUT, "Security", "Enter the keycode", "Enter", "Cancel");
The DIALOG_* defines
pawn Код:
#define DIALOG_REGISTER         44
#define DIALOG_LOGIN            55
#define DIALOG_JAIL_CELLS       495
#define DIALOG_JAIL_CELLS_OPEN  496
#define DIALOG_JAIL_CELLS_CLOSE 497
#define DIALOG_BREASON          100
#define DIALOG_BKEY             101
Does anyone see what's wrong? I can't figure it out :/

Thanks,
Kevin
Reply


Messages In This Thread
Dialog response ain't workin' - by Kwarde - 23.01.2011, 12:22
Re: Dialog response ain't workin' - by Kwarde - 23.01.2011, 13:25
Re: Dialog response ain't workin' - by Sinner - 24.01.2011, 13:19
Re: Dialog response ain't workin' - by blackwave - 24.01.2011, 14:56
Re: Dialog response ain't workin' - by Kwarde - 24.01.2011, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)