SWEP.TranslateFOV

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameTranslateFOV
SyntaxSWEP:TranslateFOV( Integer Fov )
DescriptionTakes the field of view defined in SWEP.ViewModelFOV and returns a new value.
ReturnsInteger Fov
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.TranslateFOV]SWEP.TranslateFOV [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionTranslate the FOV if we are zoomed in.
Used onNewerClient.png
Code
function SWEP:TranslateFOV(oldfov)
	if self.ZoomedIn then return  oldfov - 30 end
end
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox