Dialog response ain't workin' - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog response ain't workin' (
/showthread.php?tid=215427)
Dialog response ain't workin' -
Kwarde - 23.01.2011
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
Re: Dialog response ain't workin' -
Kwarde - 23.01.2011
Omg something must be f*cking wrong :S - OnPlayerPickUpPickup isn't also working.
I have samp 0.3c. And the pickups are created with Incognito's streamer; CreateDynamicPickup.
Re: Dialog response ain't workin' -
Sinner - 24.01.2011
I got the same problem, response doesn't work for a particular dialog.
Re: Dialog response ain't workin' -
blackwave - 24.01.2011
Quote:
Originally Posted by Kwarde
Omg something must be f*cking wrong :S - OnPlayerPickUpPickup isn't also working.
I have samp 0.3c. And the pickups are created with Incognito's streamer; CreateDynamicPickup.
|
On all your script which use dialogs, put the return 0;
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
// DIALOG STUFF ABOVE
return 0; // HERE
}
Re: Dialog response ain't workin' -
Kwarde - 24.01.2011
The funny thing is, is that I don't use any other filterscript.
However it's fixed, the pickups too
- I had to use OnPlayerPickUpDynamicPickup, and the dialog idk, I'd just rebuild it.
Thanks,
Kevin
p.s.
I know where to put returns etc, I'm not a beginner