Class Ped
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.Ped)]
public class Ped : SharedPed
Constructors
|
Improve this Doc
View Source
Ped(PedModel, Vector3, Single)
Declaration
public Ped(PedModel model, Vector3 position, float rotation = 0F)
Parameters
Properties
|
Improve this Doc
View Source
Animation
Get and set the current ped animation
Declaration
public Animation Animation { get; set; }
Property Value
|
Improve this Doc
View Source
CameraRotation
Get and set the camera rotation of the ped
Declaration
public float CameraRotation { get; set; }
Property Value
|
Improve this Doc
View Source
CanBeKnockedOffBike
Get and set if the ped can fall off bikes
Declaration
public bool CanBeKnockedOffBike { get; set; }
Property Value
|
Improve this Doc
View Source
Set the footblood state of this ped
Declaration
public bool FootBloodEnabled { set; }
Property Value
|
Improve this Doc
View Source
IsReloadingWeapon
Get if the ped is reload their weapon
Declaration
public bool IsReloadingWeapon { get; }
Property Value
|
Improve this Doc
View Source
MoveState
Get the movestate of this ped
Declaration
public MoveState MoveState { get; }
Property Value
|
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
|
Improve this Doc
View Source
PedVoice
Get and set the voice of this ped
Declaration
public PedVoice PedVoice { get; set; }
Property Value
|
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
|
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
|
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
|
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
|
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
Methods
|
Improve this Doc
View Source
AimAt(PhysicalElement)
Set the ped to target a specific physical element
Declaration
public bool AimAt(PhysicalElement targetElement)
Parameters
Returns
|
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
|
Improve this Doc
View Source
GetAnalogControlState(AnalogControl)
Retrieve the analog control state of a certain control
Declaration
public float GetAnalogControlState(AnalogControl control)
Parameters
Returns
|
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
|
Improve this Doc
View Source
GetControlState(AnalogControl)
Checks wheter a ped has a certain control pressed
Declaration
public bool GetControlState(AnalogControl control)
Parameters
Returns
|
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
Returns
|
Improve this Doc
View Source
IsDoingTask(PedTask)
Check if this ped is doing a certain task
Declaration
public bool IsDoingTask(PedTask task)
Parameters
Returns
|
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
Returns
|
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
Returns
|
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
Returns
|
Improve this Doc
View Source
SetControlState(AnalogControl, Boolean)
Set the control state of a ped
Declaration
public bool SetControlState(AnalogControl control, bool state)
Parameters
Returns
Events
|
Improve this Doc
View Source
OnDamage
Declaration
public event Ped.OnDamageHandler OnDamage
Event Type
|
Improve this Doc
View Source
OnExplosion
Declaration
public event Ped.OnExplosionHandler OnExplosion
Event Type
|
Improve this Doc
View Source
OnHeliKilled
Declaration
public event Ped.OnHeliKilledHandler OnHeliKilled
Event Type
|
Improve this Doc
View Source
OnStep
Declaration
public event Ped.OnStepHandler OnStep
Event Type
|
Improve this Doc
View Source
OnWasted
Declaration
public event Ped.OnWastedHandler OnWasted
Event Type
|
Improve this Doc
View Source
OnWeaponFire
Declaration
public event Ped.OnWeaponFireHandler OnWeaponFire
Event Type
|
Improve this Doc
View Source
OnWorldSound
Declaration
public event Ped.OnWorldSoundHandler OnWorldSound
Event Type
Extension Methods