Garry's Mod Wiki



Called when the fixed view changes


number posx
The X position.
number posy
The Y position.
number posz
The Z position.
number phi
The phi.
number target
The EntIndex of the target.
number theta
The theta.
number fov
The FOV.



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_fixed" ) hook.Add( "hltv_fixed", "hltv_fixed_example", function( data ) local posx = data.posx -- The X position local posy = data.posy -- The Y position local posz = data.posz -- Z position local phi = data.phi -- The phi local target = -- The Entity:EntIndex() of our Target local theta = data.theta -- The theta local fov = data.fov -- The FOV -- Called when the fixed view changes end )