ondialog response problem (cant process the code)
#1

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

Max dialogid is 36000-ish. Check the wiki.
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)