Dialog box?
#1

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...
Reply
#2

Anyone?
Reply
#3

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
Reply
#4

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
Reply
#5

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
Reply
#6

I'll edit my post, just lemme get my pawno
Reply
#7

Thank you guys
Reply
#8

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)