Function Definitions

Function definitions are callbacks that can be passed around.

FuncDefs

Declaration Description
void ThinkFunction() Function definition for custom entity Think functions
void UseFunction(CBaseEntity@ pActivator, CBaseEntity@ pCaller, USE_TYPE useType, float flValue) Function definition for custom entity Use functions
void TouchFunction(CBaseEntity@ pOther) Function definition for custom entity Touch functions
void BlockedFunction(CBaseEntity@ pOther) Function definition for custom entity Blocked functions
void TextMenuPlayerSlotCallback(CTextMenu@ menu, CBasePlayer@ pPlayer, int iSlot, const CTextMenuItem@ pItem) Player slot callback for text menus.
void VoteBlocked(Vote@ pVote, float flTime) Funcdef for vote blocked callbacks. The given time is when the active vote has ended.
void VoteEnd(Vote@ pVote, bool fResult, int iVoters) Funcdef for vote ended callbacks. If fResult is true, users voted for yes. Otherwise, voted for no.
void ConCommandCallback(const CCommand@ args) Callback for server console commands.
void ClientCommandCallback(const CCommand@ args) Callback for client console commands.
void CVarCallback(CCVar@ cvar, const string& in szOldValue, float flOldValue) Callback for cvars.
void fnSQLiteCallback(any@ pParam, int iColumnSize, array<CSQLItem@>@ aryColumnValue, array<CSQLItem@>@ aryColumnName) SQLite Callback
void QueryCvar2ResponseCallback(CBasePlayer @pPlayer, int request_id, string cvar, string value) callback for svc_querycvar2 response
HookReturnCode QueryCvar2Hook(CBasePlayer @pPlayer, int requestId, const string &in cvarName, const string &in value) Get called when svc_querycvar2 response is received
HookReturnCode QueryCvarHook(CBasePlayer @pPlayer, const string &in value) Get called when svc_querycvar response is received
HookReturnCode PlayerMovePlaySoundFXHook(CBasePlayer@ pPlayer, int playerindex, Vector origin, int type, const string& in sound, float vol, float att, int flags, int pitch, uint& out uiFlags) Get called when playing player move sound
HookReturnCode PlayerMovePlayStepSoundHook(CBasePlayer@ pPlayer, playermove_t@ playermove, int iType, float flVolume, bool bIsJump, uint& out uiFlags) Get called when playing step sound
HookReturnCode PlayerTouchPlayerHook(CBasePlayer@ pPlayer, CBasePlayer@ pOther) Get called when player touches a player, player's velocity is temporarily set to impactvelocity
HookReturnCode PlayerTouchImpactHook(CBasePlayer@ pPlayer, CBaseEntity@ pOther) Get called when player impacts a solid entities or world, player's velocity is temporarily set to impactvelocity
HookReturnCode PlayerTouchTriggerHook(CBasePlayer@ pPlayer, CBaseEntity@ pOther) Get called when player touches a trigger
HookReturnCode PlayerPostThinkPostHook(CBasePlayer@ pPlayer) Post call of gEntityInterface.pfnPlayerPostThink
HookReturnCode PlayerAddToFullPackHook(entity_state_t@ state, int entindex, edict_t @ent, edict_t@ host, int hostflags, int player, uint& out result) Post call of gEntityInterface.pfnAddToFullPack, only visible entity goes here
HookReturnCode AddAmmo556Hook(CBaseEntity@ pEntity, CBaseEntity@ pOther, bool& out result) AddAmmo556
HookReturnCode GameEndHook(CBaseEntity@ pEntity, CBaseEntity@ pActivator, bool game_end, bool&out block) Pre call before game_end or changelevel
HookReturnCode PlayerMedikShotHook(CBasePlayerWeapon@ pWeapon, int ShotValue) Pre call before medik shot
HookReturnCode SendScoreInfoHook(CBasePlayer@ pPlayer, edict_t@ pTarget, int iTeamID, string szTeamName, uint& out flag) Pre call before sending hud info to edict
HookReturnCode GrappleGetMonsterTypeHook(CBaseEntity@ pThis, CBaseEntity@ pEntity, uint& out flag) Pre call before Weapon Grapple checking monster type
HookReturnCode BreakableTakeDamageHook(DamageInfo@ info) Pre call before a breakable took damage
HookReturnCode BreakableDieHook(CBaseEntity@ pBreakable, entvars_t@ pevAttacker, int iGib) Pre call before a breakable died
HookReturnCode BreakableTraceAttackHook(CBaseEntity@ pBreakable, entvars_t@ pevAttacker, float flDamage, Vector vecDir, const TraceResult& in ptr, int bitDamageType) Pre call before a breakable trace attack
HookReturnCode MonsterKilledHook(CBaseMonster@ pMonster, entvars_t@ pevAttacker, int iGib) Pre call before a monster died
HookReturnCode MonsterPostTakeDamageHook(DamageInfo@ info) Post call before a monster took damage
HookReturnCode MonsterTakeDamageHook(DamageInfo@ info) Pre call before a monster took damage
HookReturnCode MonsterTraceAttackHook(CBaseMonster@ pMonster, entvars_t@ pevAttacker, float flDamage, Vector vecDir, const TraceResult& in ptr, int bitDamageType) Pre call before a monster trace attack
HookReturnCode MonsterSpawnHook(CBaseMonster@ pEntity) Post call after a monster spawn
HookReturnCode IRelationshipHook(CBaseEntity@ pEntity, CBaseEntity@ pOther, bool param, int& out newValue) Pre call before checking relation
HookReturnCode EntitySpawnHook(CBaseEntity@ pEntity) Post call after a Entity spawn
HookReturnCode PlayerCallGrenadeHook(CBasePlayer@ pPlayer) Pre call before a player call grenade
HookReturnCode PlayerCallMedicHook(CBasePlayer@ pPlayer) Pre call before a player call medic
HookReturnCode PlayerTakeHealthHook(HealthInfo@ info) Pre call before a player took health
HookReturnCode PlayerPostTakeDamageHook(DamageInfo@ info) Pre call before a player took damage
HookReturnCode PlayerUserInfoChangedHook(CBasePlayer@ pClient, string szInfoBuffer, uint&out uiFlag) Pre call before a player info changed
HookReturnCode WeaponTertiaryAttackHook(CBasePlayer@, CBasePlayerWeapon@) Called when a player fires a weapon's tertiary attack.
HookReturnCode WeaponSecondaryAttackHook(CBasePlayer@, CBasePlayerWeapon@) Called when a player fires a weapon's secondary attack.
HookReturnCode WeaponPrimaryAttackHook(CBasePlayer@, CBasePlayerWeapon@) Called when a player fires a weapon's primary attack.
HookReturnCode PlayerPreDecalHook(CBasePlayer@, const TraceResult& in, bool& out bResult) Called when a player attempts to spraypaint a decal onto a surface. The given trace result contains the surface information. Set bResult to false if the player shouldn't be able to spray.
HookReturnCode PlayerDecalHook(CBasePlayer@, const TraceResult& in) Called when a player is spraypainting a decal onto a surface. The given trace result contains the surface information.
HookReturnCode GetPlayerSpawnSpotHook(CBasePlayer@ pPlayer, CBaseEntity@& out ppEntSpawnSpot) Called when a player is about to get a spawn point before (re)spawning.
HookReturnCode PlayerPostThinkHook(CBasePlayer@) Called when the player is processing post think events.
HookReturnCode PlayerPreThinkHook(CBasePlayer@, uint& out) Called when the player is processing pre think events.
HookReturnCode PlayerUseHook(CBasePlayer@, uint& out) Called when the game is processing player use input. Note that this occurs even if the player has not pressed their use key.
HookReturnCode PlayerLeftObserverHook(CBasePlayer@) Called when a player leaves observer mode.
HookReturnCode PlayerEnteredObserverHook(CBasePlayer@) Called when a player enters observer mode.
HookReturnCode PlayerKilledHook(CBasePlayer@, CBaseEntity@, int) Called when a player is killed.
HookReturnCode PlayerTakeDamageHook(DamageInfo@) Called when a player takes damage. Note that the victim entity can't be changed at this point.
HookReturnCode PlayerCanRespawnHook(CBasePlayer@, bool& out) Called when the game wants to know if the player should be able to respawn or not.Set bCanRespawn to false to disallow, default true.
HookReturnCode PlayerSpawnHook(CBasePlayer@) Called when a player (re)spawns.
HookReturnCode ClientConnectedHook(edict_t@, const string& in, const string& in, bool& out, string& out) Called when a player connects to the server. if bDisallowJoin is set to false, the player is disconnected. szRejectReason is shown to the player if disconnected. The maximum length of the reject reason string is 127 characters.
HookReturnCode CollectedHook(CBaseEntity@, CBaseEntity@) Called when a pickup object is collected by a player.
HookReturnCode MaterializeHook(CBaseEntity@) Called when a pickup object materializes.
HookReturnCode CanCollectHook(CBaseEntity@, CBaseEntity@, bool& out) Called when a pickup object is about to be collected by a player. Note that basic checks are done before this hook is called.
HookReturnCode CanPlayerUseReservedSlotHook(edict_t@, const string& in, const string& in, bool& out) Called when a player connects to the server, and the number of slots left on the server is <= the number of reserved slots. Set bAllowJoin to true to allow the player to join (default false).
HookReturnCode ClientSayHook(SayParameters@) Called when a player says something in game chat. The SayParameters class can be used to manipulate input and veto the message.
HookReturnCode ClientPutInServerHook(CBasePlayer@) Called when a player has finished connecting and is put into the world. It is safe to send network messages to the player at this point.
HookReturnCode ClientDisconnectHook(CBasePlayer@) Called when a player disconnects. Note that this is only called if the player was fully connected, meaning the player went through ClientPutInServer. This is never called for the local host.
HookReturnCode EntityCreatedHook(CBaseEntity@) Called when a new entity is created. At this point the entity is not spawned yet and may not be fully initialized.
HookReturnCode MapChangeHook() Called when the map changes. This happens when the world is destroyed. There may still be entities that exist at this point.