This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuelse if ( cmd == "time" )
{
local now = date();
Message( COLOR_MOV+"The time is currently " + now.day + "/" + now.month + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec + "" );
}
if ( cmd == "ghost" )
{
if ( !player.IsSpawned ) PrivMessage( "You haven't spawned yet..", player );
if ( stats[ player.ID ].Level < 4 ) PrivMessage( "You are not a Admin.", player );
else
{
ClientMessageToAll( "" + player + " went into Invisible mode.", 255, 0, 0 );
player.SetAlpha( 0, 0 ); // Makes the player model transparent, The alpha value from 0 to 255,The time in milliseconds the
fading progress should take
player.RemoveMarker();
}
}
function onPlayerPart( player, reason, )
{
if( stats[ player.ID ].Level != 0 )
{
if ( stats[ player.ID ].Team )
{
local plr = GetPlayer( stats[ player.ID ].Teamp );
EMessage( ">>" + player.Name + " left the Team." );
stats[ plr.ID ].Teamp = null;
stats[ player.ID ] = null;
}
stats[ player.ID ].Update( player, sqliteDB );
print( ">> " + player.Name + "'s data saved." );
// Remember to save regularly
SunshineAutos.SaveDatabase("scripts/sunshine.db");
print( ">> " + player.Name + "'s carsdata saved." );
if ( stats[ player.ID ].LMS )
{
EMessage( ">> " + player.Name + " is out of the LMS round." );
LMSCount--;
if ( LMSCount == 1 ) CheckEnd2();
}
}
stats[ player.ID ] = null;
playerson.remove( player.ID );
EchoMessage( "** [" + player.ID + "] " + player.Name + " has left the server." );
}
function GetStats( p )
{
try{
local stats = null;
if ( stats[ p.ID ].IsReg == true )
{
local id = p.ID;
local kills = stats[ id ].Kills, deaths = status[ id ].Deaths;
if ( ( kills > 0 ) && ( deaths > 0 ) )
{
local ratio = format( "%.2f", kills.tofloat() / deaths.tofloat() );
stats = "Kills: " + kills + ", Deaths: " + deaths + ", Ratio: " + ratio + ".";
}
else
{
stats = "Kills: " + stats[id].Kills + ", Deaths: " + stats[id].Deaths + ".";
}
}
else
{
stats = "This Nick-Name is not registered!";
}
return stats;
}
catch(e) print( "GetStats Error: " + e );
}
else if ( cmd == "stats" )
{
try
{
if ( stats[ player.ID ].Logged == false ) ePrivMessage( "[Error] - You're Not Registered.", player );
else
{
if ( !text ) EMessage( ">> " + player.Name + "'s Stats: " + GetStats( player ) );
else if ( text )
{
local plr = GetPlayer( text );
if ( !plr ) ePrivMessage( "Invalid Player Nick/ID!", player );
else PrivMessage( plr.Name + "'s Stats: " + GetStats( plr ), player );
}
}
}
catch(e) print( "Stats Cmd Error: " + e );
}