31.01.2013, 09:29
Hello
i need a savestats cmd for luxadmin
see this :
these are resetstats and stats but i need savestats
tnx
gift : 2 rep
i need a savestats cmd for luxadmin
see this :
Код:
dcmd_resetstats(playerid,params[]) { #pragma unused params if(AccInfo[playerid][LoggedIn] == 1) { dUserSetINT(PlayerName2(playerid)).("oldkills",AccInfo[playerid][Kills]); dUserSetINT(PlayerName2(playerid)).("olddeaths",AccInfo[playerid][Deaths]); AccInfo[playerid][Kills] = 0; AccInfo[playerid][Deaths] = 0; dUserSetINT(PlayerName2(playerid)).("Kills",AccInfo[playerid][Kills]); dUserSetINT(PlayerName2(playerid)).("Deaths",AccInfo[playerid][Deaths]); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); return SendClientMessage(playerid,yellow,"|- You have Successfully reset your Stats! -|"); } else return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command"); } dcmd_stats(playerid,params[]) { new string[128]; new pDeaths; new player1, h, m, s; if(!strlen(params)) player1 = playerid; else player1 = strval(params); if(IsPlayerConnected(player1)) { 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] | Time: [%d] hrs [%d] mins [%d] secs |", AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s); return SendClientMessage(playerid, green, string); } else return SendClientMessage(playerid, red, "ERROR: Player Not Connected!"); }
tnx
gift : 2 rep