Click or drag to resize

IServerService Methods

The IServerService type exposes the following members.

Methods
  NameDescription
Public methodAddPlayerClass(Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32)
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
Public methodAddPlayerClass(Int32, Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32)
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
Public methodBlockIpAddress
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 specific amount of seconds and, upon reconnect, will receive the same message. Effect takes place only when server is running (it is not persistent).
Public methodConnectNpc
Connect an NPC to the server.
Public methodDisableInteriorEnterExits
Disable all the interior entrances and exits in the game (the yellow arrows at doors).
Public methodEnableStuntBonus
Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie).
Public methodEnableVehicleFriendlyFire
Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles.
Public methodGameModeExit
Ends the current game mode.
Public methodGetConsoleVarAsBool
Get the boolean value of a console variable.
Public methodGetConsoleVarAsInt
Gets the integer value of a console variable.
Public methodGetConsoleVarAsString
Gets the string value of a console variable.
Public methodLimitGlobalChatRadius
Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance.
Public methodLimitPlayerMarkerRadius
Set the player marker radius.
Public methodManualVehicleEngineAndLights
Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark.
Public methodSendRconCommand
Sends an RCON (Remote Console) command.
Public methodSetGameModeText
Set the name of the game mode which appears in the server browser.
Public methodSetNameTagDrawDistance
Set the maximum distance to display the names of players. The default draw distance is 70.0.
Public methodSetTeamCount
This function is used to change the amount of teams used in the game mode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback.
Public methodSetWorldTime
Sets the world time (for all players) to a specific hour.
Public methodShowNameTags
Shows the name tags. This function can only be used in OnGameModeInit.
Public methodShowPlayerMarkers
Toggles player markers (blips on the radar). This function can only be used in OnGameModeInit..
Public methodUnBlockIpAddress
Unblock an IP address that was previously blocked using BlockIpAddress(String, TimeSpan).
Public methodUsePlayerPedAnims
Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins).
Top
See Also