Make KDR
#1

how to add KDR in /stats?
pawn Код:
CMD:stats (playerid, params[])
{
    new str[400], second[400], giveid, AdminRank[30], weaponset[30];
    if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF, "{F07F1D}USAGE: {BBFF00}/stats <ID>" );
    if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Invalid player ID!");
    switch (PlayerInfo[giveid][Admin])
    {
        case 0: AdminRank = "Regular Player";
        case 1: AdminRank = "{15C257}Moderator";
        case 2: AdminRank = "{EDD628}Administrator";
        case 3: AdminRank = "{3D77F5}Head Administrator";
        case 4: AdminRank = "{F55F3D}Server Owner";
    }
    switch (PlayerInfo[giveid][WeaponSet])
    {
        case 0: weaponset = "Standard";
        case 1: weaponset = "Advanced";
        case 2: weaponset = "Expert";
        case 3: weaponset = "Custom";
    }
    format(str, sizeof(str), "{%06x}%s(%d) "RED"|| {FCFFC3}Statistics:\n\n{6EAAFF}> Member since: "STEELBLUE"%s\n{6EAAFF}> Status: "STEELBLUE"%s\n{6EAAFF}> Online Time: "STEELBLUE"%d hours and %d minutes\n", (GetPlayerColor(giveid) >>> 8), GetName(giveid), giveid, PlayerInfo[giveid][RegOn], AdminRank, PlayerInfo[giveid][Hours], PlayerInfo[giveid][Minutes]);
    format(second, sizeof(second), "{6EAAFF}> Score: "STEELBLUE"%d\n{6EAAFF}> Cash: "STEELBLUE"$%d\n{6EAAFF}> Kills: "STEELBLUE"%d\n{6EAAFF}> Deaths: "STEELBLUE"%d\n{6EAAFF}> Weapon Set: "STEELBLUE"%s\n", GetPlayerScore(giveid), GetPlayerMoney(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], weaponset);
    strcat(str, second);
    ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{21A6FF}Statistics", str, "OK", "");
    return 1;
}
Reply


Messages In This Thread
Make KDR - by PowerF - 11.01.2015, 00:24
Re: Make KDR - by Cannary2048 - 11.01.2015, 05:27
Re: Make KDR - by Threshold - 11.01.2015, 08:11
Re: Make KDR - by fatlirmorina - 11.01.2015, 08:54

Forum Jump:


Users browsing this thread: 2 Guest(s)