Garry's Mod Wiki

hltv_status

Description

Called when the HLTVServer stats are updated.
They should be updated every 8 seconds.
All of these stats are global and shared by the master server.

Members

string master
The address of the master.
number clients
The number of total clients.
number slots
The number of total slots.
number proxies
The number of total proxies.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "hltv_status" ) hook.Add( "hltv_status", "hltv_status_example", function( data ) local master = data.master -- The master server address local clients = data.clients -- The number of total clients. local slots = data.slots -- The number of total slots. local proxies = data.proxies -- The number of total proxies. -- Called when the stats are updated. end )