I use the following:
[lua]
function ENT:Use(ply,caller)
print (ply:GetObserverMode())
end
[/lua]
And it always prints 0 when I use it, when it should print 4 as I am first person, what am I doing wrong?
I use the following:
[lua]
function ENT:Use(ply,caller)
print (ply:GetObserverMode())
end
[/lua]
And it always prints 0 when I use it, when it should print 4 as I am first person, what am I doing wrong?
If you’re a player controlling your own character then you aren’t observing anyone, hence OBS_MODE_NONE (which is zero)
For reference…
OBS_MODE_NONE = 0
OBS_MODE_DEATHCAM = 1
OBS_MODE_FREEZECAM = 2
OBS_MODE_FIXED = 3
OBS_MODE_IN_EYE = 4
OBS_MODE_CHASE = 5
OBS_MODE_ROAMING = 6