Dialogs doesn't response, please help!!!!
#1

I have one problem, dialogs dont response, dialog work when I call him with command, but from ondialogresponse doesnt work.

Код:
dcmd_joinarena(playerid, params[])
{
    #pragma unused params
    if(GetPVarInt(playerid, "IsInArena") == -1) {
    if(IsPlayerInRangeOfPoint(playerid,10.0,2035.7592,-1289.9252,20.9476)) {
    	PaintballMainMenu(playerid);
        }
        else {
            SendClientMessage(playerid, COLOR_RED, "Niste u blizini ulaza u PaintBall arenu.");
        }

    }
    else {
        SendClientMessage(playerid, COLOR_WHITE, "Vec si u areni!");
    }
    return 1;
}
With this command above I open succesfully next dialog:
But, everything next doesnt work (response)

Код:
		if(dialogid == PBMAINMENU)
		{
			if(response)
			{
				if(listitem == 0) // advokat
				{
     				PaintballArenaSelection(playerid);
				}
				else if(listitem == 1) // lista skrivenih poslova
				{
					PaintballTokenBuyMenu(playerid);
				}
				else if(listitem == 2)
				{
				if(Igrac[playerid][pAdminNivo] >= 1337)
	            {
	            	ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back");
				}
				else
				{
				    ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave");
				    SendClientMessage(playerid, COLOR_GRAD2, "You do not have authorization to access the admin panel.");
				    return 1;
				}
				}
			}
		}
my stock:
Код:
stock PaintballArenaSelection(playerid)
{
	new string[200], status[64], gametype[64], eperm[64], limit, count, money;
 	for(new i = 0; i < MAX_ARENAS; i++) if(!isnull(PaintBallArena[i][pbArenaName]))
 	{
 	    limit = PaintBallArena[i][pbLimit];
 	    count = PaintBallArena[i][pbPlayers];
 	    money = PaintBallArena[i][pbBidMoney];

 	    if(PaintBallArena[i][pbLocked] == 0)
 	    {
 	        format(status,sizeof(status),"{00FF00}Open{FFFFFF}");
 	    }
 	    if(PaintBallArena[i][pbLocked] == 1)
 	    {
 	        format(status,sizeof(status),"{00FF00}Active{FFFFFF}");
 	    }
 	    if(PaintBallArena[i][pbLocked] == 2)
 	    {
 	        format(status,sizeof(status),"{FF0000}Closed{FFFFFF}");
 	    }
 	    if(PaintBallArena[i][pbLocked] == 3)
 	    {
 	        format(status,sizeof(status),"{FF6600}Setup{FFFFFF}");
 	    }

 	    if(PaintBallArena[i][pbGameType] == 1)
 	    {
 	        format(gametype,sizeof(gametype),"DM");
		}
		if(PaintBallArena[i][pbGameType] == 2)
		{
		    format(gametype,sizeof(gametype),"TDM");
		}
		if(PaintBallArena[i][pbGameType] == 3)
		{
		    format(gametype,sizeof(gametype),"CTF");
		}
		if(PaintBallArena[i][pbGameType] == 4)
		{
		    format(gametype,sizeof(gametype),"KOTH");
		}
		if(PaintBallArena[i][pbGameType] == 5)
		{
		    format(gametype,sizeof(gametype),"TKOTH");
		}

		if(PaintBallArena[i][pbExploitPerm] == 0)
		{
		    format(eperm,sizeof(eperm),"{FF0000}No QS/CS{FFFFFF}");
		}
		if(PaintBallArena[i][pbExploitPerm] == 1)
		{
		    format(eperm,sizeof(eperm),"{00FF00}QS/CS{FFFFFF}");
		}

		if(!strcmp(PaintBallArena[i][pbPassword], "None", false))
		{
 	    	format(string,sizeof(string),"%s{FFFFFF}%s - \t(%s) (%s) (%s) (%d/%d) ($%d) (%s)\n",string,PaintBallArena[i][pbArenaName],PaintBallArena[i][pbOwner],status,gametype,count,limit,money,eperm);
		}
		else
		{
		    format(string,sizeof(string),"%s{FFFFFF}%s - \t(%s) (%s) (%s) (%d/%d) ($%d) (%s) (PW)\n",string,PaintBallArena[i][pbArenaName],PaintBallArena[i][pbOwner],status,gametype,count,limit,money,eperm);
		}
	}
	ShowPlayerDialog(playerid,PBARENASELECTION,DIALOG_STYLE_LIST,"Paintball Arena - Choose a Arena:",string,"Select","Back");
}
But when i call this dialog with command, it works, but next opening doesnt work:
Код:
dcmd_joinarena(playerid, params[])
{
    #pragma unused params
    if(GetPVarInt(playerid, "IsInArena") == -1) {
    if(IsPlayerInRangeOfPoint(playerid,10.0,2035.7592,-1289.9252,20.9476)) {
    	PaintBallArenaSelection(playerid);
        }
        else {
            SendClientMessage(playerid, COLOR_RED, "Niste u blizini ulaza u PaintBall arenu.");
        }

    }
    else {
        SendClientMessage(playerid, COLOR_WHITE, "Vec si u areni!");
    }
    return 1;
}
Reply
#2

your code is messed up…. you're trying to respond to the dialog defined "PBMAINMENU" while in the script above while in your "stock" its defined as PBARENASELECTION.
Reply
#3

No, it's not.
With command /joinarena I call stock that open dialog PBMAINMENU.
Код:
PaintballMainMenu(playerid)
{
	new string[128];
	format(string,sizeof(string),"Odaberi arenu\nPaintball Tokeni\nAdmin Menu");
	ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:",string,"Odaberi","Izlaz");
}
Everything works fine in another gamemode
The last command is an example, with command i can open dialogs, but next opening doesnt work
Reply
#4

So can you receive on response for PBMAINMENU?

If yes, then what's not working? Be more clear and post the OnDialogResponse completely (just add stuff related to this)
Reply
#5

edit all OnDialogResponse callback of your fiterscripts.don't use return 1. edit to return 0.
and,remember this,OnDialogResponse should return 0 on fiterscripts,only can return 1 on gamemodes
Reply
#6

Quote:
Originally Posted by 3417512908
Посмотреть сообщение
edit all OnDialogResponse callback of your fiterscripts.don't use return 1. edit to return 0.
and,remember this,OnDialogResponse should return 0 on fiterscripts,only can return 1 on gamemodes
This is from gamemode bro, not FS :/

Please help
Reply
#7

Код:
if(dialogid == PBMAINMENU)
{
		
		    if(!response)
		    {
			    ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave");
		    }
		    if(response)
		    {
			   switch(listitem) 
			   {
			         case 0: PaintballArenaSelection(playerid);
			         case 1:PaintballTokenBuyMenu(playerid);
			         case 2:
			         {
					 if(Igrac[playerid][pAdminNivo] >= 1337)
					 {
					        	ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back");
					}
				 }
			    }
		    }
}
maybe try this
Reply
#8

Quote:
Originally Posted by UFF
Посмотреть сообщение
Код:
if(dialogid == PBMAINMENU)
{
		
		    if(!response)
		    {
			    ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave");
		    }
		    if(response)
		    {
			   switch(listitem) 
			   {
			         case 0: PaintballArenaSelection(playerid);
			         case 1:PaintballTokenBuyMenu(playerid);
			         case 2:
			         {
					 if(Igrac[playerid][pAdminNivo] >= 1337)
					 {
					        	ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back");
					}
				 }
			    }
		    }
}
maybe try this
dont work
Reply
#9

Quote:
Originally Posted by ShihabSoft
Посмотреть сообщение
So can you receive on response for PBMAINMENU?

If yes, then what's not working? Be more clear and post the OnDialogResponse completely (just add stuff related to this)
^ Actually, which dialog executes and which doesn't works? Can you explain it briefly?
Reply
#10

maybe learn some coding basics, and then try to write those /joinarenda commands what are failed anyway, because static systems are failure today.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)