Skip to content

CBasePlayer@

The base class of all Players in Source Engine games.

Methods

  • void SetBodyPitch(float flPitch) --
  • void LockPlayerInPlace() --
  • void UnlockPlayer() --
  • void ForceRespawn() --
  • void Jump() --
  • void Duck() --
  • void ForceSimulation() --
  • void PauseBonusProgress(bool bPause = true) --
  • void SetBonusProgress(int iBonusProgress) --
  • void SetBonusChallenge(int iBonusChallenge) --
  • int GetBonusProgress() const --
  • int GetBonusChallenge() const --
  • Vector EyePosition() --
  • void SnapEyeAngles(const QAngle&in viewAngles) --
  • QAngle BodyAngles() --
  • Vector BodyTarget(const Vector&in posSrc, bool bNoisy) --
  • bool IsFakeClient() const --
  • int GetClientIndex() --
  • string GetPlayerName() --
  • void SetPlayerName(string&in name) --
  • int GetUserID() --
  • string GetNetworkIDString() --
  • const Vector GetPlayerMins() const --
  • const Vector GetPlayerMaxs() const --
  • void VelocityPunch(const Vector&in vecForce) --
  • void ViewPunch(const QAngle&in angleOffset) --
  • void ViewPunchReset(float tolerance = 0) --
  • void ShowViewModel(bool bShow) --
  • void ShowCrosshair(bool bShow) --
  • void RemoveAllItems(bool removeSuit) --
  • bool IsDead() const --
  • void Weapon_SetLast(CBaseCombatWeapon@ pWeapon) --
  • bool Weapon_ShouldSetLast(CBaseCombatWeapon@ pOldWeapon, CBaseCombatWeapon@ pNewWeapon) --
  • bool Weapon_ShouldSelectItem(CBaseCombatWeapon@ pWeapon) --
  • void Weapon_DropSlot(int weaponSlot) --
  • CBaseCombatWeapon@ Weapon_GetLast() --
  • float GetTimeSinceWeaponFired() const --
  • bool IsFiringWeapon() const --
  • bool HasAnyAmmoOfType(int nAmmoIndex) --
  • bool IsOnLadder() --
  • void SetFlashlightEnabled(bool bState) --
  • int FlashlightIsOn() --
  • void FlashlightTurnOn() --
  • void FlashlightTurnOff() --
  • bool StartObserverMode(int mode) --
  • void StopObserverMode(int mode) --
  • bool ModeWantsSpectatorGUI(int mode) --
  • bool SetObserverMode(int mode) --
  • int GetObserverMode() --
  • bool SetObserverTarget(CBaseEntity@ target) --
  • void ObserverUse(bool bIsPressed) --
  • CBaseEntity@ GetObserverTarget() --
  • CBaseEntity@ FindNextObserverTarget(bool bReverse) --
  • int GetNextObserverSearchStartPoint(bool bReverse) --
  • bool IsValidObserverTarget(CBaseEntity@ target) --
  • void JumptoObserverPosition(const Vector&in origin, const QAngle&in angles) --
  • void ForceObserverMode(int mode) --
  • void ResetObserverMode() --
  • void ValidateCurrentObserverTarget() --
  • void AttemptToExitFreezeCam() --
  • bool StartReplayMode(float fDelay, float fDuration, int iEntity) --
  • void StopReplayMode() --
  • int GetDelayTicks() --
  • int GetReplayEntity() --
  • void CreateCorpse() --
  • CBaseEntity@ EntSelectSpawnPoint() --
  • void AddPoints(int score, bool bAllowNegativeScore) --
  • void AddPointsToTeam(int score, bool bAllowNegativeScore) --
  • bool BumpWeapon(CBaseCombatWeapon@ pWeapon) --
  • bool AddPlayerItem(CBaseCombatWeapon@ pItem) --
  • bool RemovePlayerItem(CBaseCombatWeapon@ pItem) --
  • CBaseEntity@ HasNamedPlayerItem(string&in pszItemName) --
  • bool HasWeapons() --
  • void SelectLastItem() --
  • void SelectItem(string&in pstr, int iSubType = 0) --
  • CBaseEntity@ GiveNamedItem(string&in szName, int iSubType = 0) --
  • void EnableControl(bool fControl) --
  • void AbortReload() --
  • void PlayerUse() --
  • CBaseEntity@ FindUseEntity() --
  • bool IsUseableEntity(CBaseEntity@ pEntity, uint requiredCaps) --
  • bool ClearUseEntity() --
  • CBaseEntity@ DoubleCheckUseNPC(CBaseEntity@ pNPC, const Vector&in vecSrc, const Vector&in vecDir) --
  • void PickupObject(CBaseEntity@ pObject, bool bLimitMassAndSize = true) --
  • void ForceDropOfCarriedPhysObjects(CBaseEntity@ pOnlyIfHoldindThis = null) --
  • float GetHeldObjectMass(CPhysObj@ pHeldObject) --
  • Vector GetAutoaimVector(float flScale) --
  • Vector GetAutoaimVector(float flScale, float flMaxDist) --
  • float GetAutoaimScore(const Vector&in eyePosition, const Vector&in viewDir, const Vector&in vecTarget, CBaseEntity@ pTarget, float fScale, CBaseCombatWeapon@ pActiveWeapon) --
  • void SetViewEntity(CBaseEntity@ pEntity) --
  • CBaseEntity@ GetViewEntity() --
  • void ForceClientDllUpdate() --
  • void ChangeTeam(int iTeamNum) --
  • void ChangeTeam(int iTeamNum, bool bAutoTeam, bool bSilent) --
  • bool CanHearAndReadChatFrom(CBasePlayer@ pPlayer) --
  • bool CanSpeak() --
  • const QAngle& GetPunchAngle() --
  • void SetPunchAngle(const QAngle&in punchAngle) --
  • int FragCount() const --
  • int DeathCount() const --
  • bool IsConnected() const --
  • bool IsDisconnecting() const --
  • bool IsSuitEquipped() const --
  • int ArmorValue() const --
  • bool HUDNeedsRestart() const --
  • float MaxSpeed() const --
  • Activity GetActivity() const --
  • bool IsPlayerLockedInPlace() const --
  • bool IsObserver() const --
  • bool IsOnTarget() const --
  • float MuzzleFlashTime() const --
  • float PlayerDrownTime() const --
  • bool IsReadyToPlay() --
  • bool IsReadyToSpawn() --
  • bool ShouldGainInstantSpawn() --
  • void ResetPerRoundStats() --
  • void AllowInstantSpawn() --
  • void ResetScores() --
  • void ResetFragCount() --
  • void IncrementFragCount(int nCount) --
  • void ResetDeathCount() --
  • void IncrementDeathCount(int nCount) --
  • void SetArmorValue(int value) --
  • void IncrementArmorValue(int nCount, int nMaxValue = -1) --
  • void EquipSuit(bool bPlayEffects = true) --
  • void RemoveSuit() --
  • void SetMaxSpeed(float flMaxSpeed) --
  • CBaseEntity@ GetUseEntity() --
  • void CommitSuicide(bool bExplode = false, bool bForce = false) --
  • void CommitSuicide(const Vector&in vecForce, bool bExplode = false, bool bForce = false) --
  • bool IsBot() --
  • int GetFOV() --
  • int GetDefaultFOV() const --
  • int GetFOVForNetworking() --
  • bool SetFOV(CBaseEntity@ pRequester, int FOV, float zoomRate = 0.0f, int iZoomStart = 0) --
  • void SetDefaultFOV(int FOV) --
  • CBaseEntity@ GetFOVOwner() --
  • float GetFOVDistanceAdjustFactor() --
  • float GetFOVDistanceAdjustFactorForNetworking() --
  • int GetImpulse() const --
  • void ActivateMovementConstraint(CBaseEntity@ pEntity, const Vector&in vecCenter, float flRadius, float flConstraintWidth, float flSpeedFactor) --
  • void DeactivateMovementConstraint() --
  • float LastTimePlayerTalked() --
  • void DisableButtons(int nButtons) --
  • void EnableButtons(int nButtons) --
  • void ForceButtons(int nButtons) --
  • void UnforceButtons(int nButtons) --
  • bool IsSprinting() --
  • bool IsSlowmoEnabled() const --
  • float GetSlowmoMultiplier() const --
  • void EnableSlowmo() --
  • void DisableSlowmo() --
  • float GetDeathTime() --
  • bool GetToggledDuckState() --
  • void ToggleDuck() --
  • float GetStickDist() --
  • CBaseEntity@ opCast() -- CBasePlayer to CBaseEntity.
  • CBaseEntity@ opImplCast() -- CBasePlayer to CBaseEntity.
  • CP3Player@ opCast() -- CBasePlayer to CP3Player.
  • CP3Player@ opImplCast() -- CBasePlayer to CP3Player.

Properties

  • bool m_bPreventWeaponHint --