FS OnDialogResponse
#1

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
Reply
#2

Can you show us some of your OnDailogResponse code?
Reply
#3

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
Reply
#4

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.
Reply
#5

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;
}
Reply
#6

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

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;
}
Reply
#8

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
Reply
#9

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


Forum Jump:


Users browsing this thread: 2 Guest(s)