Basically, it's a first-person death script. Whenever you die, your view is wherever your head is looking. However, it doesn't work. How can I fix this?
if( CLIENT ) then
local function CalcView( pl, origin, angles, fov )
local ragdoll = pl:GetRagdollEntity();
if( !ragdoll || ragdoll == NULL || !ragdoll:IsValid() ) then return; end
local eyes = ragdoll:GetAttachment( ragdoll:LookupAttachment( "eyes" ) );
local view = {
origin = eyes.Pos,
angles = eyes.Ang,
fov = 90,
};
return view;
end
hook.Add( "CalcView", "DeathView", CalcView );
end

2 comments
Oh... :P
maybe you SHOULDN'T post java in this website. Close this topic, I doubt many people here know how to code in java. Come back when you've converted it to LUA.