Dialog_msgbox
#1

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

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");
Reply
#3

I want title to be for example

status for player: %s

what means, for example

status for player: ]Rafaellos[
Reply
#4

You can still do it using format.
Reply
#5

how can you give me example please?
Reply
#6

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

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");
Reply
#8

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");
Reply
#9

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;
}
Reply
#10

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 :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)