|
Post by ThanatoS on May 22, 2018 17:56:45 GMT
else if ( cmd == "stats" || cmd == "stat" )
{
if ( Checar( player, null ) ) return 0;
else if ( !text ) GetStats( player );
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) E_MSG( "Jogador Desconhecido.", player );
else if ( Checar( player, plr ) ) return 0;
else if ( plr.ID == player.ID ) GetStats( player );
else GetStats( plr );
}
}
Fuctions
function GetStats( player )
{
local kills = status[ player.ID ].Matou, deaths = status[ player.ID ].Morreu, ratio;
if ( kills >= 1 && deaths >= 1 ) ratio = format( "%.2f", kills.tofloat() / deaths.tofloat() );
else ratio = 0;
Message( "[#00BFFF]* Status de[#FFFFFF] " + player.Name + "[#00BFFF]: Matou:[#FFFFFF] " + kills + "[#00BFFF] | Morreu:[#FFFFFF] " + deaths + "[#00BFFF] | Ratio:[#FFFFFF] " + ratio + "[#00BFFF]." );
EchoMessage( "12* Status de4 " + player.Name + "12: Matou:4 " + kills + "12 | Morreu:4 " + deaths + "12 | Ratio:4 " + ratio + "12." );
}
Main
class PlayerStats
{
Registrado = false;
Logado = false;
Nogoto = false;
SpawnLoc = false;
Count_Msg = 0;
Msg_Player = 0;
Loc = null;
Level = 0;
Dinheiro = 0;
Banco = 0;
Matou = 0;
Morreu = 0;
Warn_Login = 0;
}
My language is portugues change!
|
|