using System;
using System.Text;
namespace SAMP.API
{
public class Util
{
#region Accessors & Mutators
///
/// Gets the uptime of the actual server in milliseconds. (The machine, NOT the SA:MP server.)
///
public static TimeSpan TickCount
{
get
{
return TimeSpan.FromMilliseconds(Core.Natives.GetTickCount());
}
}
#endregion
#region Public Methods
///
/// Outputs a formatted string on the console (the server window, not the in-game chat).
///
/// The format string.
/// Indefinite number of arguments of any tag.
public static void Log(string format, params object[] args)
{
Core.Natives.logprintf(string.Format(format, args));
}
///
/// Get the name of a weapon.
///
/// The Weapon ID you want to know the name of.
/// Returns a System.String representing the name of the weapon.
public static string GetWeaponName(int weaponid)
{
StringBuilder sb = new StringBuilder(50);
Core.Natives.GetWeaponName(weaponid, sb, sb.Capacity);
return sb.ToString();
}
#endregion
};
};