ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_MSGBOX,"Title here","This is a testing dialog box.","ok","");
pawn Код:
https://sampwiki.blast.hk/wiki/Dialog_Styles |
//top:
#define SOME_DIALOG 3334
//---
//somewhere, idk where you have it:
ShowPlayerDialog(playerid,SOME_DIALOG,DIALOG_STYLE_MSGBOX,"Title here","This is a testing dialog box.","ok","");
//------
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
//some dialogs....
//....
case SOME_DIALOG:
{
if(response) Showplayerdialog.... //and so on thats the next dialog when you click "ok"
else //do something else if they dont click ok
}
//.....
//.........
}
return 1;
}
CMD:test(playerid, params[]) { /test ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, "{33AA33}Test Commands", str, "Ok", "Cancel"); } return 1; }
go to your Dialog id in OnDialogResponse and do
PHP код:
|
ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"Title here","This is a testing dialog box.","ok","");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 12)
{
if(response)//if he pressed ok on dialog 12.
{
ShowPlayerDialog(playerid,13,.....);//another dialog bump up for him.
}
}
return 1;
}
Ahh , sorry for wrong understanding .
Ok so you'll need to create the first dialog , like the one i gaved above and let's say that the dialog id == 12 pawn Код:
pawn Код:
|
CMD:help(playerid, params[]) { new str[3000]; /newbie /tognewbie /requesthelp /families /refuel /car { ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, "{33AA33}Help Commands", str, "Ok", "Cancel"); } return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 12)
{
if(response)//if he pressed ok on dialog 12.
{
ShowPlayerDialog(playerid,13,.....);//another dialog bump up for him.
}
}
//another dialog checking.
if(dialogid == 13) //if the dialog id equal too 13
{
if(response)//if he pressed ok on dialog id 13.
{
ShowPlayerDialog(playerid,14,.....);//another dialog bump up for him.
}
}
return 1;
}