2015-12-12 10:10:23 +00:00
|
|
|
|
using System;
|
2016-01-06 18:06:22 +00:00
|
|
|
|
using System.Runtime.CompilerServices;
|
2015-12-12 10:10:23 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace MultiTheftAuto
|
|
|
|
|
{
|
|
|
|
|
public class Ped : Element
|
|
|
|
|
{
|
|
|
|
|
#region Properties
|
|
|
|
|
|
|
|
|
|
public Vehicle Vehicle
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetVehicle();
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.WarpIntoVehicle( value, 0 );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern Ped( int modelid, Vector3 position, float rot = 0.0f, bool synced = true );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
internal Ped()
|
2015-12-12 10:10:23 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Methods
|
|
|
|
|
|
|
|
|
|
#region Set
|
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetArmor( int armor );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool Kill( Ped killer = null, int weapon = 255, int bodyPart = 255, bool stealth = false );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetStat( int stat, float value );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool AddClothes( string clothesTexture, string clothesModel, int clothesType );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool RemoveClothes( int clothesType, string clothesTexture, string clothesModel );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool GiveJetPack();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool RemoveJetPack();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetFightingStyle( int style );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetPedMoveAnim( int style );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetGravity( float gravity );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetChoking( bool choking );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool WarpIntoVehicle( Vehicle vehicle, int seat = 0 );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool RemoveFromVehicle();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetDoingGangDriveby( bool state );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetAnimation( string block = null, string anim = null, int time = -1, bool loop = true, bool updatePosition = true, bool interruptable = true, bool freezeLastFrame = true );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetAnimationProgress( string anim, float progress );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetWeaponSlot( int weaponSlot );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetOnFire( bool isOnFire );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool SetHeadless( bool headless );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool ReloadWeapon();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Get
|
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern float GetArmor();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern float GetStat( int stat );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern Element GetTarget();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern int GetWeapon( int slot = 0 );
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern int GetFightingStyle();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern int GetPedMoveAnim();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern float GetGravity();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern Element GetContactElement();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern int GetWeaponSlot();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern Vehicle GetVehicle();
|
|
|
|
|
|
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern int GetVehicleSeat();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Is
|
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsChoking();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsDead();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsDucked();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsHaveJetPack();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsOnGround();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsDoingGangDriveby();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsOnFire();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsHeadless();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
2016-01-06 18:06:22 +00:00
|
|
|
|
[MethodImpl( MethodImplOptions.InternalCall )]
|
|
|
|
|
public extern bool IsInVehicle();
|
2015-12-12 10:10:23 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|