LuxAdmin /stats
#1

Anyone know how do I add other stats like if player Pm is Enabled it will also show in Dialog

Example

Код:
SkinID:
Score:
Kills:
Death:
Ratio:
Pm: Enabled/Disabled (If Player Pm is set to Enable then enabled, if Not then Disabled)
Money:
Ping:
Time Login:

pawn Код:
dcmd_stats(playerid,params[])
{
    new str[512], pDeaths, player1, h, m, s;
    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);
    if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, red, "ERROR: Player Not Connected!");
    TotalGameTime(player1, h, m, s);
    if(AccInfo[player1][Deaths] == 0) pDeaths = 1;
    else pDeaths = AccInfo[player1][Deaths];
    format(str, sizeof(str), "{DAA520}%s (ID: %d){B0C4DE}\n\n", PlayerName2(player1), player1);
    format(str, sizeof(str), "%sSkinID: %d\n", str, GetPlayerSkin(player1));
    format(str, sizeof(str), "%sScore: %d\n", str, GetPlayerScore(player1));
    format(str, sizeof(str), "%sKills: %d\n", str, AccInfo[player1][Kills]);
    format(str, sizeof(str), "%sDeaths: %d\n", str, AccInfo[player1][Deaths]);
    format(str, sizeof(str), "%sRatio: %d\n", str, Float:AccInfo[player1][Kills]/Float:pDeaths);
    format(str, sizeof(str), "%sMoney: $%d\n", str, GetPlayerMoney(player1));
    format(str, sizeof(str), "%sPing: %d\n", str, GetPlayerPing(player1));
    format(str, sizeof(str), "%sTime Login: %d hours %d minutes %d seconds\n", str, h, m, s);
    ShowPlayerDialog(playerid, 8435, DIALOG_STYLE_MSGBOX, "Player Statistics", str, "Close", "");
    return 1;
}
Reply


Messages In This Thread
LuxAdmin /stats - by kbalor - 25.07.2012, 15:42
Re: LuxAdmin /stats - by SuperViper - 25.07.2012, 16:23
Re: LuxAdmin /stats - by kbalor - 25.07.2012, 16:28
Re: LuxAdmin /stats - by SuperViper - 25.07.2012, 16:32
Re: LuxAdmin /stats - by kbalor - 25.07.2012, 16:35
Re: LuxAdmin /stats - by SuperViper - 25.07.2012, 16:43
Re: LuxAdmin /stats - by kbalor - 25.07.2012, 16:53
Re: LuxAdmin /stats - by SuperViper - 25.07.2012, 17:15
Re: LuxAdmin /stats - by kbalor - 25.07.2012, 17:29
Re: LuxAdmin /stats - by xSkullx - 25.07.2012, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)