❓ Force viewmodel_fov

Posts 1–4 of 4 · Page 1 of 1
❓ Force viewmodel_fov
Hi there,
I post this thread for finding help to force changing viewmodel_fov on multiplayer servers.
And i want to tell if it's possible to authorize changing viewmodel_fov without changing sv_cheat 1 on a server ?


Thanks for ur help
nope but if you want to you can load this lua i just made you can change fov using cheat_fov
Code:
CreateClientConVar("cheat_fov", "90", true, false)
function CalcView(ply, pos, angles, fov)
	local view = {}
	view.origin = pos
	view.angles = angles
	view.fov = GetConVarNumber("cheat_fov")
	return view
end
hook.Add("CalcView", tostring(math.random(666, 1221312), CalcView)
Thanks for ur help but i have another question, can i authorize on my server to change viewmodel_fov value without setting sv_cheat to 1 ?



Update--

So, ur lua code have a problem ^^"

Running script fov.lua...

[ERROR] lua/fov.lua:9: ')' expected near '<eof>'
1. unknown - lua/fov.lua:0

- - - Updated - - -

So i found a solution :
local function calc(ply,origin,angles)
local view = {}
view.angles = ms
view.vm_angles = ms
view.origin = origin
view.fov = 110
return view
end
hook.Add("CalcView","calc",calc)

local w,h = ScrW()*0.48,ScrH()*0.01


AMAZING.
Quote Originally Posted by malusdefou View Post
Thanks for ur help but i have another question, can i authorize on my server to change viewmodel_fov value without setting sv_cheat to 1 ?



Update--

So, ur lua code have a problem ^^"

Running script fov.lua...

[ERROR] lua/fov.lua:9: ')' expected near '<eof>'
1. unknown - lua/fov.lua:0

- - - Updated - - -

So i found a solution :
local function calc(ply,origin,angles)
local view = {}
view.angles = ms
view.vm_angles = ms
view.origin = origin
view.fov = 110
return view
end
hook.Add("CalcView","calc",calc)

local w,h = ScrW()*0.48,ScrH()*0.01


AMAZING.
fixed it for ya dont use that garbage code
Code:
CreateClientConVar("cheat_fov", "110", true, false)
function CalcView(ply, pos, angles, fov)
	local view = {}
	view.origin = pos
	view.angles = angles
	view.fov = GetConVarNumber("cheat_fov")
	return view
end
hook.Add("CalcView", tostring(math.random(666, 1221312)), CalcView)
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us