SA-MP Forums Archive
Dialog wont show - 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 wont show (/showthread.php?tid=584390)



Dialog wont show - JesusChrysler - 04.08.2015

Can someone tell me what I'm doing wrong? For some reason when I join in-game, nothing happens. Like the dialog doesn't even pop-up.

Код HTML:
format(string2, sizeof(string2),"{FFFFFF}%s - test\n",GetPlayerNameEx(playerid));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "%s %s\n", AddCommas(spawnmoney), AddCommas(spawnbank));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "Test");
			strcat(string2,coordsstring);
			ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{ffa500}Test", string2,"Spawn","", GetPlayerNameEx(playerid));
			strcat(string2,coordsstring);



Re: Dialog wont show - Fancy - 04.08.2015

Код:
            format(string2, sizeof(string2),"{FFFFFF}%s - test\n",GetPlayerNameEx(playerid));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "%s %s\n", AddCommas(spawnmoney), AddCommas(spawnbank));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "Test");
			strcat(string2,coordsstring);
			ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{ffa500}Test", string2,"Spawn","");



Re: Dialog wont show - JesusChrysler - 04.08.2015

Still doesn't work.


Re: Dialog wont show - Fancy - 04.08.2015

Quote:
Originally Posted by JesusChrysler
Посмотреть сообщение
Still doesn't work.
Show me the command,and did you added the string variables?


Re: Dialog wont show - JesusChrysler - 04.08.2015

Quote:
Originally Posted by Fancy
Посмотреть сообщение
Show me the command,and did you added the string variables?
When the player spawns in:
Код HTML:
	SendSpawnDialog(playerid);
Код HTML:
SendSpawnDialog(playerid)
{            
format(string2, sizeof(string2),"{FFFFFF}%s - test\n",GetPlayerNameEx(playerid));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), " Test\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "%s %s\n", AddCommas(spawnmoney), AddCommas(spawnbank));
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "\n{ffa500}Testing{ffffff}\n");
			strcat(string2,coordsstring);
			format(coordsstring, sizeof(coordsstring), "Test");
			strcat(string2,coordsstring);
			ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{ffa500}Test", string2,"Spawn","");
}



Re: Dialog wont show - SpikY_ - 04.08.2015

try this?

Код:
        new string[3000], dialog[3000];
        format(string, sizeof(string),"{FFFFFF}%s - test\n",GetPlayerNameEx(playerid));
        strcat(dialog,string);
        format(string, sizeof(string),"\n");
        strcat(dialog,string);
        format(string, sizeof(string),"{ffa500}Testing{ffffff}\n");
        strcat(dialog,string);
        format(string, sizeof(string),"Test\n");
        strcat(dialog,string);
        format(string, sizeof(string),"Test\n");
        strcat(dialog,string);
        format(string, sizeof(string),"%s %s\n", AddCommas(spawnmoney), AddCommas(spawnbank)");
        strcat(dialog,string);
        format(string, sizeof(string),"\n{ffa500}Testing{ffffff}\n\n");
        strcat(dialog,string);
        format(string, sizeof(string),"Test\n");
        strcat(dialog,string);
        ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{ffa500}Test",dialog,"Close","");



Re: Dialog wont show - JesusChrysler - 05.08.2015

Still nothing.


Re: Dialog wont show - SpikeSpigel - 05.08.2015

Have you tried to do like that ?

Код:
format(string2, sizeof(string2),"{FFFFFF}%s - test",GetPlayerNameEx(playerid));
			format(coordsstring, sizeof(coordsstring), "Test");
			format(coordsstring, sizeof(coordsstring), "{ffa500}Testing{ffffff}");
			format(coordsstring, sizeof(coordsstring), " Test");
			format(coordsstring, sizeof(coordsstring), " Test");
			format(coordsstring, sizeof(coordsstring), "%s %s", AddCommas(spawnmoney), AddCommas(spawnbank));
			format(coordsstring, sizeof(coordsstring), "\n{ffa500}Testing{ffffff}");
			format(coordsstring, sizeof(coordsstring), "Test");
			strcat(string2,coordsstring);
}



Re: Dialog wont show - JesusChrysler - 08.08.2015

Quote:
Originally Posted by SpikeSpigel
Посмотреть сообщение
Have you tried to do like that ?

Код:
format(string2, sizeof(string2),"{FFFFFF}%s - test",GetPlayerNameEx(playerid));
			format(coordsstring, sizeof(coordsstring), "Test");
			format(coordsstring, sizeof(coordsstring), "{ffa500}Testing{ffffff}");
			format(coordsstring, sizeof(coordsstring), " Test");
			format(coordsstring, sizeof(coordsstring), " Test");
			format(coordsstring, sizeof(coordsstring), "%s %s", AddCommas(spawnmoney), AddCommas(spawnbank));
			format(coordsstring, sizeof(coordsstring), "\n{ffa500}Testing{ffffff}");
			format(coordsstring, sizeof(coordsstring), "Test");
			strcat(string2,coordsstring);
}
Still doesn't work.


Re: Dialog wont show - MarvinPWN - 09.08.2015

Does it work?
PHP код:
format(string2,sizeof string2,"{FFFFFF}%s - test\n\n{FFA500}Testing{FFFFFF}\nTest\nTest\n%s %s\n\n{FFA500}Testing{FFFFFF}\nTest",
GetPlayerNameEx(playerid),AddCommas(spawnmoney),AddCommas(spawnbank));
ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{FFA500}Test",string2,"Spawn","");