Show / Hide Table of Contents

Class Ped

Represents a pedestrian

Inheritance
Object
Element
PhysicalElement
SharedPed
Ped
Player
Inherited Members
SharedPed.WeaponSlot
SharedPed.Armor
SharedPed.ContactElement
SharedPed.FightingStyle
SharedPed.OccupiedVehicle
SharedPed.VehicleSeat
SharedPed.Chocking
SharedPed.IsDead
SharedPed.DoingGangDriveby
SharedPed.IsDucked
SharedPed.Headless
SharedPed.IsInVehicle
SharedPed.OnFire
SharedPed.IsOnGround
SharedPed.HasJetpack
SharedPed.Target
SharedPed.WalkingStyle
SharedPed.Weapon
SharedPed.AmmoInClip
SharedPed.TotalAmmo
SharedPed.IsClothesSlotTattoo(ClothesSlot)
SharedPed.AddClothes(ClothesTexture, ClothesModel, ClothesSlot)
SharedPed.AddClothes(ClothesSlot, Int32)
SharedPed.AddClothes(ClothesTexture, ClothesModel)
SharedPed.GetClothesModel(ClothesSlot)
SharedPed.GetClothesTexture(ClothesSlot)
SharedPed.RemoveClothes(ClothesSlot)
SharedPed.GetWeaponInSlot(WeaponSlot)
SharedPed.GetAmmoInClip(WeaponSlot)
SharedPed.GetTotalAmmo(WeaponSlot)
SharedPed.SetAnimation(Animation, Boolean, Int32, Boolean, Boolean, Boolean, Int32, Boolean)
SharedPed.ResetAnimation()
SharedPed.SetAnimationProgress(Animation, Single)
SharedPed.SetAnimationSpeed(Animation, Single)
SharedPed.GedStat(PedStat)
SharedPed.SetStat(PedStat, Single)
SharedPed.Kill(SharedPed, SharedWeaponModel, BodyPart, Boolean)
SharedPed.Kill(SharedPed)
SharedPed.Kill()
SharedPed.RemoveFromVehicle()
SharedPed.WarpIntoVehicle(SharedVehicle, Seat)
SharedPed.WarpIntoVehicle(SharedVehicle)
SharedPed.FaceElement(PhysicalElement)
SharedPed.IsValidSkin(Int32)
PhysicalElement.Dimension
PhysicalElement.Interior
PhysicalElement.Frozen
PhysicalElement.Alpha
PhysicalElement.Health
PhysicalElement.Model
PhysicalElement.CollisionShape
PhysicalElement.CollisionsEnabled
PhysicalElement.LowLODElement
PhysicalElement.DoubleSided
PhysicalElement.IsInWater
PhysicalElement.IsLowLOD
PhysicalElement.Position
PhysicalElement.Rotation
PhysicalElement.QuaternionRotation
PhysicalElement.Matrix
PhysicalElement.ForwardVector
PhysicalElement.RightVector
PhysicalElement.UpVector
PhysicalElement.Velocity
PhysicalElement.AngularVelocity
PhysicalElement.AngularQuaternionVelocity
PhysicalElement.ToAttached
PhysicalElement.IsAttached
PhysicalElement.IsWithinCollisionShape(CollisionShape)
PhysicalElement.IsWithinMarker(SharedMarker)
PhysicalElement.AttachTo(PhysicalElement, Matrix4x4)
PhysicalElement.AttachTo(PhysicalElement, Vector3, Vector3)
PhysicalElement.AttachTo(PhysicalElement, Vector3, Quaternion)
PhysicalElement.AttachTo(PhysicalElement)
PhysicalElement.Detach()
PhysicalElement.Offset
PhysicalElement.GetWithinRange(Vector3, Single, String)
PhysicalElement.OnClicked
PhysicalElement.OnModelChange
PhysicalElement.OnStartSync
PhysicalElement.OnStopSync
PhysicalElement.OnStreamIn
PhysicalElement.OnStreamOut
Element.element
Element.Root
Element.MTAElement
Element.Type
Element.ID
Element.Exists
Element.ChildCount
Element.Parent
Element.CallPropagationEnabled
Element.SetData(String, Object, Boolean)
Element.GetData(String, Boolean)
Element.TryGetData(String, Object, Boolean)
Element.GetData<T>(String, Boolean)
Element.TryGetData<T>(String, T, Boolean)
Element.Destroy()
Element.GetChild(Int32)
Element.GetChildren(String)
Element.GetByID(String, Int32)
Element.ListenForEvent(String, Boolean, String)
Element.HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Element.OnDestroy
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.Peds
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.Ped)]
public class Ped : SharedPed

Constructors

| Improve this Doc View Source

Ped(PedModel, Vector3, Single)

Create a new ped

Declaration
public Ped(PedModel model, Vector3 position, float rotation = 0F)
Parameters
Type Name Description
PedModel model
Vector3 position
Single rotation

Properties

| Improve this Doc View Source

Animation

Get and set the current ped animation

Declaration
public Animation Animation { get; set; }
Property Value
Type Description
Animation
| Improve this Doc View Source

CameraRotation

Get and set the camera rotation of the ped

Declaration
public float CameraRotation { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

CanBeKnockedOffBike

Get and set if the ped can fall off bikes

Declaration
public bool CanBeKnockedOffBike { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

FootBloodEnabled

Set the footblood state of this ped

Declaration
public bool FootBloodEnabled { set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsReloadingWeapon

Get if the ped is reload their weapon

Declaration
public bool IsReloadingWeapon { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

MoveState

Get the movestate of this ped

Declaration
public MoveState MoveState { get; }
Property Value
Type Description
MoveState
| Improve this Doc View Source

OxygenLevel

Get and set the oxygen level a ped has when under water

Declaration
public float OxygenLevel { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

PedVoice

Get and set the voice of this ped

Declaration
public PedVoice PedVoice { get; set; }
Property Value
Type Description
PedVoice
| Improve this Doc View Source

SimplestTask

This function is used to get the name of this ped's current simplest task.

Declaration
public PedTask SimplestTask { get; }
Property Value
Type Description
PedTask
| Improve this Doc View Source

TargetCollision

This function allows retrieval of where a ped's target is blocked. It will only be blocked if there is an obstacle within a ped's target range.

Declaration
public Vector3 TargetCollision { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

TargetEnd

This function allows retrieval of the position where a ped's target range ends, when he is aiming with a weapon.

Declaration
public Vector3 TargetEnd { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

TargetStart

This function allows retrieval of the position a ped's target range begins, when he is aiming with a weapon.

Declaration
public Vector3 TargetStart { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

WeaponMuzzlePosition

Returns the world position of the muzzle of the weapon that a ped is currently carrying. The weapon muzzle is the end of the gun barrel where the bullets/rockets/... come out.

Declaration
public Vector3 WeaponMuzzlePosition { get; }
Property Value
Type Description
Vector3

Methods

| Improve this Doc View Source

AimAt(PhysicalElement)

Set the ped to target a specific physical element

Declaration
public bool AimAt(PhysicalElement targetElement)
Parameters
Type Name Description
PhysicalElement targetElement
Returns
Type Description
Boolean
| Improve this Doc View Source

AimAt(Vector3)

Set the ped aiming at a certain position

Declaration
public bool AimAt(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
Boolean
| Improve this Doc View Source

GetAnalogControlState(AnalogControl)

Retrieve the analog control state of a certain control

Declaration
public float GetAnalogControlState(AnalogControl control)
Parameters
Type Name Description
AnalogControl control
Returns
Type Description
Single
| Improve this Doc View Source

GetBonePosition(Bone)

Returns the 3D world coordinates of a specific bone of this ped

Declaration
public Vector3 GetBonePosition(Bone bone)
Parameters
Type Name Description
Bone bone
Returns
Type Description
Vector3
| Improve this Doc View Source

GetControlState(AnalogControl)

Checks wheter a ped has a certain control pressed

Declaration
public bool GetControlState(AnalogControl control)
Parameters
Type Name Description
AnalogControl control
Returns
Type Description
Boolean
| Improve this Doc View Source

GiveWeapon(SharedWeaponModel, Int32, Boolean)

Gives a weapon to this ped

Declaration
public bool GiveWeapon(SharedWeaponModel weapon, int ammo = 30, bool setAsCurrent = false)
Parameters
Type Name Description
SharedWeaponModel weapon
Int32 ammo
Boolean setAsCurrent
Returns
Type Description
Boolean
| Improve this Doc View Source

IsDoingTask(PedTask)

Check if this ped is doing a certain task

Declaration
public bool IsDoingTask(PedTask task)
Parameters
Type Name Description
PedTask task
Returns
Type Description
Boolean
| Improve this Doc View Source

LookAt(PhysicalElement, Int32, Int32)

Have the ped look at a specific physical element

Declaration
public bool LookAt(PhysicalElement lookAt, int time = 3000, int blend = 1000)
Parameters
Type Name Description
PhysicalElement lookAt
Int32 time
Int32 blend
Returns
Type Description
Boolean
| Improve this Doc View Source

LookAt(Vector3, Int32, Int32)

Have the ped look at a specific position

Declaration
public bool LookAt(Vector3 position, int time = 3000, int blend = 1000)
Parameters
Type Name Description
Vector3 position
Int32 time
Int32 blend
Returns
Type Description
Boolean
| Improve this Doc View Source

SetAnalogControlState(AnalogControl, Single)

Set the analog control state of this ped

Declaration
public bool SetAnalogControlState(AnalogControl control, float state)
Parameters
Type Name Description
AnalogControl control
Single state
Returns
Type Description
Boolean
| Improve this Doc View Source

SetControlState(AnalogControl, Boolean)

Set the control state of a ped

Declaration
public bool SetControlState(AnalogControl control, bool state)
Parameters
Type Name Description
AnalogControl control
Boolean state
Returns
Type Description
Boolean

Events

| Improve this Doc View Source

OnDamage

Declaration
public event Ped.OnDamageHandler OnDamage
Event Type
Type Description
Ped.OnDamageHandler
| Improve this Doc View Source

OnExplosion

Declaration
public event Ped.OnExplosionHandler OnExplosion
Event Type
Type Description
Ped.OnExplosionHandler
| Improve this Doc View Source

OnHeliKilled

Declaration
public event Ped.OnHeliKilledHandler OnHeliKilled
Event Type
Type Description
Ped.OnHeliKilledHandler
| Improve this Doc View Source

OnStep

Declaration
public event Ped.OnStepHandler OnStep
Event Type
Type Description
Ped.OnStepHandler
| Improve this Doc View Source

OnWasted

Declaration
public event Ped.OnWastedHandler OnWasted
Event Type
Type Description
Ped.OnWastedHandler
| Improve this Doc View Source

OnWeaponFire

Declaration
public event Ped.OnWeaponFireHandler OnWeaponFire
Event Type
Type Description
Ped.OnWeaponFireHandler
| Improve this Doc View Source

OnWorldSound

Declaration
public event Ped.OnWorldSoundHandler OnWorldSound
Event Type
Type Description
Ped.OnWorldSoundHandler

Extension Methods

ElementExtensions.GetBoundingBox(PhysicalElement)
ElementExtensions.GetDistanceFromCentreOfMassToBaseOfModel(PhysicalElement)
ElementExtensions.GetRadius(PhysicalElement)
ElementExtensions.SetCollidableWith(PhysicalElement, PhysicalElement, Boolean)
ElementExtensions.IsCollidableWith(PhysicalElement, PhysicalElement)
ElementExtensions.IsLocal(PhysicalElement)
ElementExtensions.IsOnScreen(PhysicalElement)
ElementExtensions.SetStreamable(PhysicalElement, Boolean)
ElementExtensions.IsStreamable(PhysicalElement)
ElementExtensions.IsStreamedIn(PhysicalElement)
ElementExtensions.IsSyncer(PhysicalElement)
ElementExtensions.IsWaitingForGroundToLoad(PhysicalElement)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX