05.11.2015, 15:01
PHP код:
CMD:stats(playerid,params[]) {
new string[100], pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
if(isnull(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
new Float:x, Float:y, Float:z, Float:health, Float:armor;
GetPlayerPos(playerid, x,y,z); GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armor);
TotalGameTime(player1, h, m, s);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
GetPlayerName(player1, playername, sizeof(playername));
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
new string1[512];
format(string1, sizeof(string1), "| %s's Stats: \n Kills: %d \n Deaths: %d \n Ratio: %0.2f \n Money: $%d \n Time: %d||| Hours: %d |||minutes: %d |||Seconds: %d\nScore: %s \n Health:%s \n Armour:%s",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s, GetPlayerScore(playerid), floatround(health),armor);
ShowPlayerDialog(playerid, 1112, DIALOG_STYLE_MSGBOX,"STATS",string, string1,"Close");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
return 1;
}
no response from command :P