Player.SetViewOffset

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:SetViewOffset( Vector )
Description:
Set the view offset of a player
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.SetViewOffset]Player.SetViewOffset [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis piece of code changes all players view offset of the z axis to 700
Used onNewerServer.png
Code
for k,v in pairs(player.GetAll()) do
    v:SetViewOffset(Vector(0,0,700))
end
OutputSee Description


Additional Notes


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox