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



Dialog box? - iWaYz - 08.04.2012

Hello all, can someone tell mi how to make box like this

I know it must be with ShowPlayerDialog but a don't understand what to do exactly...


Re: Dialog box? - iWaYz - 08.04.2012

Anyone?


Re: Dialog box? - Cjgogo - 08.04.2012

wiki.sa-mp.com/wiki/OnDialogResponse

That's how you work with the dialogs;

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

That's how you create them


Re: Dialog box? - Hoss - 08.04.2012

How to create Dialog : https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Color embedding : https://sampwiki.blast.hk/wiki/Colour_Embedding
This is ' DIALOG_STYLE_MSGBOX

Example:
pawn Код:
ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Name Of IT","Text 1\nText2\nText3","Close","")
* Use \n for new line


Re: Dialog box? - AndreT - 08.04.2012

You're correct about ShowPlayerDialog. The style must be DIALOG_STYLE_MSGBOX. And as of 0.3c, you can use colors there as well.

ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "KOMANDI:", "PRIVET, {FF0000}KOMRADE!", "drugi", "zatvori")

// Edit... sorry guys for posting just a little bit after you


Re: Dialog box? - Trawltrawl - 08.04.2012

I'll edit my post, just lemme get my pawno


Re: Dialog box? - iWaYz - 08.04.2012

Thank you guys


Re: Dialog box? - Trawltrawl - 08.04.2012

There's 2 diffrent ways to do it, if you want to do it when someone types something, or when someone spawns.
I'll show you when someone spawns.
GET THE STYLES FROM HERE https://sampwiki.blast.hk/wiki/Dialog
In the picture the style is #0
pawn Код:
public OnPlayerSpawn(playerid) // when player spawns
{
    ShowPlayerDialog(playerid, 1, 0, "This is the title", "/buylevel {0fc0fc}- bla bla, /quit - bla bla" , "ok", "cancel"); // shows the player the dialog, // playerid, dialogid, style, title, boy, button 1, button 2
    return 1;
}
{0fc0fc} is the colors = Light Blue.
-
That's for the script, it should work
Now if you want to add some effects to the buttons, you should go to
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) // to make respones
And there you edit the effects, k thx.
Click respect
P.S. If you want 1 button, simply leave the other one empty(but add 1 space)