30.05.2014, 23:03
hey, I own a server and I want it perfect before it get on hosted tab. Im still waiting for Smartbytes to reply to my support ticket.
I want the /stats in dialog.
But heres the CMD:
Please I would +rep , i really need this command done for my server
I want the /stats in dialog.
But heres the CMD:
pawn Код:
dcmd_stats(playerid,params[]) {
new string[180], pDeaths, player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
format(string, sizeof(string), "| %s's Stats: Kills: %d | Deaths: %d | Ratio: {38F709}%0.2f |Money: {38F709}$%d | Time: %d hrs %d mins %d secs |",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
return SendClientMessage(playerid, green, string);
} else return SendClientMessage(playerid, red, "Player is not connected.");
}