[Help]with an explanation
#1

Hey, i need help with the Dialog Style MSG_BOX i don't know how to use can anybody give me a tut.?
Reply
#2

Ummm... more info please?
Reply
#3

Listen there are 3 dialogs that you can make DIALOG_STYLE_INPUT, DIALOG_STYLE_LIST, and the DIALOG_STYLE_MSG_BOX so i need a tut. about making the third one.
Reply
#4

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog

There you go
Reply
#5

^ man it's only for the DIALOG_STYLE_LIST, i need the third one.
Reply
#6

MSGBOX are easy..

ShowPlayerDialog(playerid, 900, DIALOG_STYLE_MSGBOX, "Message", "This is what to do to create a msgbox dialog", "Exit", "Cancel");

Thats it.. Nothing else you need to do
Reply
#7

There isn't a tutorial for the "third" one..

Try using:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(!strcmp(cmdtext, "/dialogtest", true))
   {
     ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Test Caption", "Test Info", "Test 1", "Test 2");
     return 1;
   }
   return 1;
}
Under a command to see where the writing will be.
Reply
#8

No listen, but on the OnDialogResponse. what should i put there i mean, you did exit and quit that i need to define what happenes if the player picks exit and what happenes if he picks quit, do you get it?
Reply
#9

You should be more specific in your post then.

Not tested
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == DIALOG_ID_HERE && response)
   {
      // If he responded
      // do ST00F
   }
   return 1;
}
I've not yet used the style
Code:
 DIALOG_STYLE_MSGBOX
But it should be similar to the list one.

EDIT -
I just went and tested it.



This basicly shows a message..
So you could use...

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == DIALOG_ID_HERE && response)
   {
      return 1;
   }
   return 1;
}
So basicly when you choose either one of the buttons (In my case, I just put both to "Cancel")
It will hide the Dialog.
Reply
#10

my signature. that proofs that you didnt search
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)