﻿HLDS Web Manager Module Internal Functions:
===========================================


function:
	webmgr_version();
Description:
	Get Web Manager version.


function:
	webmgr_elapsed_time();
Description:
	Get elapsed time from server starting.


function:
	webmgr_get_mod_path();
Description:
	Get game MOD full path(ended with "/"), like "C:/Program Files/Counter-Strike/cstrike/".


function:
	webmgr_get_cvar(name);
Description:
	Get a game cvar value.

  
function:
	webmgr_set_cvar(name, value);
Description:
	Set a game cvar value.


function:
	webmgr_get_mapname();
Description:
	Get game current map (level) name.


function:
	webmgr_changelevel(mapname);
Description:
	Change the game level (map), equal to execute server command "changelevel mapname".


function:
	webmgr_is_player_valid(index);
Description:
	Check a player is valid or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_name(index);
Description:
	Get a player's name. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_ip(index);
Description:
	Get a player's IP address. Index is player's index from 1 to maxplayers.


function:
	webmgr_is_player_connected(index);
Description:
	Check the player is connected(has put in server) or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_is_player_connecting(index);
Description:
	Check the player is connecting or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_is_player_bot(index);
Description:
	Check the player is a BOT or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_is_player_hltv(index);
Description:
	Check the player is a HLTV or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_is_player_alive(index);
Description:
	Check the player is alive or not. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_time(index);
Description:
	Get a player's time(from connecting). Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_playtime(index);
Description:
	Get a player's play time(from connected). Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_team(index);
Description:
	Get a player's team name like "TERRORIST", "CT", "SPECTATOR", "UNASSIGNED". Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_teamid(index);
Description:
	Get a player's team ID. Index is player's index from 1 to maxplayers. NOTE: "SPECTATOR" and "UNASSIGNED" player is 0, "TERRORIST" player is 1, "CT" player is 2. If the player is not connected, the return value is -1. If player is changing team(has change team, but has not select team model), the return value is the team id before change team.


function:
	webmgr_get_player_frags(index);
Description:
	Get a player's frags. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_deaths(index);
Description:
	Get a player's deaths. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_ping(index);
Description:
	Get a player's ping(latency). Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_userid(index);
Description:
	Get a player's userid. Index is player's index from 1 to maxplayers.


function:
	webmgr_get_player_authid(index);
Description:
	Get a player's authid. Index is player's index from 1 to maxplayers.


function:
	webmgr_server_cmd(command);
Description:
	Excute server command.


function:
	webmgr_server_exec();
Description:
	Let the server execute command immediately.


function:
	webmgr_client_cmd(index, command);
Description:
	Excute client command. Index is player's index from 1 to maxplayers.


function:
	webmgr_client_print(index, print_type, message);
Description:
	Print message to client. Index is player's index from 1 to maxplayers. If print_type equal to 2, print message to client console; If print_type equal to 3, print message to client chat area; If print_type equal to 4, print message to client screen center.


function:
	webmgr_get_admin_password();
Description:
	 Get admin password in "{GAMEROOT}/webmgr/configs/webmgr.ini". NOTE: This password is loaded only once when game is starting.


function:
	webmgr_get_maxplayers();
Description:
	Get game server max player number.


function:
	webmgr_get_usersnum();
Description:
	Get number of users in the server(not include bots).


function:
	webmgr_get_playersnum();
Description:
	Get number of players in the server(include bots).


function:   
	webmgr_get_allmaps();
Description:
	Get all valid maps of the game. The return value is an array.


function:   
	webmgr_get_cyclemaps();
Description:
	Get all valid maps in MAP CYCLE FILE(default is mapcycle.txt) of the game. The return value is an array.


function:   
	webmgr_is_map_valid(mapname);
Description:
	Check the map is valid or not.
