FivePD API
EntityWrappers/PedWrapper

FPed

Represents a wrapper around a CitizenFX ped entity, providing additional FivePD-specific functionality.

Methods

FromFPlayer

Created an FPed wrapper from the specified FPlayer.

Parameters

NameTypeDescription
playerFPlayerThe instance to use.

Returns

NameType
static FPedThe FPed.

FromPed

Created an FPed wrapper from the specified Ped.

Parameters

NameTypeDescription
pedPedThe instance to use.

Returns

NameType
static FPedThe FPed.

FromNetId

Created an FPed wrapper from the specified Ped.

Parameters

NameTypeDescription
networkIdintThe network ID of the ped.

Returns

NameType
static FPedThe FPed.

ChangeState

Changes the state of the ped.

Parameters

NameTypeDescription
stateFPedStateThe new state.

GetStateKey

GetStateBag

Properties

State

Gets the ped's current state.

Type: FPedState

Stopped

Gets the ped's observable with a value indicating if the ped is stopped.

Type: FStateBagObservable<bool>

HasGeneratedData

Gets the ped's observable with a value indicating if the ped has generated data.

Type: FStateBagObservable<bool>

Detained

Gets the ped's observable with a value indicating if the ped is detained.

Type: FStateBagObservable<bool>

Movement

Gets the ped's observable with a value indicating if the ped is being moved.

Type: FStateBagObservable<FPedMovement>

Properties

Gets the properties of the FPed.

Type: FPedProperties

Task

Gets the tasks of the FPed.

Type: FPedTasks

Weapons

Gets the weapons of the FPed.

Type: FWeaponCollection

GetUnderlyingPed

Gets the underlying Ped.

Type: Ped

Owner

Gets the owner of the FPed.

Type: Player

PedDataId

Gets the ped's PedHistory id.

Type: int

NetworkId

Gets the entity's network identifier.

Type: int

OwningVehicleId

Gets the id of the vehicle the ped is owning.

Type: int