I’ve been exploring some servers. I’ve seen some ThirdPerson mods/addons.

I’m trying to find one, where you type “!thirdperson” in chat and it goes thidperson?

Anyone can help.

-- Modified from
local TPerson = true
local RView = 20 // How far back
local function MyCalcView(ply, pos, angles, fov)
	view.origin = pos
    if TPerson then
		view.origin = pos-(angles:Forward()*RView)
    view.angles = angles
    view.fov = fov
    return view
hook.Add("CalcView", "MyCalcView", MyCalcView)

hey, thanks for posting the script for this, im just setting up a server myself, where would i put this when i save it, is there something specific it should be called when saving?

lua/autorun/client, name doesn’t matter.

Error With That Code:

[ERROR] lua/autorun/client/thirdperson.lua:5: attempt to index global 'view' (a nil value)
1. fn - lua/autorun/client/thirdperson.lua:5
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

instead of linking coderhire scripts link something useful like chasecam

If anyone could help, thank you.

Put local view = {} at the top.

Thank you.

[editline]13th May 2014[/editline]

Dumb Question:

How do I use it?

[editline]13th May 2014[/editline]

Because it’s not TPerson