SA-MP Forums Archive
Dialog won't come up - 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: Dialog won't come up (/showthread.php?tid=374014)



Dialog won't come up - xtreamer - 01.09.2012

Hey there, I have a problem with the dialog box. when I type /bandana it should open a dialog menu to chose what bandana color to wear, but the menu won't appear. Here let me show you the ondialogresponse code

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(response)
	{
    	switch(dialogid)
		{
			case DIALOG_BANDANA:
   			{
           		switch(listitem)
        		{
        	    	case 0:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 1:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18913, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 2: 
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18914, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 3:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18915, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 4:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18916, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 5:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18917, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 6:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18918, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 7:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18891, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 8:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18892, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 9:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18893, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 10:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18894, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
					case 11:
        	    	{
        	        	SetPlayerAttachedObject( playerid, 0, 18895, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
        	    	}
        	    	case 12:
        	    	{
        	    	    RemovePlayerAttachedObject(playerid, 0);
					}
   				}
	    	}
		}
	}
    return 1;
}
And i have this problem not only on this script, but also on others. It is strange that on some scripts, the commands work perfectly...


Re: Dialog won't come up - TzAkS. - 01.09.2012

Show the command.
And if the command is corectly you have the same id for dialog in 2 place`s.
Try to change the dialog id.


Re: Dialog won't come up - xtreamer - 01.09.2012

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/bandana", true))
	{
		ShowPlayerDialog(playerid,DIALOG_BANDANA,DIALOG_STYLE_LIST,"Bandana's","1.Bandana\r\n2.Bandana\r\n3.Bandana\r\n4.Bandana\r\n5.Bandana\r\n6.Bandana\r\n7.Bandana\r\n8.Bandana\r\n9.Bandana\r\n10.Bandana\r\n11.Bandana\r\n12.Bandana\r\nRemove","Accept", "Cancel");
		return 1;
	}
	return 0;
}
and this

Код:
#define FILTERSCRIPT
#define DIALOG_BANDANA 55995
#include <a_samp>
#include<streamer>
#pragma tabsize 0

#if defined FILTERSCRIPT



Re: Dialog won't come up - xtreamer - 01.09.2012

Idk what the problem is with these filterscripts because until now they were working just fine, and suddently they don't work now, after I restarted my server.


Re: Dialog won't come up - TzAkS. - 01.09.2012

Do you have #endif ?
If not put it after
Код:
public OnFilterScriptInit()
Edit:
Log in as rcon and write /rcon loadfs FSNAME and try then.


Re: Dialog won't come up - xtreamer - 01.09.2012

I changed dialog id from #define and now the menu shows up, but when I chose what bandana I want it won't came up. I use this to create bandana

Код:
	SetPlayerAttachedObject( playerid, 0, 18895, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
But from my last server restart I replaced all objects with Incongnito's streamer. Now what I don't know is what to replace SetPlayerATtachedObject with? Is there any streamer function for this? like SetPlayerAttachedDynamicObject or so?


Re: Dialog won't come up - [KHK]Khalid - 01.09.2012

This part is wrong:

pawn Код:
#define DIALOG_BANDANA 55995
The maximum dialog id has been breached thus the dialog doesn't show up. To solve this, put another dialog id that doesn't go over the dialog limits (Max dialogid is 32767).


Re: Dialog won't come up - xtreamer - 01.09.2012

Ok HellSphinX that I already did and the menu is showing up but the problem is that I don't know why when I enter the bandana I want to wear it won't came up. I think it's incognito's streamer' fault. I think I must replace setplayerattachedobject with the incognito's streamer function but I don'tknow if there is any.


Re: Dialog won't come up - xtreamer - 01.09.2012

#up still not solved, can some1 help me?


Re: Dialog won't come up - xtreamer - 01.09.2012

PLEEAAASE HELP ME SOLVE THIS sTUPID BUG!