Show / Hide Table of Contents

Class Ped

Represents a pedestrian

Inheritance
Object
Element
PhysicalElement
SharedPed
Ped
Player
Inherited Members
SharedPed.WeaponSlot
SharedPed.ContactElement
SharedPed.OccupiedVehicle
SharedPed.VehicleSeat
SharedPed.IsDead
SharedPed.DoingGangDriveby
SharedPed.IsDucked
SharedPed.Headless
SharedPed.IsInVehicle
SharedPed.OnFire
SharedPed.IsOnGround
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.Server.Peds
Assembly: SlipeServer.dll
Syntax
[DefaultElementClass(ElementType.Ped)]
public class Ped : SharedPed

Constructors

| Improve this Doc View Source

Ped(PedModel, Vector3, Single, Boolean)

Create a new ped

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

Properties

| Improve this Doc View Source

Armor

Get and set the amount of armor of this ped

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

Chocking

Get and set if the ped is choking

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

FightingStyle

Get and set the fighting style of the ped

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

Gravity

This function returns the current gravity for this ped. The default gravity is 0.008.

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

HasJetpack

Get and set if the ped has a jetpack

Declaration
public bool HasJetpack { get; set; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

GiveWeapon(SharedWeaponModel, Int32, Boolean)

Give a weapon to this ped

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

ReloadWeapon()

This function reloads the weapon of this ped

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

SetAmmo(SharedWeaponModel, Int32, Int32)

Set the total ammo of a weapon the ped has

Declaration
public bool SetAmmo(SharedWeaponModel model, int totalAmmo, int ammoInClip = 0)
Parameters
Type Name Description
SharedWeaponModel model
Int32 totalAmmo
Int32 ammoInClip
Returns
Type Description
Boolean
| Improve this Doc View Source

TakeAllWeapons()

Take all weapons from this ped

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

TakeAmmo(SharedWeaponModel, Int32)

Take a certain amount of ammo from a player weapon

Declaration
public bool TakeAmmo(SharedWeaponModel model, int amount)
Parameters
Type Name Description
SharedWeaponModel model
Int32 amount
Returns
Type Description
Boolean
| Improve this Doc View Source

TakeWeapon(SharedWeaponModel)

Take a weapon from a player

Declaration
public bool TakeWeapon(SharedWeaponModel model)
Parameters
Type Name Description
SharedWeaponModel model
Returns
Type Description
Boolean

Events

| Improve this Doc View Source

OnWasted

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

OnWeaponSwitch

Declaration
public event Ped.OnWeaponSwitchHandler OnWeaponSwitch
Event Type
Type Description
Ped.OnWeaponSwitchHandler

Extension Methods

ElementExtensions.SetVisibleTo(Element, Element, Boolean)
ElementExtensions.ClearVisibleTo(Element)
ElementExtensions.IsVisibleTo(Element, Element)
ElementExtensions.Clone(Element, Vector3)
ElementExtensions.GetZoneName(PhysicalElement, Boolean)
ElementExtensions.GetSyncer(PhysicalElement)
ElementExtensions.SetSyncer(PhysicalElement, Player)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX