-
Notifications
You must be signed in to change notification settings - Fork 4
CPlayerFuncs
KernCore edited this page Dec 14, 2020
·
11 revisions
The CPlayerFuncs class contains global player related functionality.
A single Global Instance exists with the following declaration:
const CPlayerFuncs g_PlayerFuncs;This class only contains methods.
| Methods | Description |
|---|---|
| void SayText(CBasePlayer@ pTargetPlayer, const string& in szText) | |
| void SayTextAll(CBasePlayer@ pOriginatingPlayer, const string& in szText) | |
| void ClientPrint(CBasePlayer@ pTargetPlayer, HUD iMsgDest, const string& in szMessage, const string& in szLine2 = "", const string& in szLine3 = "", const string& in szLine4 = "", const string& in szLine5 = "") | |
| void ClientPrintAll(HUD iMsgDest, const string& in szMessage, const string& in szLine2 = "", const string& in szLine3 = "", const string& in szLine4 = "", const string& in szLine5 = "") | |
| void CenterPrintAll(const string& in szMessage, const string& in szLine2 = "", const string& in szLine3 = "", const string& in szLine4 = "", const string& in szLine5 = "") | |
| void ShowMessage(CBasePlayer@ pTargetPlayer, const string& in szString) | |
| void ShowMessageAll(const string& in szString) | |
| void HudMessage(CBasePlayer@ pTargetPlayer, const HUDTextParams& in textParams, const string& in szMessage) | |
| void HudMessageAll(const HUDTextParams& in textParams, const string& in szMessage) | |
| void PrintKeyBindingString(CBasePlayer@ pPlayer, const string& in szString) | |
| void PrintKeyBindingStringAll(const string& in szString) | |
| void HudToggleElement(CBasePlayer@ pTargetPlayer, uint8 iChannel, bool fVisible) | |
| void HudCustomSprite(CBasePlayer@ pTargetPlayer, const HUDSpriteParams& in params) | |
| void HudNumDisplay(CBasePlayer@ pTargetPlayer, const HUDNumDisplayParams& in params) | |
| void HudUpdateNum(CBasePlayer@ pTargetPlayer, uint8 iChannel, float flValue) | |
| void HudTimeDisplay(CBasePlayer@ pTargetPlayer, const HUDNumDisplayParams& in params) | |
| void HudUpdateTime(CBasePlayer@ pTargetPlayer, uint8 iChannel, float flTime) | |
| CBasePlayer@ FindPlayerByIndex(int index) | |
| CBasePlayer@ FindPlayerByName(const string& in szName, bool bCaseSensitive = true) | |
| int GetNumPlayers() const | |
| void ScreenShake(const Vector& in center, float amplitude, float frequency, float duration, float radius) | |
| void ScreenShakeAll(const Vector& in center, float amplitude, float frequency, float duration) | |
| void ScreenFade(CBaseEntity@ pEntity, const Vector& in color, float fadeTime, float fadeHold, int alpha, int flags) | |
| void ScreenFadeAll(const Vector& in color, float fadeTime, float fadeHold, int alpha, int flags) | |
| void ConcussionEffect(CBaseEntity@ pEntity, float amplitude, float frequency, float fadeTime) | |
| bool GetNextBestWeapon(CBasePlayer@ pPlayer, CBasePlayerItem@ pCurrentWeapon) | |
| bool CheatsAllowed(CBasePlayer@ pPlayer, const string& in szCheatName, bool fMustBeAlive = true) const | |
| AdminLevel_t AdminLevel(CBasePlayer@ pPlayer) const | |
| string AdminLevelToString(const AdminLevel_t adminLevel) const | |
| AdminLevel_t StringToAdminLevel(const string& in szString) const | |
| void ApplyMapCfgToPlayer(CBasePlayer@ pPlayer, bool fReEquip = false) | |
| void RespawnPlayer(CBasePlayer@ pPlayer, bool fMoveLivingPlayers = true, bool fRespawnDeadPlayers = false) | |
| void RespawnAllPlayers(bool fMoveLivingPlayers = true, bool fRespawnDeadPlayers = false) | |
| bool SpawnPointFilterPasses(CBaseEntity@ pSpawnEnt, CBaseEntity@ pPlayer) | |
| bool IsSpawnPointValid(CBaseEntity@ pSpawnEnt, CBaseEntity@ pPlayer) | |
| bool IsSpawnPointOccupied(CBaseEntity@ pSpawnEnt) | |
| int SharedRandomLong(uint iRandomSeed, int iLow, int iHigh) | |
| float SharedRandomFloat(uint iRandomSeed, float iLow, float iHigh) | |
| int GetAmmoIndex(const string& in szAmmoName) | |
| CBasePlayer@ CreateBot(const string& in szName) | |
| void BotDisconnect(CBasePlayer@ pBot) |
