Garry's Mod Wiki

Garry's Mod Wiki

Description

Called when the HLTV observer target changes.

Members

number obs_target
The EntIndex of the new Target.
number old_target
The EntIndex of the old Target.

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_target" ) hook.Add( "hltv_changed_target", "hltv_changed_target_example", function( data ) local mode = data.mode -- The Observer mode local obs_target = data.obs_target -- Entity:EntIndex() of new Target local old_target = data.old_target -- Entity:EntIndex() of old Target -- Called when the HLTV observer target changes. end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...