make strcat
#2

You can just try this one :-
pawn Код:
COMMAND:stats(playerid,params[])
{
    new string[250], string2[250], AllStrings[500], pDeaths, player1, player, h, m, s;

    if(sscanf(params, "r", player))
    {
        player1 = playerid;
    }
    else
    {
        player1 = player;
    }

    if(IsPlayerConnected(player1))
    {
        TotalGameTime(player1, h, m, s);
        if(PlayerInfo[player1][Deaths] == 0) { pDeaths = 1; }
        else { pDeaths = PlayerInfo[player1][Deaths]; }
        #if USE_VIP_SYSTEM == true
        format(string, sizeof(string), "\n{FEFEFE}Stats of the player: %s\n\n{FEFEFE}Kills:\t\t%d\nDeaths:\t\t%d\nK/D:\t\t%0.2f\nScore:\t\t%d",GetName(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerScore(player1));
        format(string2, sizeof(string2), "Money:\t\t$%d\nVIP Level:\t%d\nHours:\t\t%d\nMinutes\t%d\nSeconds:\t%d\nRegister date:\t%s",GetPlayerMoney(player1),PlayerInfo[player1][VIPLevel],h,m,s,PlayerInfo[player1][RegDate]);
        format(AllStrings, sizeof(AllStrings), "%s\n%s",string, string2);
        #else
        format(string, sizeof(string), "\n{FEFEFE}Stats of the player: %s\n\n{FEFEFE}Kills:\t\t%d\nDeaths:\t\t%d\nK/D:\t\t%0.2f\nScore:\t\t%d",GetName(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerScore(player1));
        format(string2, sizeof(string2), "Money:\t\t$%d\nHours:\t\t%d\nMinutes\t%d\nSeconds:\t%d\nRegister date:\t%s",,GetPlayerMoney(player1),h,m,s,PlayerInfo[player1][RegDate]);
        format(AllStrings, sizeof(AllStrings), "%s\n%s",string, string2);
        #endif
        ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX, "Player Statistics", string, "Close", "");
    }
    else
    {
            GameTextForPlayer(playerid, "~r~player is unavailable", 3000, 3);
    }
    return 1;
}
Tell me if there is any problem
Reply


Messages In This Thread
make strcat - by kbalor - 10.11.2013, 11:49
Re: make strcat - by SAMProductions - 10.11.2013, 12:00
Re: make strcat - by kbalor - 10.11.2013, 12:11
Re: make strcat - by SAMProductions - 10.11.2013, 12:16
Re : make strcat - by DanishHaq - 10.11.2013, 12:17
Re: make strcat - by SAMProductions - 10.11.2013, 12:27
Re: make strcat - by DanishHaq - 10.11.2013, 12:45

Forum Jump:


Users browsing this thread: 2 Guest(s)