[lua]function FurdPerson(ply, origin, angles, fov)
if !ply:GetNWBool("poofted") or ply:GetNWBool("poofted", false) then return end;
local View = {}
View.origin = origin;
View.angles = angles;
View.fov = fov;
if ply:GetNWBool("poofted", true) then --Failsafe
View.origin = origin + (angles:Forward() * -100);
end;
return View
end;
hook.Add( "CalcView", "TurdPerson", FurdPerson );[/lua]
Problem is you join in third-person even if your not "poofted"
if !ply:GetNWBool("poofted") or ply:GetNWBool("poofted", false) then return end;
this is much like if(false or the) then end
uhhh...
more code,
[lua]function MakeMeInvisible( ply )
if !ply:GetNWBool("poofted") then
ply:SetNWBool("poofted", true);
elseif ply:GetNWBool("poofted", true) then
ply:SetNWBool("poofted", false);
end
end
concommand.Add("pooft", MakeMeInvisible);[/lua]
Why don't you use DTBools? I think they are better. I'm not saying that this is a problem, just because it isn't. Just people recommend DTVars.
[QUOTE=KatNotDinner;31985545]Why don't you use DTBools? I think they are better. I'm not saying that this is a problem, just because it isn't. Just people recommend DTVars.[/QUOTE]
DTVars MUST be initialized on entity creation, afaik the player has no way to initialize them therefor the player doesn't have any.
[QUOTE=ChoclatePancake;31974555]more code,
[lua]function MakeMeInvisible( ply )
if !ply:GetNWBool("poofted") then
ply:SetNWBool("poofted", true);
elseif ply:GetNWBool("poofted", true) then
ply:SetNWBool("poofted", false);
end
end
concommand.Add("pooft", MakeMeInvisible);[/lua][/QUOTE]
Did you even bother reading what I've posted.
Sorry, you need to Log In to post a reply to this thread.