I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.I DO NOT TAKE ANY CREDIT FOR THIS CODE.
Ok, I know I have code from an addon, but I just want this for personal use. How would I change this so that it works? again, I acknowledge that this download http://www.garrysmod.org/downloads/?a=view&id=61884 exists and i do not have any intention of reuploading. I just want it so that it works in single player. With that, here goes:
///////////////////////////////////////////////
////// Jinto gets full credit for this code /////
//////////////////////////////////////////////
// server
//If you’re hosting a server and have this, but don’t want to send it to joining players, comment out the lines between point1 and point2
//point1
if( SERVER ) then
AddCSLuaFile( "autorun/fpdeath.lua" );
end
//point2
// client
if( CLIENT ) then
local function CalcView( pl, origin, angles, fov )
// get their ragdoll
local ragdoll = pl:GetRagdollEntity();
if( !ragdoll || ragdoll == NULL || !ragdoll:IsValid() ) then return; end
// find the eyes
local eyes = ragdoll:GetAttachment( ragdoll:LookupAttachment( "eyes" ) );
// setup our view
local view = {
origin = eyes.Pos,
angles = eyes.Ang,
fov = 90,
};
//
return view;
end
hook.Add( "CalcView", "DeathView", CalcView );
//
end
Oh, and what’s the symbol/codeword you use to place that neat little text box so lua coding looks all nice and organized?