23.01.2011, 12:22
Hi!
I have a little problem: My Dialog Reponse ain't workin :S - It does show, but it doesn't respond at anything
OnDialogResponse
Calling the dialogs (in OnPlayerKeyStateChange -> Pressing F)
The DIALOG_* defines
Does anyone see what's wrong? I can't figure it out :/
Thanks,
Kevin
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);
}
}
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");
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
Thanks,
Kevin