Show / Hide Table of Contents

Class SharedPed

Represents a pedestrian with shared server/client functionality

Inheritance
Object
Element
PhysicalElement
SharedPed
Inherited Members
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.Shared.Peds
Assembly: SlipeShared.dll
Syntax
public class SharedPed : PhysicalElement

Properties

| Improve this Doc View Source

AmmoInClip

Get the ammo in the clip of the current weapon

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

Armor

Get the amount of armor of this ped

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

Chocking

Get if the ped is choking

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

ContactElement

This function detects the element a ped is standing on.

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

DoingGangDriveby

Get and set if the ped is doing a gang driveby

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

FightingStyle

Get the fighting style of the ped

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

HasJetpack

Get if the ped has a jetpack

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

Headless

Get and set if the ped is headless

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

IsDead

Check if the ped is dead

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

IsDucked

Get if the ped is ducked (crouched)

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

IsInVehicle

Get if the ped is in a vehicle

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

IsOnGround

Get if the ped is standing on the ground

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

OccupiedVehicle

This function gets the vehicle that the ped is currently in or is trying to enter, if any.

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

OnFire

Get and set if the ped is on fire

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

Target

Get the element this ped is currently targeting

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

TotalAmmo

Get the total ammo in the current weaponslot

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

VehicleSeat

Get the seat the ped occupies

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

WalkingStyle

Get and set the walking style of this ped

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

Weapon

Get the current weapon

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

WeaponSlot

Get and set the current weaponslot of the ped

Declaration
public WeaponSlot WeaponSlot { get; set; }
Property Value
Type Description
WeaponSlot

Methods

| Improve this Doc View Source

AddClothes(ClothesSlot, Int32)

Add a clothes item from a slot and an index

Declaration
public bool AddClothes(ClothesSlot slot, int index)
Parameters
Type Name Description
ClothesSlot slot
Int32 index
Returns
Type Description
Boolean
| Improve this Doc View Source

AddClothes(ClothesTexture, ClothesModel)

Add clothes from only texture and model (does not work on tattoos)

Declaration
public bool AddClothes(ClothesTexture texture, ClothesModel model)
Parameters
Type Name Description
ClothesTexture texture
ClothesModel model
Returns
Type Description
Boolean
| Improve this Doc View Source

AddClothes(ClothesTexture, ClothesModel, ClothesSlot)

This function is used to set the current clothes on the ped.

Declaration
public bool AddClothes(ClothesTexture texture, ClothesModel model, ClothesSlot slot)
Parameters
Type Name Description
ClothesTexture texture
ClothesModel model
ClothesSlot slot
Returns
Type Description
Boolean
| Improve this Doc View Source

FaceElement(PhysicalElement)

Make this ped face a specific physical element

Declaration
public override void FaceElement(PhysicalElement target)
Parameters
Type Name Description
PhysicalElement target

The element to face

Overrides
PhysicalElement.FaceElement(PhysicalElement)
| Improve this Doc View Source

GedStat(PedStat)

Get the value of a specific stat

Declaration
public float GedStat(PedStat stat)
Parameters
Type Name Description
PedStat stat
Returns
Type Description
Single
| Improve this Doc View Source

GetAmmoInClip(WeaponSlot)

This function returns an integer that contains the ammo a specific weaponslot

Declaration
public int GetAmmoInClip(WeaponSlot slot)
Parameters
Type Name Description
WeaponSlot slot
Returns
Type Description
Int32
| Improve this Doc View Source

GetClothesModel(ClothesSlot)

Get the current clothes model of a slot

Declaration
public ClothesModel GetClothesModel(ClothesSlot slot)
Parameters
Type Name Description
ClothesSlot slot
Returns
Type Description
ClothesModel
| Improve this Doc View Source

GetClothesTexture(ClothesSlot)

Get the current clothes texture of a slot

Declaration
public ClothesTexture GetClothesTexture(ClothesSlot slot)
Parameters
Type Name Description
ClothesSlot slot
Returns
Type Description
ClothesTexture
| Improve this Doc View Source

GetTotalAmmo(WeaponSlot)

This function return the total ammo of a specific weaponslot

Declaration
public int GetTotalAmmo(WeaponSlot slot)
Parameters
Type Name Description
WeaponSlot slot
Returns
Type Description
Int32
| Improve this Doc View Source

GetWeaponInSlot(WeaponSlot)

Get the weapon in a specific slot

Declaration
public SharedWeaponModel GetWeaponInSlot(WeaponSlot slot)
Parameters
Type Name Description
WeaponSlot slot
Returns
Type Description
SharedWeaponModel
| Improve this Doc View Source

IsClothesSlotTattoo(ClothesSlot)

Declaration
protected bool IsClothesSlotTattoo(ClothesSlot slot)
Parameters
Type Name Description
ClothesSlot slot
Returns
Type Description
Boolean
| Improve this Doc View Source

IsValidSkin(Int32)

Get if a skin id is valid

Declaration
public static bool IsValidSkin(int model)
Parameters
Type Name Description
Int32 model
Returns
Type Description
Boolean
| Improve this Doc View Source

Kill()

Kill the ped without a killer

Declaration
public bool Kill()
Returns
Type Description
Boolean
| Improve this Doc View Source

Kill(SharedPed)

Kill the ped, just providing a killer

Declaration
public bool Kill(SharedPed killer)
Parameters
Type Name Description
SharedPed killer
Returns
Type Description
Boolean
| Improve this Doc View Source

Kill(SharedPed, SharedWeaponModel, BodyPart, Boolean)

Kill the ped with a killer, a weapon and a bodypart

Declaration
public bool Kill(SharedPed killer, SharedWeaponModel weapon, BodyPart bodyPart, bool stealth = false)
Parameters
Type Name Description
SharedPed killer
SharedWeaponModel weapon
BodyPart bodyPart
Boolean stealth
Returns
Type Description
Boolean
| Improve this Doc View Source

RemoveClothes(ClothesSlot)

Remove clothes from a certain slot

Declaration
public bool RemoveClothes(ClothesSlot slot)
Parameters
Type Name Description
ClothesSlot slot
Returns
Type Description
Boolean
| Improve this Doc View Source

RemoveFromVehicle()

Ejects the ped from a vehicle

Declaration
public bool RemoveFromVehicle()
Returns
Type Description
Boolean
| Improve this Doc View Source

ResetAnimation()

Resets the animation back to normal

Declaration
public bool ResetAnimation()
Returns
Type Description
Boolean
| Improve this Doc View Source

SetAnimation(Animation, Boolean, Int32, Boolean, Boolean, Boolean, Int32, Boolean)

Sets the animation of this ped

Declaration
public bool SetAnimation(Animation animation, bool loop = true, int time = -1, bool updatePosition = true, bool interruptable = true, bool freeLastFrame = true, int blendTime = 250, bool retainPedState = false)
Parameters
Type Name Description
Animation animation
Boolean loop
Int32 time
Boolean updatePosition
Boolean interruptable
Boolean freeLastFrame
Int32 blendTime
Boolean retainPedState
Returns
Type Description
Boolean
| Improve this Doc View Source

SetAnimationProgress(Animation, Single)

Sets the current animation progress of a player or ped.

Declaration
public bool SetAnimationProgress(Animation animation, float progress)
Parameters
Type Name Description
Animation animation
Single progress
Returns
Type Description
Boolean
| Improve this Doc View Source

SetAnimationSpeed(Animation, Single)

Sets the current animation speed of a player or ped.

Declaration
public bool SetAnimationSpeed(Animation animation, float speed = 1F)
Parameters
Type Name Description
Animation animation
Single speed
Returns
Type Description
Boolean
| Improve this Doc View Source

SetStat(PedStat, Single)

Set a specific stat on this ped

Declaration
public bool SetStat(PedStat stat, float value)
Parameters
Type Name Description
PedStat stat
Single value
Returns
Type Description
Boolean
| Improve this Doc View Source

WarpIntoVehicle(SharedVehicle)

Warp this ped into the driver seat of a vehicle

Declaration
public bool WarpIntoVehicle(SharedVehicle vehicle)
Parameters
Type Name Description
SharedVehicle vehicle
Returns
Type Description
Boolean
| Improve this Doc View Source

WarpIntoVehicle(SharedVehicle, Seat)

Warp this ped into a vehicle, specifying a seat

Declaration
public bool WarpIntoVehicle(SharedVehicle vehicle, Seat seat)
Parameters
Type Name Description
SharedVehicle vehicle
Seat seat
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
Back to top Generated by DocFX