Problem with Dialog - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with Dialog (
/showthread.php?tid=135826)
Problem with Dialog -
_soad_ - 21.03.2010
Hey.
I got some problems with my Dialog menu.
When i press Look_Behind, its open a Menu for me.
And when i press escape, close OR return, it makes everytime the same.
Its open the Dialog, that should come when i open the first in the list.
And on the 2nd Dialog i have the same problem.
When i press somethink, its accept it automatic as return.
Pls help me
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Haupt){
if(response == 0)
if(listitem == 0){
{
ShowPlayerDialog(playerid, Chat, DIALOG_STYLE_LIST, "Was kann ich fьr Sie tun'?", "BegrьЯung\nVerabschiedung\nKompliment\nEinstellungen", "Auswдhlen", "SchlieЯen");
}
}
}
if(dialogid == Chat){
if(listitem == 0){
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "[%s]: Guten Morgen Jungs und Mдddels! Wie geht es euch",name);
SendClientMessageToAll(0x0ffffff, string);
}
if(listitem == 1){
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "[%s]: TschьЯ und Aufwiedersehen Jungs und Mдddels! Sehen uns!",name);
SendClientMessageToAll(0x0ffffff, string);
}
}
Re: Problem with Dialog -
Fedee! - 21.03.2010
Try this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Haupt)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, Chat, DIALOG_STYLE_LIST, "Was kann ich fьr Sie tun'?", "BegrьЯung\nVerabschiedung\nKompliment\nEinstellungen", "Auswдhlen", "SchlieЯen");
}
}
}
if(dialogid == Chat)
{
if(listitem == 0)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "[%s]: Guten Morgen Jungs und Mдddels! Wie geht es euch",name);
SendClientMessageToAll(0x0ffffff, string);
}
if(listitem == 1)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "[%s]: TschьЯ und Aufwiedersehen Jungs und Mдddels! Sehen uns!",name);
SendClientMessageToAll(0x0ffffff, string);
}
}
Re: Problem with Dialog -
_soad_ - 21.03.2010
Ah good job.
But now i have the problem too in next Dialog, named Chat.
shall i put there this
?
Re: Problem with Dialog -
Fedee! - 21.03.2010
Yep.
Re: Problem with Dialog -
_soad_ - 22.03.2010
Ah, ok ty.
I now understand how it works
pawn Код:
if(dialogid == THE ID)
{
if(response)
{
if(listitem == 0)
{
//Somethink there
}
if(listitem == 1)
{
//Somethink there
}
}
}
Thats true?
Re: Problem with Dialog -
Fedee! - 22.03.2010
Yep