SA-MP Forums Archive
ondialog response problem (cant process the code) - 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: ondialog response problem (cant process the code) (/showthread.php?tid=633285)



ondialog response problem (cant process the code) - grymtn - 28.04.2017

hello friends im trying to make a phone system but it doesnt work. I have on dialog response for 911 call and taxi call but they dont send the messages to required players and it doesnt process ProxDetector fucntion too...

My Code:
Код:
		case 789911:
		{
		    if(response)
			{
			    new Text[128],pname[24];
			    GetPlayerName(playerid,pname,24);
			    format(Text,sizeof(Text),"[ph]%s: %s",pname,inputtext);
			    ProxDetector(23.0, playerid, Text, -1);
			    for(new i = 0; i < MAX_PLAYERS; i++)
			    {
					if(USER[i][FACTION] == 1 || USER[i][FACTION] == 2)
					{
					    SendClientMessage(i,COLOR_YELLOW,Text);
					}
			    }
			    if(noo3a == 0)
				{
				    noo3a=1;
				    format(noo3,sizeof(noo3),Text);
				    noo2a=0;
				}
				if(noo2a == 0)
				{
				    noo2a=1;
				    format(noo2,sizeof(noo2),Text);
				    noo3a=0;
				}
			}
		}
		case 789544:
		{
		    if(response)
			{
			    new Text[128],pname[24];
			    GetPlayerName(playerid,pname,24);
			    format(Text,sizeof(Text),"[ph]%s: %s",pname,inputtext);
			    ProxDetector(23.0, playerid, Text, -1);
			    for(new i = 0; i < MAX_PLAYERS; i++)
			    {
					if(USER[i][FACTION] == 4)
					{
					    SendClientMessage(i,COLOR_YELLOW,Text);
					}
			    }
			}
		}



Re: ondialog response problem (cant process the code) - Vince - 28.04.2017

Max dialogid is 36000-ish. Check the wiki.


Re: ondialog response problem (cant process the code) - grymtn - 28.04.2017

oh i just did that to randomize my numbers so i wont collide with them in future and didnt mean to exceed the number and didnt realise yeah lol ty for the answer lol


Re: ondialog response problem (cant process the code) - NealPeteros - 28.04.2017

Suggestion: use 4-digit numbers to create dialog ids. There's a whole lot of numbers with 4 digits. Numerous enough for your dialogs to fit in. Unless if you have a thousand dialogs, which would be impossible.