/stats in dialog how?
#5

pawn Код:
CMD:stats(playerid,params[])
{
    new string[128], pDeaths, player1,playername[MAX_PLAYER_NAME];
    if(isnull(params)) player1 = playerid;
    else player1 = strval(params);

    if (!IsPlayerConnected(player1)) return SendClientMessage(playerid, -1, "Player Not Connected!");
    GetPlayerName(player1, playername, sizeof(playername));
    if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
    new str[128], str1[128];
    new fstr[1800];
    format(str, sizeof(str),"%s's Stats", PlayerName2(player1));
    format(string,sizeof(string),"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f", GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/FloatDeaths);
    format(str1, sizeof(str1),"Rank: %s | Team: %s | Class: %s | Session Kills %d",GetRankName(player1), GetTeamName(player1), GetClass(player1), Skills[player1]);

    strcat(fstr, str);
    strcat(fstr, string);
    strcat(fstr, str1);
    ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Player Stats", fstr, "OK", "");
    return 1;
}
Sorry forgot about something
Reply


Messages In This Thread
/stats in dialog how? - by PAF - 26.01.2014, 05:18
Re: /stats in dialog how? - by donhu789 - 26.01.2014, 05:28
Re: /stats in dialog how? - by PAF - 26.01.2014, 05:31
Re: /stats in dialog how? - by GODEX - 26.01.2014, 05:36
Re: /stats in dialog how? - by donhu789 - 26.01.2014, 05:57
Re: /stats in dialog how? - by PAF - 26.01.2014, 07:14
Re: /stats in dialog how? - by PAF - 26.01.2014, 08:06
Re: /stats in dialog how? - by donhu789 - 26.01.2014, 13:00

Forum Jump:


Users browsing this thread: 1 Guest(s)