CBasePlayerController
Base player controller entity. Manages the link between a player slot and their pawn.
public class CBasePlayerController : CBaseEntity
Namespace: DeadworksManaged.Api
Inherits / implements: CBaseEntity
Derived types: CCitadelPlayerController
Source: Entities/CBasePlayerController.cs#L7
Properties
CBasePlayerController.Slot
The 0-based player slot index for this controller (CBaseEntity.EntityIndex minus 1).
Signature
public int Slot { get; }
Source: Entities/CBasePlayerController.cs#L11
CBasePlayerController.Recipients
A RecipientFilter targeting just this player.
Signature
public RecipientFilter Recipients { get; }
Source: Entities/CBasePlayerController.cs#L14
CBasePlayerController.PlayerName
The player's display name (char[128] inline buffer).
Signature
public string PlayerName { get; set; }
Source: Entities/CBasePlayerController.cs#L27
CBasePlayerController.PlayerSteamId
The player's SteamID64. A player who disconnects leaves their controller (team, hero, stats) in their slot, and gets it back if they rejoin into it. To give it to someone else, set this to their SteamID in IDeadworksPlugin.OnClientConnect as they join into that slot.
Signature
public ulong PlayerSteamId { get; set; }
Source: Entities/CBasePlayerController.cs#L48
CBasePlayerController.Pawn
The controller's current pawn (hero, observer, or any other), or null if none.
Signature
public CBasePlayerPawn? Pawn { get; }
Source: Entities/CBasePlayerController.cs#L53
Methods
CBasePlayerController.PlaySound()
Plays a soundevent to just this player at their listener position. Returns the soundevent GUID.
Signature
public uint PlaySound(string name, float volume = 1f, float pitch = 1f)
Source: Entities/CBasePlayerController.cs#L17
CBasePlayerController.Kick()
Disconnects this player. See Server.Kick.
Signature
public void Kick(ENetworkDisconnectionReason reason = ENetworkDisconnectionReason.NetworkDisconnectKicked)
Source: Entities/CBasePlayerController.cs#L21
CBasePlayerController.SetPawn()
Assigns a new pawn to this controller, optionally transferring team and movement state.
Signature
public void SetPawn(CBasePlayerPawn? pawn, bool retainOldPawnTeam = false, bool copyMovementState = false, bool allowTeamMismatch = false, bool preserveMovementState = false)