[pawn]#if defined USE_STATS
dcmd_stats(playerid,params[]) {
new string[128], 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 Statisztika: ölés: %d | halál: %d | arány: %0.2f | pénz: $%d | nap: %d óra %d perc %d mp |\",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, \"HIBA: játékos nincs csatlakozva!\");
}
#endif
#endif
LoginPlayer(playerid)
{
if(ServerInfo[GiveMoney] == 1) {ResetPlayerMoney(playerid); GivePlayerMoney(playerid, dUserINT(PlayerName2(playerid)).(\"money\") ); }
dUserSetINT(PlayerName2(playerid)).(\"loggedin\",1);
PlayerInfo[playerid][Deaths] = (dUserINT(PlayerName2(playerid)).(\"deaths\"));
PlayerInfo[playerid][Kills] = (dUserINT(PlayerName2(playerid)).(\"kills\"));
PlayerInfo[playerid][Level] = (dUserINT(PlayerName2(playerid)).(\"level\"));
PlayerInfo[playerid][hours] = dUserINT(PlayerName2(playerid)).(\"hours\");
PlayerInfo[playerid][mins] = dUserINT(PlayerName2(playerid)).(\"minutes\");
PlayerInfo[playerid][secs] = dUserINT(PlayerName2(playerid)).(\"seconds\");
PlayerInfo[playerid][Registered] = 1;
PlayerInfo[playerid][LoggedIn] = 1;
}[/pawn]