mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-11-22 10:12:20 +00:00
[.NET] Added Account, Audio, Ban, Explosion, Fire, Game, Object, RadarArea, Water and World classes.
Removed Native static classes.
This commit is contained in:
parent
36daf9dd68
commit
34f4eebb14
@ -1,14 +1,51 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
public class Account : Element
|
public class Account : Element
|
||||||
{
|
{
|
||||||
public Account()
|
internal Account()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Account Add( string name, string password );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Account Get( string name, string password );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Account[] GetBySerial( string serial );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Account[] GetAll();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public Player GetPlayer();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool IsGuest();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public object GetData( string key );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public object[] GetAllData();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetSerial();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool Remove();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetPassword( string password );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetData( string key, object argument );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool CopyData( Account fromAccount );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
MultiTheftAuto/Audio.cs
Normal file
14
MultiTheftAuto/Audio.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace MultiTheftAuto
|
||||||
|
{
|
||||||
|
public class Audio
|
||||||
|
{
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public static bool PlayFrontEnd( Player player, byte sound );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public static bool PlayMission( Player player, Vector3 position, ushort slot );
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
@ -11,5 +8,50 @@ namespace MultiTheftAuto
|
|||||||
internal Ban()
|
internal Ban()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Ban Add( string ip, string username, string serial, Element responsible, string responsibleName, string reason, int unban );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool Remove( Ban ban, Element responsible );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public Ban[] GetAll();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
static extern public bool Reload();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetIP();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetSerial();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetUsername();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetNick();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetReason();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public string GetAdmin();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public int GetBanTime();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public int GetUnbanTime();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetUnbanTime( int time );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetReason( string msReason );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetAdmin( string msAdminName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
|
@ -4,114 +4,49 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
public string Name;
|
|
||||||
public Element AttachedTo;
|
|
||||||
public bool Propagated;
|
|
||||||
public string Priority;
|
|
||||||
|
|
||||||
public Event( string name )
|
|
||||||
: this( name, null )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Event( string name, Element attachedTo, bool propagated = true, string priority = "normal" )
|
|
||||||
{
|
|
||||||
this.Name = name;
|
|
||||||
this.AttachedTo = attachedTo;
|
|
||||||
this.Propagated = propagated;
|
|
||||||
this.Priority = priority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Add()
|
|
||||||
{
|
|
||||||
return Event.AddHandler( this.Name, this.AttachedTo, this._OnTrigger, this.Propagated, this.Priority );
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Remove()
|
|
||||||
{
|
|
||||||
return Event.RemoveHandler( this.Name, this.AttachedTo, this._OnTrigger );
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Call( params object[] arguments )
|
|
||||||
{
|
|
||||||
return Native.Event.Trigger( this.Name, this.AttachedTo.GetUserData(), arguments );
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CallClient( Element baseElement = null, params object[] arguments )
|
|
||||||
{
|
|
||||||
return Native.Event.TriggerClient( baseElement != null ? baseElement.GetUserData() : Element.Root.GetUserData(), this.Name, this.AttachedTo.GetUserData(), arguments );
|
|
||||||
}
|
|
||||||
|
|
||||||
public delegate void CustomEventHandler( Element sender, ElementEventArgs e, params object[] args );
|
|
||||||
|
|
||||||
private CustomEventHandler _OnTrigger;
|
|
||||||
|
|
||||||
public event CustomEventHandler OnTrigger
|
|
||||||
{
|
|
||||||
add
|
|
||||||
{
|
|
||||||
lock( this )
|
|
||||||
{
|
|
||||||
bool isNull = this._OnTrigger == null;
|
|
||||||
|
|
||||||
this._OnTrigger += value;
|
|
||||||
|
|
||||||
if( isNull )
|
|
||||||
{
|
|
||||||
this.Add();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
remove
|
|
||||||
{
|
|
||||||
lock( this )
|
|
||||||
{
|
|
||||||
this._OnTrigger -= value;
|
|
||||||
|
|
||||||
if( this._OnTrigger == null )
|
|
||||||
{
|
|
||||||
this.Remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Static methods
|
#region Static methods
|
||||||
|
|
||||||
public static bool Add( string name, bool allowRemoteTrigger )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool Add( string name, bool allowRemoteTrigger );
|
||||||
return Native.Event.Add( name, allowRemoteTrigger );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool AddHandler( string eventName, Element attachedTo, Delegate handlerFunction, bool getPropagated = true, string priority = "normal" )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool AddHandler( string eventName, Element attachedTo, Delegate handlerFunction, bool getPropagated = true, string priority = "normal" );
|
||||||
return Native.Event.AddHandler( eventName, attachedTo.GetUserData(), handlerFunction, getPropagated, priority );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool RemoveHandler( string eventName, Element attachedTo, Delegate handlerFunction )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool RemoveHandler( string eventName, Element attachedTo, Delegate handlerFunction );
|
||||||
return Native.Event.RemoveHandler( eventName, attachedTo.GetUserData(), handlerFunction );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool Trigger( string eventName, Element baseElement, params object[] arguments )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool Trigger( string eventName, Element baseElement, params object[] arguments );
|
||||||
return Native.Event.Trigger( eventName, baseElement.GetUserData(), arguments );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool TriggerClient( Element sendTo, string name, Element sourceElement, params object[] arguments )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool TriggerClient( Element sendTo, string name, Element sourceElement, params object[] arguments );
|
||||||
return Native.Event.TriggerClient( sendTo.GetUserData(), name, sourceElement.GetUserData(), arguments );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool Cancel( bool cancel = true, string reason = "" )
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
{
|
public static extern bool Cancel( bool cancel = true, string reason = "" );
|
||||||
return Native.Event.Cancel( cancel, reason );
|
|
||||||
}
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern string GetCancelReason();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool WasCancelled();
|
||||||
|
|
||||||
|
// [MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
// public static extern int TriggerLatentClient( Element sendTo, string name, int bandwidth, bool persist, Element theElement, params object[] arguments );
|
||||||
|
|
||||||
|
// [MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
// public static extern int GetLatentHandles( Player player );
|
||||||
|
|
||||||
|
// [MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
// public static extern int GetLatentStatus( Player player, int handle );
|
||||||
|
|
||||||
|
// [MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
// public static extern int CancelLatent( Player player, int handle );
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
public class Explosion
|
public class Explosion
|
||||||
{
|
{
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
public static extern bool Create( Vector3 position, int theType, UInt32 creator = 0 );
|
public static extern bool Create( Vector3 position, int theType, Element creator = null );
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
public class Fire
|
public class Fire
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
public static class Game
|
public static class Game
|
||||||
{
|
{
|
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
@ -9,11 +10,46 @@ namespace MultiTheftAuto
|
|||||||
{
|
{
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public Marker()
|
internal Marker()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Marker( Vector3 position, string type = "checkpoint", float size = 4.0f, Color color = null, Element visibleTo = null );
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern int GetCount();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern string GetMarkerType();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern float GetSize();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Color GetColor();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Vector3 GetTarget();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern string GetIcon();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetType( string type );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetSize( float size );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetColor( Color color );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetTarget( Vector3 position );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetIcon( string icon );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Account.cs" />
|
<Compile Include="Account.cs" />
|
||||||
|
<Compile Include="Audio.cs" />
|
||||||
<Compile Include="Ban.cs" />
|
<Compile Include="Ban.cs" />
|
||||||
<Compile Include="Blip.cs" />
|
<Compile Include="Blip.cs" />
|
||||||
<Compile Include="Blowfish.cs" />
|
<Compile Include="Blowfish.cs" />
|
||||||
@ -104,26 +105,14 @@
|
|||||||
<Compile Include="EventArgs\VehicleStartEnterEventArgs.cs" />
|
<Compile Include="EventArgs\VehicleStartEnterEventArgs.cs" />
|
||||||
<Compile Include="HeatHazeSettings.cs" />
|
<Compile Include="HeatHazeSettings.cs" />
|
||||||
<Compile Include="Marker.cs" />
|
<Compile Include="Marker.cs" />
|
||||||
<Compile Include="Native\Account.cs" />
|
|
||||||
<Compile Include="Native\Blip.cs" />
|
|
||||||
<Compile Include="Native\ColShape.cs" />
|
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
<Compile Include="Debug.cs" />
|
<Compile Include="Debug.cs" />
|
||||||
<Compile Include="Native\Element.cs" />
|
<Compile Include="Explosion.cs" />
|
||||||
<Compile Include="Native\Event.cs" />
|
<Compile Include="Fire.cs" />
|
||||||
<Compile Include="Native\Explosion.cs" />
|
<Compile Include="Game.cs" />
|
||||||
<Compile Include="Native\Fire.cs" />
|
<Compile Include="Object.cs" />
|
||||||
<Compile Include="Native\Game.cs" />
|
<Compile Include="RadarArea.cs" />
|
||||||
<Compile Include="Native\Marker.cs" />
|
<Compile Include="Water.cs" />
|
||||||
<Compile Include="Native\Object.cs" />
|
|
||||||
<Compile Include="Native\Ped.cs" />
|
|
||||||
<Compile Include="Native\Player.cs" />
|
|
||||||
<Compile Include="Native\RadarArea.cs" />
|
|
||||||
<Compile Include="Native\Resource.cs" />
|
|
||||||
<Compile Include="Native\Server.cs" />
|
|
||||||
<Compile Include="Native\Team.cs" />
|
|
||||||
<Compile Include="Native\Vehicle.cs" />
|
|
||||||
<Compile Include="Native\Water.cs" />
|
|
||||||
<Compile Include="Ped.cs" />
|
<Compile Include="Ped.cs" />
|
||||||
<Compile Include="Pickup.cs" />
|
<Compile Include="Pickup.cs" />
|
||||||
<Compile Include="Player.cs" />
|
<Compile Include="Player.cs" />
|
||||||
@ -140,6 +129,7 @@
|
|||||||
<Compile Include="VehicleColor.cs" />
|
<Compile Include="VehicleColor.cs" />
|
||||||
<Compile Include="VehicleWheelsState.cs" />
|
<Compile Include="VehicleWheelsState.cs" />
|
||||||
<Compile Include="Weapon.cs" />
|
<Compile Include="Weapon.cs" />
|
||||||
|
<Compile Include="World.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Account
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
internal class Blip
|
|
||||||
{
|
|
||||||
// Blip create/destroy functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( Vector3 position, int icon = 0, int size = 2, Color color = null, int ordering = 0, float visibleDistance = 99999.0f, UInt32 visibleTo = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateAttachedTo( UInt32 element, int icon = 0, int size = 2, Color color = null, int ordering = 0, float visibleDistance = 99999.0f, UInt32 visibleTo = 0 );
|
|
||||||
|
|
||||||
// Blip get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetIcon( UInt32 blip );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetSize( UInt32 blip );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetColor( UInt32 blip );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetOrdering( UInt32 blip );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetVisibleDistance( UInt32 blip );
|
|
||||||
|
|
||||||
// Blip set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetIcon( UInt32 blip, int icon );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSize( UInt32 blip, int size );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 blip, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetOrdering( UInt32 blip, int ordering );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetVisibleDistance( UInt32 blip, float distance );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class ColShape
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateCircle( float fX, float fY, float radius );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateCuboid( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateSphere( float fX, float fY, float fZ, float fRadius );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateRectangle( float fX, float fY, float fWidth, float fHeight );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreatePolygon( float fX, float fY, float fX1, float fY1, float fX2, float fY2, float fX3, float fY3, float[] args );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 CreateTube( float fX, float fY, float fZ, float fRadius, float fHeight );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,188 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public static class Element
|
|
||||||
{
|
|
||||||
// Element create/destroy
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( string type, string ID );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Destroy( UInt32 userdata );
|
|
||||||
|
|
||||||
// Element get funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetRootElement();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsElement( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetType( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetID( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Clone( UInt32 userdata, Vector3 position = null, bool cloneChildren = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetByType( string elementType, UInt32 startElement = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetByID( string elementID, int index = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetByIndex( string type, int index );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetChild( UInt32 parent, int index );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetChildrenCount( UInt32 parent );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetData( UInt32 userdata, string key, bool inherit = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Array GetAllData( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetParent( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetPosition( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetRotation( UInt32 userdata, string order = "default" );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetVelocity( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetInterior( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsWithinColShape( UInt32 userdata, UInt32 colshape );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsWithinMarker( UInt32 userdata, UInt32 marker );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetDimension( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetZoneName( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsAttached( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetAttachedTo( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetColShape( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetAlpha( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsDoubleSided( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetHealth( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetModel( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsInWater( UInt32 userdata );
|
|
||||||
|
|
||||||
// [MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
// public static extern bool GetElementAttachedOffsets( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetSyncer( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetCollisionsEnabled( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsFrozen( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetLowLODElement( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsElementLowLOD( UInt32 userdata );
|
|
||||||
|
|
||||||
// Element set funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ClearElementVisibleTo( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetID( UInt32 userdata, string ID );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetData( UInt32 userdata, string key, string value, bool sync = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveData( UInt32 userdata, string key );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetParent( UInt32 userdata, UInt32 parent );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPosition( UInt32 userdata, Vector3 position, bool warp = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetRotation( UInt32 userdata, Vector3 rotation, string order = "default", bool pedRotation = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetVelocity( UInt32 userdata, Vector3 velocity );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetVisibleTo( UInt32 userdata, UInt32 target, bool visible );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetInterior( UInt32 userdata, int interior, Vector3 position = null );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDimension( UInt32 userdata, int dimension );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Attach( UInt32 userdata, UInt32 target, Vector3 offsetPosition = null, Vector3 offsetRotation = null );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Detach( UInt32 userdata, UInt32 target = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetAlpha( UInt32 userdata, int alpha );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDoubleSided( UInt32 userdata, bool doubleSided );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetHealth( UInt32 userdata, float health );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetModel( UInt32 userdata, int model );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetAttachedOffsets( UInt32 userdata, Vector3 offsetPosition = null, Vector3 offsetRotation = null );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSyncer( UInt32 userdata, UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetCollisionsEnabled( UInt32 userdata, bool enabled );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetFrozen( UInt32 userdata, bool frozen );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLowLODElement( UInt32 userdata, UInt32 lowLod );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
internal static class Event
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Add( string name, bool allowRemoteTrigger );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AddHandler( string eventName, UInt32 attachedTo, Delegate handlerFunction, bool getPropagated = true, string priority = "normal" );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveHandler( string eventName, UInt32 attachedTo, Delegate handlerFunction );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Trigger( string eventName, UInt32 baseElement, params object[] arguments );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool TriggerClient( UInt32 sendTo, string name, UInt32 sourceElement, params object[] arguments );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Cancel( bool cancel = true, string reason = "" );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetCancelReason();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool WasCancelled();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int TriggerLatentClient( UInt32 sendTo, string name, int bandwidth, bool persist, UInt32 theElement, params object[] arguments );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetLatentHandles( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetLatentStatus( UInt32 player, int handle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int CancelLatent( UInt32 player, int handle );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Marker
|
|
||||||
{
|
|
||||||
// Marker create/destroy functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( Vector3 position, string type = "checkpoint", float size = 4.0f, Color color = null, UInt32 visibleTo = 0 );
|
|
||||||
|
|
||||||
// Marker get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetCount();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetType( UInt32 marker );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetSize( UInt32 marker );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetColor( UInt32 marker );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetTarget( UInt32 marker );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetIcon( UInt32 marker );
|
|
||||||
|
|
||||||
// Marker set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetType( UInt32 marker, string type );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSize( UInt32 marker, float size );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 marker, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTarget( UInt32 marker, Vector3 position );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetIcon( UInt32 marker, string icon );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Object
|
|
||||||
{
|
|
||||||
// Object create/destroy functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( int modelid, Vector3 position, Vector3 rotation, bool isLowLOD = false );
|
|
||||||
|
|
||||||
// Object get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetScale( UInt32 Object );
|
|
||||||
|
|
||||||
// Object set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetScale( UInt32 Object, float scale );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Move( UInt32 Object, int time, Vector3 target, Vector3 rotation, string easingType, float easingPeriod, float easingAmplitude, float easingOvershoot );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Stop( UInt32 Object );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,148 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Ped
|
|
||||||
{
|
|
||||||
// Ped get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( int modelid, Vector3 position, float rot = 0.0f, bool synced = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetArmor( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsChoking( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsDead( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsDucked( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetStat( UInt32 ped, int stat );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetTarget( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetWeapon( UInt32 ped, int slot = 0 );
|
|
||||||
|
|
||||||
// [MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
// public static extern string string GetPedClothes( UInt32 ped, int clothesType );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool DoesHaveJetPack( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsOnGround( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetFightingStyle( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetPedMoveAnim( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetGravity( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetContactElement( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetWeaponSlot( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsDoingGangDriveby( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsOnFire( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsHeadless( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetOccupiedVehicle( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetOccupiedVehicleSeat( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsInVehicle( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetWeaponProperty( int weaponID, string weaponSkill, string property );
|
|
||||||
// public static extern int GetWeaponProperty( string weaponName, string weaponSkill, string property );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetOriginalWeaponProperty( int weaponID, string weaponSkill, string property );
|
|
||||||
// public static extern int GetOriginalWeaponProperty( string weaponName, string weaponSkill, string property );
|
|
||||||
|
|
||||||
// Player set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetArmor( UInt32 ped, int armor );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Kill( UInt32 ped, UInt32 theKiller = 0, int weapon = 255, int bodyPart = 255, bool stealth = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetStat( UInt32 ped, int stat, float value );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AddClothes( UInt32 ped, string clothesTexture, string clothesModel, int clothesType );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveClothes( UInt32 ped, int clothesType, string clothesTexture, string clothesModel );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GiveJetPack( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveJetPack( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetFightingStyle( UInt32 ped, int style );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPedMoveAnim( UInt32 ped, int anim );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetGravity( UInt32 ped, float gravity );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetChoking( UInt32 ped, bool choking );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool WarpIntoVehicle( UInt32 ped, UInt32 vehicle, int seat = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveFromVehicle( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDoingGangDriveby( UInt32 ped, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetAnimation( UInt32 ped, string block = null, string anim = null, int time = -1, bool loop = true, bool updatePosition = true, bool interruptable = true, bool freezeLastFrame = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetAnimationProgress( UInt32 ped, string anim, float progress );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetWeaponSlot( UInt32 ped, int weaponSlot );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetOnFire( UInt32 ped, bool isOnFire );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetHeadless( UInt32 ped, bool headState );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ReloadWeapon( UInt32 ped );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetWeaponProperty( int weaponID, string weaponSkill, string property, float theValue );
|
|
||||||
// public static extern bool SetWeaponProperty( string weaponName, string weaponSkill, string property, float theValue );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,166 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
internal class Player : Ped
|
|
||||||
{
|
|
||||||
// Player get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetCount();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Array GetAlivePlayers();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Array GetDeadPlayers();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetAmmoInClip( UInt32 ped, int weaponSlot = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetTotalAmmo( UInt32 ped, int weaponSlot = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetWeaponAmmo( UInt32 player, int weapon, int totalAmmo, int ammoInClip = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetFromName( string name );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetMoney( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetPing( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetRandom();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsMuted( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetTeam( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetWantedLevel( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetIdleTime( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsMapForced( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetNametagText( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetNametagColor( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsNametagShowing( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetSerial( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetUserName( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetBlurLevel( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetName( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetIP( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetAccount( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetVersion( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Object GetACInfo( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string SetPlayerAnnounceValue( UInt32 element, string key, string value );
|
|
||||||
|
|
||||||
// Player set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetMoney( UInt32 player, int money );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GiveMoney( UInt32 player, int money );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool TakeMoney( UInt32 player, int money );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Spawn( UInt32 player, Vector3 position, int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, UInt32 theTeam = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ShowHudComponent( UInt32 player, string component, bool show );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetWantedLevel( UInt32 player, int level );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ForceMap( UInt32 player, bool forcedOn );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetNametagText( UInt32 player, string text );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetNametagColor( UInt32 player, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetNametagShowing( UInt32 player, bool showed );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetMuted( UInt32 player, bool muted );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetBlurLevel( UInt32 player, int level );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Redirect( UInt32 player, string serverIP, int serverPort, string serverPassword = null );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetName( UInt32 player, string name );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool DetonateSatchels( UInt32 player );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool TakeScreenShot( UInt32 player, int width, int height, string tag = "", int quality = 30, int maxBandwith = 5000 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTeam( UInt32 player, UInt32 team );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetPlayerAnnounceValue( UInt32 element, string key );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern CameraMatrix GetCameraMatrix( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetCameraTarget( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt16 GetCameraInterior( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetCameraMatrix( UInt32 userdata, CameraMatrix pCameraMatrix );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetCameraTarget( UInt32 userdata, UInt32 pTarget );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetCameraInterior( UInt32 userdata, UInt16 ucInterior );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool FadeCamera( UInt32 userdata, bool bFadeIn, float fFadeTime, Color pColor );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class RadarArea
|
|
||||||
{
|
|
||||||
// Radar area create/destroy funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( float leftX, float bottomY, float sizeX, float sizeY, Color color = null, UInt32 visibleTo = 0 );
|
|
||||||
|
|
||||||
// Radar area get funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetSize( UInt32 radarArea );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetColor( UInt32 radarArea );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsFlashing( UInt32 radarArea );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsInside( UInt32 radarArea, float leftX, float bottomY );
|
|
||||||
|
|
||||||
// Radar area set funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSize( UInt32 radarArea, float sizeX, float sizeY );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 radarArea, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetFlashing( UInt32 radarArea, bool enabled );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,83 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Resource
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( string resourceName, string organizationalDir );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Copy( UInt32 resource, string newResourceName, string organizationalDir );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetRootElement( UInt32 resource = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetMapRootElement( UInt32 resource, string map );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetDynamicElementRoot( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveFile( UInt32 resource, string filename );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetFromName( string resourceName );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetInfo( UInt32 resource, string attribute );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern uint GetLastStartTime( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetLoadFailureReason( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern uint GetLoadTime( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetName( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetResources();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetState( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetCurrent();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Refresh( bool refreshAll = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveDefaultSetting( UInt32 resource, string settingName );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Start( UInt32 resource, bool persistent = false, bool startIncludedResources = true, bool loadServerConfigs = true, bool loadMaps = true, bool loadServerScripts = true, bool loadHTML = true, bool loadClientConfigs = true, bool loadClientScripts = true, bool loadFiles = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Restart( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Stop( UInt32 resource );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDefaultSetting( UInt32 resource, string settingName, string settingValue );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetInfo( UInt32 resource, string attribute, string value );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Rename( string resourceName, string newResourceName, string organizationalPath );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Delete( string resourceName );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool UpdateACLRequest( UInt32 resource, string rightName, bool bAccess, string byWho );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
internal class Server
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern uint GetMaxPlayers();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetMaxPlayers( uint maxPlayers );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool OutputChatBox( string text, UInt32 element, Color color, bool colorCoded );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool OutputConsole( string text, UInt32 element );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool OutputServerLog( string text );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPassword( string password, bool bSave );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern ServerVersion GetVersion();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AddCommandHandler( string name, Delegate handler, bool restricted = false, bool caseSensitive = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ExecuteCommandHandler( string name, UInt32 player, string args );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveCommandHandler( string name, Delegate handler );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Team
|
|
||||||
{
|
|
||||||
// Team get funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( string name, Color color = null );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetFromName( string name );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetName( UInt32 team );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetColor( UInt32 team );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetFriendlyFire( UInt32 team );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetPlayers( UInt32 team );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int CountPlayers( UInt32 team );
|
|
||||||
|
|
||||||
// Team set funcs
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetName( UInt32 team, string name );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 team, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetFriendlyFire( UInt32 team, bool enabled );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,274 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
internal class Vehicle
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( int model, Vector3 position, Vector3 rotation, string numberplate = null, bool direction = false, int variant1 = 255, int variant2 = 255 );
|
|
||||||
|
|
||||||
#region Vehicle get functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetType( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern char[] GetVariant( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern VehicleColor GetColor( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetModelFromName( string name );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetLandingGearDown( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetMaxPassengers( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetName( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetNameFromModel( int modelID );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetOccupant( UInt32 vehicle, int seat = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetOccupants( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetController( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetSirensOn( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetTurnVelocity( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetTurretPosition( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsLocked( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetOfType( int model );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetUpgradeOnSlot( UInt32 vehicle, int slot );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetUpgrades( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetUpgradeSlotName( int upgradeOrSlot );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32[] GetCompatibleUpgrades( UInt32 vehicle, int slot = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetDoorState( UInt32 vehicle, int door );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern VehicleWheelsState GetWheelStates( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetLightState( UInt32 vehicle, int light );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetPanelState( UInt32 vehicle, int panel );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetOverrideLights( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetTowedByVehicle( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 GetTowingVehicle( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern int GetPaintjob( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern string GetPlateText( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsDamageProof( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsFuelTankExplodable( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsOnGround( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetEngineState( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsTrainDerailed( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsTrainDerailable( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool GetTrainDirection( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetTrainSpeed( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsBlown( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetHeadLightColor( UInt32 vehicle );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern float GetVehicleDoorOpenRatio( UInt32 vehicle, int door );
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Vehicle set functions
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Fix( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Blow( UInt32 userdata, bool explode );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTurnVelocity( UInt32 userdata, Vector3 velocity );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 userdata, Color color1, Color color2, Color color3, Color color4 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLandingGearDown( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLocked( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetModel( UInt32 userdata, int model );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDoorsUndamageable( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSirensOn( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTaxiLightOn( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool IsTaxiLightOn( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AddUpgrade( UInt32 userdata, int upgrade );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveUpgrade( UInt32 userdata, int upgrade );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDoorState( UInt32 userdata, int door, int state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetWheelStates( UInt32 userdata, int frontLeft, int rearLeft = -1, int frontRight = -1, int rearRight = -1 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLightState( UInt32 userdata, int light, int state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPanelState( UInt32 userdata, int panelID, int state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetIdleRespawnDelay( UInt32 userdata, int timeDelay );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetRespawnDelay( UInt32 userdata, int timeDelay );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetRespawnPosition( UInt32 userdata, Vector3 position, Vector3 rotation );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ToggleRespawn( UInt32 userdata, bool respawn );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ResetExplosionTime( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ResetIdleTime( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Spawn( UInt32 userdata, Vector3 position, Vector3 rotation );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool Respawn( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetOverrideLights( UInt32 userdata, int state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AttachTrailerToVehicle( UInt32 userdata, UInt32 trailer );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool DetachTrailerFromVehicle( UInt32 userdata, UInt32 trailer = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetEngineState( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDamageProof( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPaintjob( UInt32 userdata, int value );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetFuelTankExplodable( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTrainDerailed( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTrainDerailable( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTrainDirection( UInt32 userdata, bool state );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTrainSpeed( UInt32 userdata, float speed );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetHeadLightColor( UInt32 userdata, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetTurretPosition( UInt32 userdata, float x, float y );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetDoorOpenRatio( UInt32 userdata, int door, float ratio, int time = 0 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetVariant( UInt32 userdata, int variant1 = 255, int variant2 = 255 );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool AddSirens( UInt32 userdata, int sirenCount, int sirenType, bool flag360 = false, bool checkLos = true, bool useRandomiser = true, bool silent = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool RemoveSirens( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetSirens( UInt32 userdata, int sirenPoint, Vector3 position, Color color = null, float minAlpha = 0.0f );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Array GetSirens( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Object GetSirenParams( UInt32 userdata );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetPlateText( UInt32 userdata, string numberplate );
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto.Native
|
|
||||||
{
|
|
||||||
public class Water
|
|
||||||
{
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern UInt32 Create( Vector3 position1, Vector3 position2, Vector3 position3, Vector3 position4 = null, bool bShallow = false );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLevel( float level, bool includeWaterFeatures = true, bool includeWaterElements = true );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetLevel( UInt32 water, float level );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ResetLevel();
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Vector3 GetVertexPosition( UInt32 water, int vertex );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetVertexPosition( UInt32 water, Vector3 position );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern Color GetColor( UInt32 water );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool SetColor( UInt32 water, Color color );
|
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
||||||
public static extern bool ResetColor();
|
|
||||||
}
|
|
||||||
}
|
|
27
MultiTheftAuto/Object.cs
Normal file
27
MultiTheftAuto/Object.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace MultiTheftAuto
|
||||||
|
{
|
||||||
|
public class Object : Element
|
||||||
|
{
|
||||||
|
internal Object()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Object( int modelid, Vector3 position, Vector3 rotation, bool isLowLOD = false );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern float GetScale();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetScale( float scale );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool Move( int time, Vector3 target, Vector3 rotation, string easingType, float easingPeriod, float easingAmplitude, float easingOvershoot );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool Stop();
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +1,50 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
|
public enum PickupType
|
||||||
|
{
|
||||||
|
Health,
|
||||||
|
Armour,
|
||||||
|
Weapon,
|
||||||
|
Custom,
|
||||||
|
}
|
||||||
|
|
||||||
public class Pickup : Element
|
public class Pickup : Element
|
||||||
{
|
{
|
||||||
public Pickup()
|
internal Pickup()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public Pickup( Vector3 position, PickupType type, double value, ulong ulRespawnInterval, int ammo );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public PickupType GetPickupType();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public int GetWeapon();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public float GetAmount();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public ushort GetAmmo();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public ulong GetRespawnInterval();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool IsSpawned();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetType( PickupType type, double value, double ammo );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool SetRespawnInterval( ulong interval );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
extern public bool Use( Element player );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
MultiTheftAuto/RadarArea.cs
Normal file
36
MultiTheftAuto/RadarArea.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace MultiTheftAuto
|
||||||
|
{
|
||||||
|
public class RadarArea : Element
|
||||||
|
{
|
||||||
|
internal RadarArea()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern RadarArea( float leftX, float bottomY, float sizeX, float sizeY, Color color = null, Element visibleTo = null );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Vector3 GetSize();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Color GetColor();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool IsFlashing();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool IsInside( float leftX, float bottomY );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetSize( float sizeX, float sizeY );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetColor( Color color );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetFlashing( bool enabled );
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MultiTheftAuto.Pools;
|
|
||||||
using MultiTheftAuto.Utils;
|
|
||||||
|
|
||||||
namespace MultiTheftAuto
|
namespace MultiTheftAuto
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,22 @@ namespace MultiTheftAuto
|
|||||||
public static class Server
|
public static class Server
|
||||||
{
|
{
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
public extern static bool OutputChatBox( string text, Element element, Color color, bool colorCoded );
|
public static extern uint GetMaxPlayers();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool SetMaxPlayers( uint maxPlayers );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool OutputChatBox( string text, Element element, Color color, bool colorCoded );
|
||||||
|
|
||||||
|
// [MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
// public static extern bool OutputLog( string text );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool SetPassword( string password, bool bSave );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern ServerVersion GetVersion();
|
||||||
|
|
||||||
[MethodImpl( MethodImplOptions.InternalCall )]
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
public extern static bool AddCommandHandler( string name, CommandHandler handler, bool restricted = false, bool caseSensitive = true );
|
public extern static bool AddCommandHandler( string name, CommandHandler handler, bool restricted = false, bool caseSensitive = true );
|
||||||
|
39
MultiTheftAuto/Water.cs
Normal file
39
MultiTheftAuto/Water.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace MultiTheftAuto
|
||||||
|
{
|
||||||
|
public class Water : Element
|
||||||
|
{
|
||||||
|
internal Water()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Water( Vector3 position1, Vector3 position2, Vector3 position3, Vector3 position4 = null, bool bShallow = false );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool SetLevelWorld( float level, bool includeWaterFeatures = true, bool includeWaterElements = true );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetLevel( float level );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool ResetLevel();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Vector3 GetVertexPosition( int vertex );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetVertexPosition( Vector3 position );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern Color GetColor();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern bool SetColor( Color color );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public static extern bool ResetColor();
|
||||||
|
}
|
||||||
|
}
|
212
MultiTheftAuto/World.cs
Normal file
212
MultiTheftAuto/World.cs
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace MultiTheftAuto
|
||||||
|
{
|
||||||
|
static class World
|
||||||
|
{
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static byte[] GetTime();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static int[] GetWeather();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static string GetZoneName( Vector3 position, bool citiesOnly = false );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetGravity();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetGameSpeed();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetWaveHeight();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static ushort GetFPSLimit();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static ulong GetMinuteDuration();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool IsGarageOpen( byte garageID );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static byte GetTrafficLightState();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool GetTrafficLightsLocked();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetJetpackMaxHeight();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetAircraftMaxVelocity();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool GetInteriorSoundsEnabled();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetRainLevel();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetSunSize();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static Color[] GetSunColor();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static Vector3 GetWindVelocity();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetFarClipDistance();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetFogDistance();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static float GetAircraftMaxHeight();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool GetOcclusionsEnabled();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static int GetMoonSize();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static Color[] GetSkyGradient();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static HeatHazeSettings GetHeatHaze();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool GetJetpackWeaponEnabled( uint weaponType );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool GetCloudsEnabled();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetTime( byte hour, byte minute );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetWeather( byte weather );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetWeatherBlended( byte weather );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetGravity( float gravity );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetGameSpeed( float speed );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetWaveHeight( float height );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetSkyGradient( Color topColor, Color bottomColor );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetSkyGradient();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetHeatHaze( HeatHazeSettings heatHazeSettings );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetHeatHaze();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetFPSLimit( ushort limit, bool save );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetMinuteDuration( ulong duration );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetGarageOpen( byte garageID, bool isOpen );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetGlitchEnabled( string glitchName, bool enabled );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool IsGlitchEnabled( string glitchName );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetJetpackWeaponEnabled( uint weaponType, bool enabled );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetCloudsEnabled( bool enabled );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetTrafficLightState( byte state, bool forced = false );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetTrafficLightsLocked( bool locked );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetJetpackMaxHeight( float maxHeight );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetInteriorSoundsEnabled( bool enable );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetRainLevel( float rainLevel );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetSunSize( float sunSize );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetSunColor( Color coreColor, Color coronaColor );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetWindVelocity( Vector3 velocity );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetFarClipDistance( float farClip );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetFogDistance( float fogDist );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetAircraftMaxHeight( float maxHeight );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetAircraftMaxVelocity( float velocity );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetOcclusionsEnabled( bool enabled );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetRainLevel();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetSunSize();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetSunColor();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetWindVelocity();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetFarClipDistance();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetFogDistance();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool RemoveWorldModel( ushort model, float radius, Vector3 position, byte interior );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool RestoreWorldModel( ushort model, float radius, Vector3 position, byte interior );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool RestoreAllWorldModels();
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool SetMoonSize( int iMoonSize );
|
||||||
|
|
||||||
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
||||||
|
public extern static bool ResetMoonSize();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user