Enums 2

Enum Description
AuthIdType

Auth string types.

NetFlow

Network flow directions.

Forwards 14

Function Description
OnClientAuthorized

Called when a client receives an auth ID. The state of a client's authorization as an admin is not guaranteed here. Use OnClientPostAdminCheck() if you need a client's admin status.

OnClientCommand

Called when a client is sending a command.

OnClientCommandKeyValues

Called when a client is sending a KeyValues command.

OnClientCommandKeyValues_Post

Called after a client has sent a KeyValues command.

OnClientConnect

Called on client connection. If you return true, the client will be allowed in the server. If you return false (or return nothing), the client will be rejected. If the client is rejected by this forward or any other, OnClientDisconnect will not be called.

OnClientConnected

Called once a client successfully connects. This callback is paired with OnClientDisconnect.

OnClientDisconnect

Called when a client is disconnecting from the server.

OnClientDisconnect_Post

Called when a client is disconnected from the server.

OnClientLanguageChanged

Called when the language was received from the player.

OnClientPostAdminCheck

Called once a client is authorized and fully in-game, and after all post-connection authorizations have been performed.

OnClientPostAdminFilter

Called directly before OnClientPostAdminCheck() as a method to alter administrative permissions before plugins perform final post-connect operations.

OnClientPreAdminCheck

Called once a client is authorized and fully in-game, but before admin checks are done. This can be used to override the default admin checks for a client. You should only use this for overriding; use OnClientPostAdminCheck() instead if you want notification.

OnClientPutInServer

Called when a client is entering the game.

OnClientSettingsChanged

Called whenever the client's settings are changed.

Functions 57

Function Description
AddUserFlags

Sets access flags on a client. If the client is not an admin, a temporary, anonymous AdminId is given.

CanUserTarget

Returns whether a user can target another user. This is a helper function for CanAdminTarget.

ChangeClientTeam

Changes a client's team through the mod's generic team changing function. On CS:S, this will kill the player.

CreateFakeClient

Creates a fake client.

GetClientAbsAngles

Returns the client's position angle.

GetClientAbsOrigin

Returns the client's origin vector.

GetClientArmor

Returns the client's armor.

GetClientAuthId

Retrieves a client's authentication string (SteamID).

GetClientAuthString

GetClientAvgChoke

Returns the client's average packet choke, values go from 0 to 1 (for percentages).

GetClientAvgData

Returns the client's data flow in bytes/sec.

GetClientAvgLatency

Returns the client's average packet latency in seconds.

GetClientAvgLoss

Returns the client's average packet loss, values go from 0 to 1 (for percentages).

GetClientAvgPackets

Returns the client's average packet frequency in packets/sec.

GetClientCount

Returns the client count put in the server.

GetClientDataRate

Returns the client's send data rate in bytes/sec.

GetClientDeaths

Returns the client's death count.

GetClientFrags

Returns the client's frag count.

GetClientFromSerial

Returns the client index by its serial number.

GetClientHealth

Returns the client's health.

GetClientInfo

Retrieves values from client replicated keys.

GetClientIP

Retrieves a client's IP address.

GetClientLatency

Returns the client's current latency (RTT), more accurate than GetAvgLatency but jittering.

GetClientMaxs

Returns the client's max size vector.

GetClientMins

Returns the client's min size vector.

GetClientModel

Returns the client's model name.

GetClientName

Returns the client's name.

GetClientOfUserId

Translates an userid index to the real player index.

GetClientSerial

Returns the clients unique serial identifier.

GetClientTeam

Retrieves a client's team index.

GetClientTime

Returns the client's connection time in seconds.

GetClientUserId

Retrieves a client's user id, which is an index incremented for every client that joins the server.

GetClientWeapon

Returns the client's weapon name.

GetMaxClients

GetMaxHumanPlayers

Returns the maximum number of human players allowed on the server. This is a game-specific function used on newer games to limit the number of humans that can join a game and can be lower than MaxClients. It is the number often reflected in the server browser or when viewing the output of the status command. On unsupported games or modes without overrides, it will return the same value as MaxClients.

GetSteamAccountID

Returns the client's Steam account ID, a number uniquely identifying a given Steam account. This number is the basis for the various display SteamID forms, see the AuthIdType enum for examples.

GetUserAdmin

Retrieves a client's AdminId.

GetUserFlagBits

Returns client access flags. If the client is not an admin, the result is always 0.

IsClientAuthorized

Returns if a certain player has been authenticated.

IsClientConnected

Returns if a certain player is connected.

IsClientInGame

Returns if a certain player has entered the game.

IsClientInKickQueue

Returns if a client is in the "kick queue" (i.e. the client will be kicked shortly and thus they should not appear as valid).

IsClientObserver

Returns if a certain player is an observer/spectator.

IsClientReplay

Returns if a certain player is the Replay bot.

IsClientSourceTV

Returns if a certain player is the SourceTV bot.

IsClientTimingOut

Returns if a client is timing out

IsFakeClient

Returns if a certain player is a fake client.

IsPlayerAlive

Returns if the client is alive or dead.

IsPlayerInGame

KickClient

Disconnects a client from the server as soon as the next frame starts.

KickClientEx

Immediately disconnects a client from the server.

NotifyPostAdminCheck

Signals that a player has completed post-connection admin checks. Has no effect if the player has already had this event signalled.

RemoveUserFlags

Removes flags from a client. If the client is not an admin, this has no effect.

RunAdminCacheChecks

Runs through the Core-defined admin authorization checks on a player. Has no effect if the player is already an admin.

SetFakeClientConVar

Sets a convar value on a fake client.

SetUserAdmin

Sets a client's AdminId.

SetUserFlagBits

Sets access flags on a client using bits instead of flags. If the client is not an admin, and flags not 0, a temporary, anonymous AdminId is given.