SA-MP Forums Archive
[Help]with an explanation - 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: [Help]with an explanation (/showthread.php?tid=132767)



[Help]with an explanation - Mark k - 09.03.2010

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


Re: [Help]with an explanation - [MWR]Blood - 09.03.2010

Ummm... more info please?


Re: [Help]with an explanation - Mark k - 09.03.2010

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.


Re: [Help]with an explanation - Torran - 09.03.2010

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

There you go


Re: [Help]with an explanation - Mark k - 09.03.2010

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


Re: [Help]with an explanation - Torran - 09.03.2010

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


Re: [Help]with an explanation - Joe_ - 09.03.2010

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.



Re: [Help]with an explanation - Mark k - 09.03.2010

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?


Re: [Help]with an explanation - Joe_ - 09.03.2010

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.



Re: [Help]with an explanation - Niixie - 09.03.2010

my signature. that proofs that you didnt search