SA-MP Forums Archive
show string value in dialog_style_msgbox - 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: show string value in dialog_style_msgbox (/showthread.php?tid=495927)



show string value in dialog_style_msgbox - karolis11234 - 19.02.2014

okay so im trying to show what is the string value using dialogs how can i do it ?


Re: show string value in dialog_style_msgbox - Kyle - 19.02.2014

You want a variable printing into a dialog?

Код:
new string[128];

format(string, sizeof(string), "This is a message test for the dialog string. \n\rPlease say abracadabra after me.");

ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Important Message", string, "Close", "");



Re: show string value in dialog_style_msgbox - karolis11234 - 19.02.2014

i will give you a example
i create a new string: new moneyjob[MAX_PLAYERS];
and add 50 to it: moneyjob[playerid] += 50;
and i want to check whats the value when i add 50 to it


Re: show string value in dialog_style_msgbox - mamorunl - 19.02.2014

pawn Код:
new string[128];

format(string, sizeof(string), "This is a message test for the dialog string. \n\rYour money is %d.", moneyjob[playerid]);

ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Important Message", string, "Close", "");
For more information on how to use format, please refer to the SA:MP Wiki