FivePD API
EntityWrappers

FPlayer

The base player class. Provides a wrapper around game functionality for easier interactions with the framework.

Methods

FromNetId

Attempts to get the player with the specified netId.

Parameters

NameTypeDescription
netIdstringThe Cfx network identifier.

Returns

NameType
static FPlayerThe FPlayer.

FromNetId

Attempts to get the player with the specified netId.

Parameters

NameTypeDescription
netIdintThe Cfx network identifier.

Returns

NameType
static FPlayerThe FPlayer.

FromPlayer

Attempts to get the player with the specified player's netId.

Parameters

NameTypeDescription
playerPlayerThe player.

Returns

NameType
static FPlayerThe FPlayer.

GetUnderlyingPlayer

Gets the underlying Cfx player.

Returns

NameType
PlayerA Cfx player.

ToString

GetStateKey

GetStateBag

GetMenu

Gets the menu with the type of .

Parameters

NameTypeDescription
typeTypeThe type of the menu2.

Returns

NameType
TReturns a menu or null.

Properties

NetId

Gets the player's network identifier.

Type: string

Department

Gets the player's unit.

Type: Department

Unit

Gets the player's unit.

Type: Unit

User

Gets the player's User model.

Type: User

FPed

Gets the player's FPed.

Type: FPed

DutyStatus

Gets the player's duty status observable.

Type: FStateBagObservable<FDutyStatus>

Dispatcher

Gets the player's observable with a value indicating if the player is in dispatcher mode.

Type: FStateBagObservable<bool>