SA-MP Forums Archive
FS OnDialogResponse - 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)
+--- Thread: FS OnDialogResponse (/showthread.php?tid=392054)



FS OnDialogResponse - NumbSkull - 12.11.2012

only one FS returns OnDialogResponse and the gm they both end with return 0; so it can call the next but it wont call any more FS OnDialogResponse i can merge them all into one or into GM but i would like to keep them as FS if possable


Re: FS OnDialogResponse - guitarmandanny - 12.11.2012

Can you show us some of your OnDailogResponse code?


Re: FS OnDialogResponse - NumbSkull - 12.11.2012

this one calls
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_CARRADIO)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(response)
        {
                      // do stuff
        }
    }
}
this one wont call
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG6)
    {
        if(response == 1)
        {
                      //do stuff
        }
        else
        {
            return 1;
        }
    }
    return 0;
}
i tried putting return 0; on the first but no difference


Re: FS OnDialogResponse - Babul - 12.11.2012

try it, as i succeeded:
remove any return in your filterscripts, and keep only the one in the gamemode intact.
all dialogs will work together, as long there is no return (in the filterscripts), until the "last" callback (first loaded) in the gamemode, will return 1, and end the chain.


Re: FS OnDialogResponse - guitarmandanny - 12.11.2012

Have you tried?

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_CARRADIO)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(response)
        {
                      // do stuff
        }
        return 1; 
    }
    return 0; 
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG6)
    {
        if(response == 1)
        {
                      //do stuff
        }
        else
        {
            
        }
        return 1;
    }
    return 0;
}



Re: FS OnDialogResponse - NumbSkull - 12.11.2012

@ babul that still wont call back the ondialogresponce of that FS and@guitarmandanny yes i have tried that also


Re: FS OnDialogResponse - guitarmandanny - 12.11.2012

This is how I use it on my script, Worth a try

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
     	case DIALOG_CARRADIO:
    	{
        	new veh = GetPlayerVehicleID(playerid);
        	if(response)
        	{
                      // do stuff
        	}
        	return 1;
    	}
    }
    return 0;
}



Re: FS OnDialogResponse - NumbSkull - 12.11.2012

that is the script that works fine it is the other that wont call and they are the only 2 FS with dialog GM has return 0; at the end and all dialogs i have defined different values so they dont call other dialogs ...i guess i will have to merge it into the GM for now thanks anyway


Re: FS OnDialogResponse - guitarmandanny - 12.11.2012

Sorry I couldn't help I dont know what else to suggest :S