2015-12-12 10:10:23 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
|
|
namespace MultiTheftAuto
|
|
|
|
|
{
|
2015-12-12 19:50:24 +00:00
|
|
|
|
public delegate void CommandHandler( Player player, string command, string[] args );
|
|
|
|
|
|
|
|
|
|
public static class Server
|
2015-12-12 10:10:23 +00:00
|
|
|
|
{
|
|
|
|
|
public static bool OutputChatBox( string text, Element element, Color color, bool colorCoded )
|
|
|
|
|
{
|
|
|
|
|
return Native.Server.OutputChatBox( text, element.userdata, color, colorCoded );
|
|
|
|
|
}
|
2015-12-12 19:50:24 +00:00
|
|
|
|
|
|
|
|
|
public static bool AddCommandHandler( string name, CommandHandler handler, bool restricted = false, bool caseSensitive = true )
|
|
|
|
|
{
|
|
|
|
|
return Native.Server.AddCommandHandler( name, handler, restricted, caseSensitive );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool ExecuteCommandHandler( string name, Player player, string args )
|
|
|
|
|
{
|
|
|
|
|
return Native.Server.ExecuteCommandHandler( name, player.userdata, args );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool RemoveCommandHandler( string name, CommandHandler handler )
|
2015-12-12 10:10:23 +00:00
|
|
|
|
{
|
2015-12-12 19:50:24 +00:00
|
|
|
|
return Native.Server.RemoveCommandHandler( name, handler );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|