Garry's Mod Wiki

hltv_changed_mode

Description

Called when the HLTV observer mode changes.

Members

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_changed_mode" ) hook.Add( "hltv_changed_mode", "hltv_changed_mode_example", function( data ) local newmode = data.newmode -- The new Observer mode local obs_target = data.obs_target -- Entity:EntIndex() of new Target local oldmode = data.oldmode -- The old Observer mode -- Called when the HLTV observer mode changes. end )