Table of Contents

Class FpcRole

Namespace
Exiled.API.Features.Roles
Assembly
Exiled.API.dll

Defines a role that represents an fpc class.

public abstract class FpcRole : Role, IWrapper<PlayerRoleBase>, IVoiceRole
Inheritance
FpcRole
Implements
IWrapper<PlayerRoleBase>
Derived
Inherited Members
Extension Methods

Constructors

FpcRole(FpcStandardRoleBase)

Initializes a new instance of the FpcRole class.

protected FpcRole(FpcStandardRoleBase baseRole)

Parameters

baseRole FpcStandardRoleBase

the base PlayerRoles.PlayerRoleBase.

Properties

CanSendInputs

Gets a value indicating whether the player can send inputs.

public bool CanSendInputs { get; }

Property Value

bool

ClientRelativePosition

Gets or sets the player's relative position as perceived by the client.

public RelativePosition ClientRelativePosition { get; set; }

Property Value

RelativePosition

CrouchingSpeed

Gets or sets the Role crouching speed.

public float CrouchingSpeed { get; set; }

Property Value

float

FallDamageMultiplier

Gets or sets the multiplier of Falldown damage.

public float FallDamageMultiplier { get; set; }

Property Value

float

FirstPersonController

public FpcStandardRoleBase FirstPersonController { get; }

Property Value

FpcStandardRoleBase

Gravity

Gets or sets the player's gravity.

public Vector3 Gravity { get; set; }

Property Value

Vector3

HorizontalRotation

Gets the Player's horizontal rotation.

public float HorizontalRotation { get; }

Property Value

float

IsAfk

Gets a value indicating whether the Player is AFK.

public bool IsAfk { get; }

Property Value

bool

IsCrouching

Gets a value indicating whether the Player is crouching.

public bool IsCrouching { get; }

Property Value

bool

IsFallDamageEnable

Gets or sets a value indicating whether if the player should get Falldown damage.

public bool IsFallDamageEnable { get; set; }

Property Value

bool

IsGrounded

Gets a value indicating whether the player is on the ground.

public bool IsGrounded { get; }

Property Value

bool

IsHumeShieldedRole

Gets a value indicating whether this role is protected by a hume shield.

public bool IsHumeShieldedRole { get; }

Property Value

bool

IsInDarkness

Gets a value indicating whether the Player is in darkness.

public bool IsInDarkness { get; }

Property Value

bool

IsInvisible

Gets or sets a value indicating whether the player is invisible.

public bool IsInvisible { get; set; }

Property Value

bool

IsInvisibleFor

Gets a list of players who can't see the player.

public HashSet<Player> IsInvisibleFor { get; }

Property Value

HashSet<Player>

IsNoclipEnabled

Gets or sets a value indicating whether the player has noclip enabled.

[Obsolete("Use Player::IsNoclipEnabled instead")]
public bool IsNoclipEnabled { get; set; }

Property Value

bool

bool indicating status.

Remarks

For permitting a player to enter and exit noclip freely, see IsNoclipPermitted.

See Also

IsUsingStamina

Gets or sets a value indicating whether the player should use stamina system. Resets on death.

public bool IsUsingStamina { get; set; }

Property Value

bool

JumpingSpeed

Gets or sets the Role jumping speed.

public float JumpingSpeed { get; set; }

Property Value

float

Model

Gets or sets the PlayerRoles.FirstPersonControl.Thirdperson.CharacterModel associated with the player.

public CharacterModel Model { get; set; }

Property Value

CharacterModel

MoveState

Gets or sets the player's current PlayerRoles.FirstPersonControl.PlayerMovementState.

public PlayerMovementState MoveState { get; set; }

Property Value

PlayerMovementState

MovementDetected

Gets or sets a value indicating whether if a movement is detected on a Player.

public bool MovementDetected { get; set; }

Property Value

bool

MovementSpeed

Gets the Player's current movement speed.

public virtual float MovementSpeed { get; }

Property Value

float

Ragdoll

Gets or sets a prefab ragdoll for this role.

public BasicRagdoll Ragdoll { get; set; }

Property Value

BasicRagdoll

RelativePosition

Gets or sets the player's relative position as perceived by the server.

public RelativePosition RelativePosition { get; set; }

Property Value

RelativePosition

RotationDetected

Gets or sets a value indicating whether if a rotation is detected on the player.

public bool RotationDetected { get; set; }

Property Value

bool

Scale

Gets or sets the player's scale.

public Vector3 Scale { get; set; }

Property Value

Vector3

SpectatableModuleBase

Gets a SpectatableModuleBase for this role.

public SpectatableModuleBase SpectatableModuleBase { get; }

Property Value

SpectatableModuleBase

SprintingSpeed

Gets or sets the Role sprinting speed.

public float SprintingSpeed { get; set; }

Property Value

float

StaminaRegenMultiplier

Gets or sets the stamina regen multiplier. Resets on death.

public float StaminaRegenMultiplier { get; set; }

Property Value

float

StaminaUsageMultiplier

Gets or sets the stamina usage multiplier. Resets on death.

public float StaminaUsageMultiplier { get; set; }

Property Value

float

Velocity

Gets or sets the Player velocity.

public Vector3 Velocity { get; set; }

Property Value

Vector3

VerticalRotation

Gets the Player's vertical rotation.

public float VerticalRotation { get; }

Property Value

float

VisibilityController

Gets a VisibilityController for this role.

public VisibilityController VisibilityController { get; }

Property Value

VisibilityController

VoiceModule

Gets a voice module for this role.

public VoiceModuleBase VoiceModule { get; }

Property Value

VoiceModuleBase

WalkingSpeed

Gets or sets the Role walking speed.

public float WalkingSpeed { get; set; }

Property Value

float

Methods

~FpcRole()

Finalizes an instance of the FpcRole class.

protected ~FpcRole()

Jump(float?)

Makes the player jump using the default or a specified strength.

public void Jump(float? jumpStrength = null)

Parameters

jumpStrength float?

Optional. The strength of the jump. If not provided, the default jump speed for Role is used.

ResetStamina(bool)

Resets the Player's stamina.

public void ResetStamina(bool multipliers = false)

Parameters

multipliers bool

Resets StaminaUsageMultiplier and StaminaRegenMultiplier.

TryGetBoneTransform(HumanBodyBones, out Transform)

Tries to get the UnityEngine.Transform of a specified UnityEngine.HumanBodyBones bone.

public bool TryGetBoneTransform(HumanBodyBones bone, out Transform boneTransform)

Parameters

bone HumanBodyBones

The bone to get the UnityEngine.Transform of.

boneTransform Transform

When this method returns, contains the UnityEngine.Transform of the specified bone, if found; otherwise, null.

Returns

bool

true if the bone transform was found; otherwise, false.