mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-12-22 08:51:48 +00:00
Добавлен класс Console
This commit is contained in:
parent
5e8456f986
commit
a745ff12ed
51
MultiTheftAuto/Console.cs
Normal file
51
MultiTheftAuto/Console.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MultiTheftAuto
|
||||
{
|
||||
public class Console : Player
|
||||
{
|
||||
public Console( uint userdata ) :
|
||||
base( userdata )
|
||||
{
|
||||
}
|
||||
|
||||
public static bool Output( string text, Element element = null )
|
||||
{
|
||||
return Native.Server.OutputConsole( text, element == null ? Element.Root.userdata : element.userdata );
|
||||
}
|
||||
|
||||
public static int Read()
|
||||
{
|
||||
return System.Console.Read();
|
||||
}
|
||||
|
||||
public static ConsoleKeyInfo ReadKey()
|
||||
{
|
||||
return System.Console.ReadKey();
|
||||
}
|
||||
|
||||
public static ConsoleKeyInfo ReadKey( bool intercept )
|
||||
{
|
||||
return System.Console.ReadKey( intercept );
|
||||
}
|
||||
|
||||
public static string ReadLine()
|
||||
{
|
||||
return System.Console.ReadLine();
|
||||
}
|
||||
|
||||
public static bool Write( string message, params string[] args )
|
||||
{
|
||||
return Native.Server.OutputServerLog( string.Format( message, args ) );
|
||||
}
|
||||
|
||||
public static bool WriteLine( string message, params string[] args )
|
||||
{
|
||||
return Native.Server.OutputServerLog( string.Format( message, args ) );
|
||||
}
|
||||
}
|
||||
}
|
@ -50,6 +50,7 @@
|
||||
<Compile Include="CameraMatrix.cs" />
|
||||
<Compile Include="Color.cs" />
|
||||
<Compile Include="ColShape.cs" />
|
||||
<Compile Include="Console.cs" />
|
||||
<Compile Include="Element.cs" />
|
||||
<Compile Include="Event.cs" />
|
||||
<Compile Include="EventArgs\BanEventArgs.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user