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
| Name | Type | Description |
|---|---|---|
| netId | string | The Cfx network identifier. |
Returns
| Name | Type |
|---|---|
| static FPlayer | The FPlayer. |
FromNetId
Attempts to get the player with the specified netId.
Parameters
| Name | Type | Description |
|---|---|---|
| netId | int | The Cfx network identifier. |
Returns
| Name | Type |
|---|---|
| static FPlayer | The FPlayer. |
FromPlayer
Attempts to get the player with the specified player's netId.
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player. |
Returns
| Name | Type |
|---|---|
| static FPlayer | The FPlayer. |
GetUnderlyingPlayer
Gets the underlying Cfx player.
Returns
| Name | Type |
|---|---|
| Player | A Cfx player. |
ToString
GetStateKey
GetStateBag
GetMenu
Gets the menu with the type of
Parameters
| Name | Type | Description |
|---|---|---|
| type | Type | The type of the menu2. |
Returns
| Name | Type |
|---|---|
| T | Returns 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>