Critical problem please help
#1

I have many dialogs in my gamemode, When i use some dialogs in my filterscript with different ids , they dont work. Like only the first dialog appears and when i press any option in the dialog it doesnt work. I tried several times with different dialogs please help

Thanks!!
Reply
#2

If you have dialogs in Filterscript and Gamemode at the same time, it won`t work if I`m not wrong ... all your dialogs must be in your gamemode ...
Reply
#3

Really? Can anyone confirm it? If he was wrong tell me a solution pleaseee
Reply
#4

Return 0 for your OnDialogResponse callback so other (filter)scripts can retrieve the response information.

See here for an explanation (hint: where it explains returns).
Reply
#5

@Calgon Thanks for helping me out can you explain it what i have to do in-detail sorry im new to scripting, thanks!
Reply
#6

In your gamemode.

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//blah
//blah
}
return 0; //at the very end.
}

Peace...
Reply
#7

There are return 0 for individual dialog responses this is what is in the end of dialogresponse what should i edit here?

Код:
	if(dialogid == UPGRADEMENU6) //misc list
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                if(PlayerInfo[playerid][pCash] >= 50000) { PlayerInfo[playerid][hAlarmSystem] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+50000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered an alarm system to be installed for $50,000."); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //alarm
	            }
	            case 1:
	            {
	                if(PlayerInfo[playerid][pCash] >= 10000) { SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //2x nos
	            }
	            case 2:
	            {
	                if(PlayerInfo[playerid][pCash] >= 35000) { SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //6x nos
	            }
	            case 3:
	            {
	                if(PlayerInfo[playerid][pCash] >= 35000) {  SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //license plate
	            }
	            case 4:
	            {
	                if(PlayerInfo[playerid][pCash] >= 15000) { PlayerInfo[playerid][hVehLock] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+15000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered a vehicle lock for $15,000."); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //vehicle lock
	            }
	        }
	    }
	    if(PlayerInfo[playerid][pCash] >= MiscPriceTemp[playerid])
     	{
     	    new string[126];
     		format(string, sizeof(string), "You have bought a misc. item for $%d", MiscPriceTemp[playerid]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			PlayerInfo[playerid][pCash] -= MiscPriceTemp[playerid];
			GivePlayerMoney(playerid, -MiscPriceTemp[playerid]);
			MiscPriceTemp[playerid] = 0;
   			OnPlayerSave(playerid);
      		return 1;
		}
	}
    return 0;
}
Reply
#8

There are return 0 for individual dialog responses this is what is in the end of dialogresponse what should i edit here?

Код:
	if(dialogid == UPGRADEMENU6) //misc list
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                if(PlayerInfo[playerid][pCash] >= 50000) { PlayerInfo[playerid][hAlarmSystem] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+50000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered an alarm system to be installed for $50,000."); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //alarm
	            }
	            case 1:
	            {
	                if(PlayerInfo[playerid][pCash] >= 10000) { SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //2x nos
	            }
	            case 2:
	            {
	                if(PlayerInfo[playerid][pCash] >= 35000) { SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //6x nos
	            }
	            case 3:
	            {
	                if(PlayerInfo[playerid][pCash] >= 35000) {  SendClientMessage(playerid, COLOR_GREY, "   Out of Stock !"); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //license plate
	            }
	            case 4:
	            {
	                if(PlayerInfo[playerid][pCash] >= 15000) { PlayerInfo[playerid][hVehLock] = 1; MiscPriceTemp[playerid] = MiscPriceTemp[playerid]+15000; SendClientMessage(playerid, COLOR_YELLOW, "You have ordered a vehicle lock for $15,000."); } else { SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that !"); } //vehicle lock
	            }
	        }
	    }
	    if(PlayerInfo[playerid][pCash] >= MiscPriceTemp[playerid])
     	{
     	    new string[126];
     		format(string, sizeof(string), "You have bought a misc. item for $%d", MiscPriceTemp[playerid]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			PlayerInfo[playerid][pCash] -= MiscPriceTemp[playerid];
			GivePlayerMoney(playerid, -MiscPriceTemp[playerid]);
			MiscPriceTemp[playerid] = 0;
   			OnPlayerSave(playerid);
      		return 1;
		}
	}
    return 0;
}
Reply
#9

pawn Код:
return 1;
at every dialog ID, and at the end use
pawn Код:
return 0;
before the final closing bracket.

You should do this in the GM and in the FS.
Reply
#10

Still couldnt figure out, Whats the difference if i put return 0 at the end of every dialog in my gm which is not related to my dialog in fs, I put return 0 in dialogs of fs but still it didnt work
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)