Server Class |
Namespace: SampSharp.GameMode.SAMP
public static class Server
The Server type exposes the following members.
Name | Description | |
---|---|---|
Config | Obsolete.
Deprecated. Use new ServerConfig(Path.Combine(gameMode.Client.ServerPath, "server.cfg")) instead.
| |
MaxPlayers |
Gets the maximum number of players that can join the server, as set by the server var 'maxplayers' in server.cfg.
| |
NetworkStats |
Gets the network stats as a string.
| |
Variables |
Gets the server variables.
|
Name | Description | |
---|---|---|
BlockIPAddress |
Blocks an IP address from further communication with the server
for a set amount of time (with wildcards allowed).
Players trying to connect to the server with a blocked IP address
will receive the generic "You are banned from this server." message.
Players that are online on the specified IP before the block
will timeout after a few seconds and, upon reconnect,
will receive the same message.
| |
ConnectNPC |
Connect an NPC to the server.
| |
GetConsoleVariableT |
Retrieve a console variable.
| |
GetServerTickRate |
Gets the tick rate of the server.
| |
GetTickCount |
Returns the uptime of the actual server in milliseconds.
| |
GetWeaponName |
Gets the name of the specified weapon.
| |
Prints the specified message to the console.
| ||
SendRconCommand |
Sends an RCON command.
| |
SetWeather |
Set the world weather for all players.
| |
SetWorldTime |
Sets the world time to a specific hour.
| |
UnBlockIPAddress |
Unblock an IP address that was previously blocked using BlockIPAddress(String, TimeSpan).
|