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:AddToQueueList()
Removes the client from the server's client list and adds it to the internal queue client list.
Does nothing if there is currently no active server.
Throws an error if the client is a HLTV client.
Throws an error if the client is a HLTV client.
CBaseClient:AddToServerList()
Adds the client to the server's client list and removes it from the internal queue client list.
Does nothing if there is currently no active server.
Throws an error if the client is a HLTV client.
Throws an error if the client is a HLTV client.
CBaseClient:Clear()
Clear the client/frees the CBaseClient for the next player to use.
Know what your doing when using it!
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()
Disconnects the client.
CBaseClient:ExecuteStringCommand( string command )
Executes the given command as if the client himself ran it.
CBaseClient:FillServerInfo( number playerSlot = -1 )
Fills a SVC_ServerInfo net message with the server's info and sends it to the client.
CBaseClient:FireGameEvent( IGameEvent event )
Fires/sends the given gameevent to this specific client.
If the gameevent module is disabled, it will throw a lua error!
CBaseClient:FreeBaselines()
string CBaseClient:GetAddress( )
Returns the address as ip:port
This function errors if the client doesn't have a valid CNetChannel
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:GetChokedPackets( )
This function errors if the client doesn't have a valid CNetChannel
boolean CBaseClient:GetClearedDuringProcessing( )
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( )
number CBaseClient:GetMaxReliablePayloadSize( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetMaxRoutablePayloadSize( )
This function errors if the client doesn't have a valid CNetChannel
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( )
boolean CBaseClient:GetProcessingMessages( )
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: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
bf_write CBaseClient:GetStreamUnreliable( )
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
number CBaseClient:GetTimeConnected( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetTimeout( )
This function errors if the client doesn't have a valid CNetChannel
number CBaseClient:GetUpdateRate( )
boolean CBaseClient:HasNetChannel( )
Returns true if the client has a valid CNetChannel.
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!
Know what your doing when using it!
boolean CBaseClient:IsConnected( )
boolean CBaseClient:IsFakeClient( )
Works like voicechat.IsHearingClient but only takes the direct player slot.
Returns true if the client is invalid.
Unlike CBaseClient:IsValid, which obeys gameserver_rawclients, this function always reflects whether the underlying client pointer is truly invalid.
Unlike CBaseClient:IsValid, which obeys gameserver_rawclients, this function always reflects whether the underlying client pointer is truly invalid.
Works like voicechat.IsProximityHearingClient but only takes the direct player slot.
CBaseClient:MoveIntoClient( CBaseClient target )
Moves this client's state into the given target client.
Throws an error if either client is a HLTV client.
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
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.
CBaseClient:RemoveFromAllLists()
Removes the client from the server's client list and from the internal queue client list.
Does nothing if there is currently no active server.
Throws an error if the client is a HLTV client.
Throws an error if the client is a HLTV client.
Same as gameserver.BroadcastMessage but it only sends it to the specific player.
CBaseClient:SendServerInfo()
CBaseClient:SendSignonData()
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.
All data inside that stream is discarded, make sure everything was sent out.
CBaseClient:SetMaxRoutablePayloadSize( number playloadSize )
CBaseClient:SetReportThisFakeClient( boolean reportClient = 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.
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.
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 )
boolean CBaseClient:ShouldReportThisFakeClient( )
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!
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 )
CBaseClient:WriteGameSounds( bf_write buffer )
Writes the client's pending game sounds into the given buffer.
If the bitbuf module is disabled, it will throw a lua error!