HolyLib Wiki

sourcetv

sourcetv

This module adds a new sourcetv library and a new class CHLTVPlayer. Supports: Linux32

Methods

sourcetv.FireEvent( number event, boolean allowOverride = false )
Fires the gameevent for all hltv clients / broadcasts it.
table sourcetv.GetAll( )
Returns a table that contains all CHLTVClients.
It will return nil on failure.
CHLTVClient sourcetv.GetClient( number playerSlot )
Returns the CHLTVClient at that slot or nil on failure.
number sourcetv.GetClientCount( )
Returns the number of sourctv clients connected.
number sourcetv.GetHLTVSlot( )
Returns the slot of the sourcetv client/bot.
Returns the filename of the current recording. or nil.
boolean sourcetv.IsActive( )
Returns true if sourcetv is active.
boolean sourcetv.IsMasterProxy( )
Returns true if sourcetv server is the master proxy.
boolean sourcetv.IsRecording( )
Returns true if sourcetv is recording.
boolean sourcetv.IsRelay( )
Returns true if the sourcetv server is a relay.
sourcetv.RECORD_ACTIVE()
there already is an active record! Should we allow multiple active record? I think I could implement it. If wanted, make a request for it.
A file with that name already exists!
The filepath for the recording is invalid!
SourceTV is not active!
sourcetv.RECORD_NOTACTIVE()
there is no active recording to stop!
sourcetv.RECORD_NOTMASTER()
the sourcetv server is not the master!
sourcetv.RECORD_OK()
The recording was started.
sourcetv.SetCameraMan( number entityIndex )
Sends the hltv_cameraman event all clients and blocks the HLTVDirector from changing the view.
Call it with 0 / NULL to reset it and let the HLTVDirector take control again. This won't set it for new clients.
You have to call it again for thoes.
number sourcetv.StartRecord( string fileName )
Tries to start a new recording.
Returns one of the RECORD_ enums.
number sourcetv.StopRecord( )
Stops the active record.
Returns one of the RECORD_ enums.
If successfully stopped, it will return sourcetv.RECORD_OK.