dcmd_stats(playerid,params[]) { new string[150], pDeaths, player1, h, m, s, RegDate[256], file[256]; if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { format(file,sizeof(file),"/LuxAdmin/Users/%s.sav",udb_encode(PlayerName2(player1))); if(!strlen(params)) player1 = playerid; else player1 = strval(params); if(strlen(dini_Get(file,"RegisteredDate")) < 3) RegDate = "n/a"; else RegDate = dini_Get(file,"RegisteredDate"); TotalGameTime(player1, h, m, s); if(AccInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = AccInfo[player1][Deaths]; format(string, sizeof(string), "|- %s's Statistics -|",PlayerName2(player1)); SendClientMessage(playerid, green, string); format(string, sizeof(string), "Kills: [%d] | Deaths: [%d] | Ratio: [%0.2f] | Money: [$%d] | Registration Date: %s | Time: [%d] hrs [%d] mins [%d] secs |", AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), RegDate, h, m, s); return SendClientMessage(playerid, green, string); } else return SendClientMessage(playerid, red, "ERROR: Player Not Connected!"); }
luxadmin worked for me when i used to use it, if you extracted just that it obviously will not work as you need the file saving functions & the register/login commands, and don't bump your thread in no longer than 24 hours read the forum rules.
|