gameserver
gameserver
This module adds a new gameserver
library for more control over the engine's CGameServer
and CGameClient
s.
Supports: Linux32
Methods
number gameserver.ApproximateProcessMemoryUsage( )
Approximates the memory usage of the server in bytes.
This will be removed in version (0.8 - DEV).This function was removed since it never actually worked
Sends a custom net message to all clients.
This function allows you send any netmessage you want.
You should know what your doing since this function doesn't validate anything.
This function allows you send any netmessage you want.
You should know what your doing since this function doesn't validate anything.
number gameserver.CalculateCPUUsage( )
Calculates and returns the CPU Usage.
This will be removed in version (0.8 - DEV).This function was removed since it never actually worked
CNetChan gameserver.CreateNetChannel( string ip, boolean useDNS, number protocolVersion = 1, number socket = NS_SERVER )
Creates a net channel for the given ip.
number gameserver.GetClassBits( )
Returns the CGameClient at that player slot or
nil
on failure.
Returns the CGameClient for the given
userID
or nil
on failure.
number gameserver.GetClientCount( )
returns client count for iteration of gameserver.GetClient
This will include inactive CGameClient's since the engine re-uses them and doesn't delete them on disconnect.
If you want to get the count of active client's use gameserver.GetNumClients
This will include inactive CGameClient's since the engine re-uses them and doesn't delete them on disconnect.
If you want to get the count of active client's use gameserver.GetNumClients
table gameserver.GetCreatedNetChannels( )
Returns a table containing all net channels created by gameserver.CreateNetChannel
string gameserver.GetMapName( )
Returns the current map name.
number gameserver.GetMaxClients( )
returns current client limit
Returns the current server/host name.
Should be the same as
Should be the same as
GetConVar("hostname"):GetString()
number gameserver.GetNumClasses( )
number gameserver.GetNumClients( )
returns current number of clients
number gameserver.GetNumFakeClients( )
returns current number of fake clients/bots
number gameserver.GetNumProxies( )
returns number of attached HLTV proxies
string gameserver.GetPassword( )
Returns the current server password.
number gameserver.GetSpawnCount( )
number gameserver.GetTickInterval( )
Returns the current tick interval
number gameserver.GetUDPPort( )
returns the udp port the server is running on.
boolean gameserver.IsDedicated( )
boolean gameserver.IsMultiplayer( )
boolean gameserver.IsPausable( )
gameserver.NS_CLIENT()
gameserver.NS_HLTV()
gameserver.NS_SERVER()
gameserver.RemoveNetChannel( CNetChan channel )
Removes/Destroys a net channel invalidating it.
number gameserver.SendConnectionlessPacket( bf_write bf, string ip, boolean useDNS, number socket = NS_SERVER )
Sends out a connectionless packet to the target ip.
See HolyLib:ProcessConnectionlessPacket for examples. It's expected that YOU already added the connectionless header, this was done to not have to copy the buffer.
See HolyLib:ProcessConnectionlessPacket for examples. It's expected that YOU already added the connectionless header, this was done to not have to copy the buffer.
bf:WriteLong(-1) -- Write this as the first thing. This is the CONNECTIONLESS_HEADER
gameserver.SetMaxClients( number slots )
Sets the max client count.
Should do nothing.
Should do nothing.
gameserver.SetPassword( string password )
Sets the server password.