SA-MP Forums Archive
Dialog_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: Dialog_msgbox (/showthread.php?tid=519898)



Dialog_msgbox - bijela - 16.06.2014

how make stats in Dialog_msgbox? i mean only how to make.... for example title status for player: bijela

and in dialog

Cop rank: %d etc etc...


Re: Dialog_msgbox - ]Rafaellos[ - 16.06.2014

Using format. In case you want new line, use \n. Example:

pawn Код:
format(string, sizeof(string), "Cop rank: %d\nVip rank: %d", coprank, viprank);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Title", string, "Button1", "Button2");



Re: Dialog_msgbox - bijela - 16.06.2014

I want title to be for example

status for player: %s

what means, for example

status for player: ]Rafaellos[


Re: Dialog_msgbox - ]Rafaellos[ - 16.06.2014

You can still do it using format.


Re: Dialog_msgbox - bijela - 16.06.2014

how can you give me example please?


Re: Dialog_msgbox - Zex Tan - 16.06.2014

pawn Код:
format(title, 60, "Stats of %s", PlayerLog[playerid][Name]);
ShowPlayerDialog(playerid, 0, 0, title, string, "Button 1", "Button 2");
It is literally the same, just format!


Re: Dialog_msgbox - bijela - 17.06.2014

Can you make one example please broo? just one with dialog_msg and tittle? please

for example:

Stats of %s

and in dialog

Roblevel etc please? CAn you do it i try sometghing like this but don't work

format(string, sizeof(string), "Cop rank: %d\nVip rank: %d", coprank, viprank);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Title", string, "Button1", "Button2");
format(title, 60, "Stats of %s", PlayerLog[playerid][Name]);
ShowPlayerDialog(playerid, 0, 0, title, string, "Button 1", "Button 2");


Re: Dialog_msgbox - Konstantinos - 17.06.2014

pawn Код:
format(string, sizeof(string), "Cop rank: %d\nVip rank: %d", coprank, viprank);
format(title, sizeof(title), "Stats of %s", PlayerLog[playerid][Name]);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, title, string, "Button 1", "Button 2");



Re: Dialog_msgbox - Swyft™ - 17.06.2014

Quote:
Originally Posted by bijela
Посмотреть сообщение
Can you make one example please broo? just one with dialog_msg and tittle? please

for example:

Stats of %s

and in dialog

Roblevel etc please? CAn you do it i try sometghing like this but don't work

format(string, sizeof(string), "Cop rank: %d\nVip rank: %d", coprank, viprank);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Title", string, "Button1", "Button2");
format(title, 60, "Stats of %s", PlayerLog[playerid][Name]);
ShowPlayerDialog(playerid, 0, 0, title, string, "Button 1", "Button 2");
If you don't know the basics of strings then how will you make a server?

pawn Код:
// Using ZCMD

CMD:stats(playerid, params[])
{
    new name[MAX_PLAYER_NAME+1], string[64];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Username: %s", name);
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "User Statistics", string, "Close", "");
    return 1;
}



Re: Dialog_msgbox - Clad - 17.06.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "Cop rank: %d\nVip rank: %d", coprank, viprank);
format(title, sizeof(title), "Stats of %s", PlayerLog[playerid][Name]);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, title, string, "Button 1", "Button 2");
Man, Use this format and just replace and add, He just give you the right format, C'mon, Do an effort and add some stats by ur self :/