HolyLib Wiki

CBaseClient

CBaseClient

Metatable function Description
__index Used to find the functions on the metatable and access saved variables
__newindex Used to allow one to save variables on the object

Methods

CBaseClient:ActivatePlayer()
CBaseClient:Clear()
Clear the client/frees the CBaseClient for the next player to use.
Know what your doing when using it!
CBaseClient:ClientPrint( string message )
Prints the given message into the client's console. It won't add \n to the end, you have to add it yourself.
CBaseClient:DemoRestart()
CBaseClient:Disconnect( string reason, boolean silent = false, boolean nogameevent = false )
Disconnects the client.
CBaseClient:ExecuteStringCommand( string command )
Executes the given command as if the client himself ran it.
CBaseClient:FireEvent()
Fires/sends the gameevent to this specific client.
CBaseClient:FreeBaselines()
number CBaseClient:GetChokedPackets( )
This function errors if the client doesn't have a valid CNetChannel
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetClearTime( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetClientChallenge( )
Returns the client challenge number.
number CBaseClient:GetConnectTime( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetFriendsID( )
Returns the friend id.
string CBaseClient:GetFriendsName( )
Returns the friend name.
number CBaseClient:GetInReliableState( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetInSequenceNr( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetLastReceived( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetMaxAckTickCount( )
This function errors if the client doesn't have a valid CNetChannel
string CBaseClient:GetName( )
Returns the name of the client.
number CBaseClient:GetOutReliableState( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetOutSequenceNr( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetOutSequenceNrAck( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetPlayerSlot( )
Returns the slot of the client.
Use this for gameserver.GetClient and sourcetv.GetClient.
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetRate( )
number CBaseClient:GetSignonState( )
string CBaseClient:GetSteamID( )
Returns the steamid of the client.
bf_write CBaseClient:GetStreamReliable( )
Returns the reliable stream used by net messages. This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetStreamSocket( )
This function errors if the client doesn't have a valid CNetChannel
Returns the unreliable stream used by net messages. This function errors if the client doesn't have a valid CNetChannel
bf_write CBaseClient:GetStreamVoice( )
Returns the voice stream used by the voice chat. This function errors if the client doesn't have a valid CNetChannel
table CBaseClient:GetTable( )
Returns the lua table used by newindex and index
number CBaseClient:GetTimeout( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetUpdateRate( )
number CBaseClient:GetUserID( )
Returns the userid of the client.
number CBaseClient:HasQueuedPackets( )
This function errors if the client doesn't have a valid CNetChannel
CBaseClient:Inactivate()
Inactivates the client.
Know what your doing when using it!
boolean CBaseClient:IsActive( )
boolean CBaseClient:IsConnected( )
boolean CBaseClient:IsFakeClient( )
boolean CBaseClient:IsHearingClient( number playerSlot )
Works like voicechat.IsHearingClient but only takes the direct player slot.
boolean CBaseClient:IsHLTV( )
boolean CBaseClient:IsProximityHearingClient( number playerSlot )
Works like voicechat.IsProximityHearingClient but only takes the direct player slot.
boolean CBaseClient:IsSpawned( )
boolean CBaseClient:IsValid( )
Returns true if the client is valid.
CBaseClient:OnRequestFullUpdate()
Forces the client to go through a full update(also fires the gameevent).
boolean CBaseClient:ProcessStream( )
Processes all pending incoming net messages.
Returns true on success. This function errors if the client doesn't have a valid CNetChannel
CBaseClient:Reconnect()
Reconnects the client. Unlike the reconnect command, the client won't lose/change their slot.
boolean CBaseClient:SendLua( string code )
Sends the given code to the client to be executed.
CBaseClient:SendNetMsg( number type, string name, bf_write buffer )
Same as gameserver.BroadcastMessage but it only sends it to the specific player.
CBaseClient:SendServerInfo()
CBaseClient:SendSignonData()
CBaseClient:SetMaxBufferSize( boolean reliable = false, number bytes, boolean voice = false )
Resizes the specified buffer to the given size in bytes. This function errors if the client doesn't have a valid CNetChannel
All data inside that stream is discarded, make sure everything was sent out.
CBaseClient:SetMaxRoutablePayloadSize( number playloadSize )
CBaseClient:SetName( string name )
Sets the new name of the client.
CBaseClient:SetRate( number rate )
CBaseClient:SetReportThisFakeClient( boolean reportClient = false )
boolean CBaseClient:SetSignonState( number signOnState, number spawnCount, boolean rawSet = false )
Sets the SignOnState for the given client. This function does normally not directly set the SignOnState.
Instead it calls the responsible function for the given SignOnState like for SIGNONSTATE_PRESPAWN it will call SpawnPlayer on the client.
Set the rawSet to true if you want to directly set the SignOnState.
boolean CBaseClient:SetSteamID( string steamID64 )
Sets the SteamID of the client.
CBaseClient:SetTimeout( number seconds )
Sets the time in seconds before the client is marked as timing out. This function errors if the client doesn't have a valid CNetChannel
CBaseClient:SetUpdateRate( number rate )
CBaseClient:SetUserCVar( string convar, string value )
boolean CBaseClient:ShouldSendMessages( number tick )
CBaseClient:SpawnPlayer()
boolean CBaseClient:Transmit( boolean onlyReliable = false, number fragments = -1, boolean freeSubChannels = false )
Transmit any pending data to the client.
Returns true on success. This function errors if the client doesn't have a valid CNetChannel Transmitting data to the client causes the client's prediction to reset and cause prediction errors!
CBaseClient:UpdateAcknowledgedFramecount( number frameCount )
CBaseClient:UpdateSendState()
CBaseClient:UpdateUserSettings( bf_write buffer )