DIALOG_MSGBOX
#1

hello, i wonder how to create GUI MSGBOX STYLE, but i don't know how to make next line, because everything goes in one line

Код:
	CMD:stats(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
            new admin = PlayerInfo[playerid][pAdminLevel];
            new vip = PlayerInfo[playerid][pVIP];
            new money = PlayerInfo[playerid][pCash];
            new level = PlayerInfo[playerid][pScore];
            new vw = PlayerInfo[playerid][pVw];
            new interior = PlayerInfo[playerid][pInt];
            new string[128],stats[1024];
            format(string, sizeof string1, "{44A1D0}Level: {FFFFFF}[%d] {44A1D0}Money: {FFFFFF}[$%d] {44A1D0}AdminLevel: {FFFFFF}[$%d] {44A1D0}VIP: {FFFFFF}[$%d] {44A1D0}VW: {FFFFFF}[$%d] {44A1D0}Int: {FFFFFF}[$%d]", level,money,admin,vip,vw,interior);
            format(stats, sizeof stats, "%s", string);
            ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
        }
        return 1;
    }
and /n it's not working, i want make something like this:
Reply
#2

GUI MSGBOX STYLE?
Reply
#3

Quote:
Originally Posted by Dainyzxz
Посмотреть сообщение
Код:
            new string[128],stats[1024];
            format(string, sizeof string1, "{44A1D0}Level: {FFFFFF}[%d] {44A1D0}Money: {FFFFFF}[$%d] {44A1D0}AdminLevel: {FFFFFF}[$%d] {44A1D0}VIP: {FFFFFF}[$%d] {44A1D0}VW: {FFFFFF}[$%d] {44A1D0}Int: {FFFFFF}[$%d]", level,money,admin,vip,vw,interior);
            format(stats, sizeof stats, "%s", string);
            ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
Why are you formatting 2 times? Also it's \n not /n

So, try to change those codes to this:
pawn Код:
new stats[256]; // i think this will be enough
format(stats, sizeof(stats), "{44A1D0}Level: {FFFFFF}[%d]\n{44A1D0}Money: {FFFFFF}[$%d]\n{44A1D0}AdminLevel: {FFFFFF}[%d]\n{44A1D0}VIP: {FFFFFF}[%d]\n{44A1D0}VW: {FFFFFF}[%d]\n{44A1D0}Int: {FFFFFF}[%d]", level,money,admin,vip,vw,interior);
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
However, try this for shorter code:
pawn Код:
CMD:stats(playerid, params[])
{
    new stats[256];
    format(stats, sizeof(stats), "{44A1D0}Level: {FFFFFF}[%d]\n{44A1D0}Money: {FFFFFF}[$%d]\n{44A1D0}AdminLevel: {FFFFFF}[%d]\n{44A1D0}VIP: {FFFFFF}[%d]\n{44A1D0}VW: {FFFFFF}[%d]\n{44A1D0}Int: {FFFFFF}[%d]",
        PlayerInfo[playerid][pScore], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pVw], PlayerInfo[playerid][pInt]);
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
    return 1;
}
Not yet tested, hope it helps
Reply
#4

Use "\n" !
Reply
#5

thank you all, problem was that I used /n not \n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)