This is full comand:
pawn Код:
CMD:stats( PARAMS )
{
new str[ 1024 ], str2[ 1024 ], str3[ 1024 ], str4[ 2048 ], pDeaths, Player, h, m, s, rank[ 50 ], P1Logged[ 4 ], P1Rvip[ 4 ], P1Vip[ 4 ], rankid = PlayerInfo[ playerid ][ Rank ], P1SAdmin[ 4 ];
if ( !strlen( params ) ) Player = playerid;
else Player = strval( params );
if ( !IsPlayerConnected( Player ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "ERROR: Player not connected" );
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
if ( PlayerInfo[ Player ][ LoggedIn ] == 1 ) P1Logged = "Yes"; else P1Logged = "No";
if ( PlayerInfo[ Player ][ rVip ] == 1 ) P1Rvip = "Yes"; else P1Rvip = "No";
if ( PlayerInfo[ Player ][ pVip ] >= 1 ) P1Vip = "Yes"; else P1Vip = "No";
if ( PlayerInfo[ Player ][ SAdmin ] == 1 ) P1SAdmin = "Yes"; else P1SAdmin = "No";
if ( PlayerInfo[ Player ][ Rank ] == 0 ) { rank = "Looser"; }
else if ( PlayerInfo[ Player ][ Rank ] == 1 ) { rank = "Easy Killa'"; }
else if ( PlayerInfo[ Player ][ Rank ] == 2 ) { rank = "Baby Killer"; }
else if ( PlayerInfo[ Player ][ Rank ] == 3 ) { rank = "e-Gangsta"; }
else if ( PlayerInfo[ Player ][ Rank ] == 4 ) { rank = "Boss"; }
else if ( PlayerInfo[ Player ][ Rank ] == 5 ) { rank = "Lil' Psycho"; }
else if ( PlayerInfo[ Player ][ Rank ] == 6 ) { rank = "Psycho"; }
else if ( PlayerInfo[ Player ][ Rank ] == 7 ) { rank = "Unstopable"; }
else if ( PlayerInfo[ Player ][ Rank ] == 8 ) { rank = "Elite Killer"; }
else if ( PlayerInfo[ Player ][ Rank ] == 9 ) { rank = "Godlike killer!"; }
else if ( PlayerInfo[ Player ][ Rank ] == 10 ) { rank = "INSANE KILLER"; }
else if ( PlayerInfo[ Player ][ Rank ] == 11 ) { rank = "The God of Deathmatch"; }
format( str, sizeof( str ), "{E60000}%s{00FF00}'s Stats:\n\n\
{E60000}* {00FF00}Kills: {33CCFF}%d\n\
{E60000}* {00FF00}Deaths: {33CCFF}%d\n\
{E60000}* {00FF00}Ratio: {33CCFF}%0.2f\n\
{E60000}* {00FF00}Moneys: {33CCFF}%d{00FF00} $\n\
{E60000}* {00FF00}Score: {33CCFF}%d\n", PlayerName( Player ), PlayerInfo[ Player ][ Kills ], PlayerInfo[ Player ][ Deaths ], Float:PlayerInfo[ Player ][ Kills ]/Float:pDeaths, GetPlayerMoney( Player ), GetPlayerScore( Player ) );
format( str2, sizeof( str2 ), "%s{E60000}* {00FF00}Online Time: {33CCFF}%d {00FF00}Hrs | {33CCFF}%d {00FF00}Min | {33CCFF}%d {00FF00}Sec\n\
{E60000}* {00FF00}Coins: {33CCFF}%d\n\
{E60000}* {00FF00}Race Score: {33CCFF}%d\n\
{E60000}* {00FF00}DeathMatch Score: {33CCFF}%d\n\
{E60000}* {00FF00}Level: {33CCFF}%d\n", str, h, m, s, PlayerInfo[ Player ][ Coins ], PlayerInfo[ Player ][ RaceScore ], PlayerInfo[ Player ][ DeathMatch ], PlayerInfo[ Player ][ Level ] );
format( str3, sizeof( str3 ), "%s{E60000}* {00FF00}V.I.P: {33CCFF}%s {00FF00}- Level: {33CCFF}%d\n\
{E60000}* {00FF00}R.VIP: {33CCFF}%s\n\
{E60000}* {00FF00}Logged: {33CCFF}%s\n\
{E60000}* {00FF00}Warnings: {33CCFF}%d/3\n", str2, P1Vip, PlayerInfo[ Player ][ pVip ], P1Rvip, P1Logged, PlayerInfo[ Player ][ Warnings ] );
format( str4, sizeof( str4 ), "%s{E60000}* {00FF00}Rank: {E60000}%s {00FF00}(Rank: {33CCFF}%d{00FF00})\n\
{E60000}* {00FF00}Respect: {33CCFF}-%d{00FF00}/{33CCFF}+%d\n\
{E60000}* {00FF00}SAdmin: {33CCFF}%s\n\
{E60000}* {00FF00}Drugs: {33CCFF}%d", str3, rank, rankid, PlayerInfo[ Player ][ NegRespect ], PlayerInfo[ Player ][ PosRespect ], P1SAdmin, PlayerInfo[ playerid ][ Drugs ] );
ShowPlayerDialog( playerid, SStats, DIALOG_STYLE_MSGBOX, "Stats:", str4, "Cancel", "" );
return 1;
}
And the function TotalGameTime is this:
pawn Код:
TotalGameTime(playerid, &h=0, &m=0, &s=0)
{
PlayerInfo[playerid][TotalTime] = ( (gettime() - PlayerInfo[playerid][ConnectTime]) + (PlayerInfo[playerid][hours]*60*60) + (PlayerInfo[playerid][mins]*60) + (PlayerInfo[playerid][secs]) );
h = floatround(PlayerInfo[playerid][TotalTime] / 3600, floatround_floor);
m = floatround(PlayerInfo[playerid][TotalTime] / 60, floatround_floor) % 60;
s = floatround(PlayerInfo[playerid][TotalTime] % 60, floatround_floor);
return PlayerInfo[playerid][TotalTime];
}
I not edited at this function anything, is just basic of the Ladmin ^^