So, I asked my friend, Jagger, if he could make me a LUA that gives Prop Mass and Model. My friend, Jagger, being as generous as he is made me this:
if CLIENT then function GetMassOfProp() local tr = LocalPlayer():GetEyeTrace() if not tr.Entity then return end LocalPlayer():PrintMessage(HUD_PRINTTALK, "Mass: "..tr.Entity:GetPhysicsObject():GetMass().." Model: "..tr.Entity:GetModel()) end concommand.Add( "propinfo", GetMassOfProp ) else print("This is a client-side addon") end
I get this message when I type propinfo in console while looking at any prop:
] propinfo autorun/client/propinfo.lua:5: Tried to use invalid object (type IPhysicsObject) (Object was NULL or not of the right type)
If there is a fix could you point it out? Any help would be appreciated.
Sorry, I posted in wrong section. I think.