Dialog stats
#1



How can I display my stats like this?Please help.
Reply
#2

?

pawn Код:
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Your Stats!", "Line1\nLine2\nLine3\nLine4", "Ok", "");
Or are you asking about how they added those values (VIP, money etc.)?
Reply
#3

Using format and hex colour codes.
Reply
#4

can you give me an example becozz my stats command is really big so please..
Reply
#5

pawn Код:
// create some vars
new x, y;
// setting their values
x = 4;
y = 8;
// declaring a string to hold these vars
new str[16];
// formating it
format(str, sizeof(str), "x: %d\ny: %d", x, y); // adding the vars into the string. \n creates a new line
// Output:
// x: 4
// y: 8
// -------
// Now you can use the string that you formatted in your dialog
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dialog", str, "Ok", "");
Reply
#6

https://sampwiki.blast.hk/wiki/Format
https://sampwiki.blast.hk/wiki/ShowPlayerDialog

pawn Код:
CMD:stats(playerid, params[])
{
    new string[256], sendername[MAX_PLAYER_NAME];
    new
        admin,
        kills,
        deaths;
       
    admin = PlayerInfo[playerid][pAdmin]; // i dont know your variables , change this to your variables
    kills = PlayerInfo[playerid][pKills];
    deaths = PlayerInfo[playerid][pDeaths];
    format(string,sizeof(string), "PlayerName:( %s ) Admin Level:[ %d ] Kills:[ %d ] Deaths:[ %d ]",sendername,admin,kills,deaths);
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX , "Player Stats", string, "Okay", "");
    return 1;
}
this one is on "ZCMD"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)