Dialog Help
#1

Hey all sa-mp members!

Please tell me how do make dialog "DIALOG_STYLE_MSGBOX "

Like this

Someting here
Somethig here
Somethig here
Reply
#2

You use \n to get a new line. Like this:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Something", "Something Here\nSomething Here\nSomething Here", "Ok","Cancel");
Reply
#3

Oh tnks dud!

But how do remove the "OK" button?

Reply
#4

You put Cancel where it says Ok (first button) and remove the second button (You put "" at the end)
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Something", "Something Here\nSomething Here\nSomething Here", "Cancel","");
Reply
#5

Tnks alot!
Reply
#6

But what i but in "OnDialogResponse" :S

He say when i press "Cansel" i buy a food!
Reply
#7

if(!response)
Reply
#8

"Button 1","Button2");

- Button 1 = True value
- Button 2 = False value

Therefore, button 1 is meant for something like Buy, OK, Agree, Yes while button 2 is meant for something like Cancel, Disagree, No, Exit

Try putting Cancel into the 2nd set of quotes and Buy in the 1st set.

Also add:
pawn Код:
if(dialogid==Dialogonclick){ if(!response){return 0;}/* <=  EXIT Button*/}
This will help you too https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)