I made an anti-propkill addon which uses PhysgunPickup hook to ghost props. When players try to pickup others props, they can’t pickup them but the prop gets ghosted. How can I fix it?
function newpp.physgunpickup(ply,ent) if (newpp.ghostlist[ent:GetClass()]==true) then newpp.ghost(ent) end end hook.Add("PhysgunPickup", "newpp.physgunpickup", newpp.physgunpickup)
I think I can add a like
if ent:CPPIGetOwner()==ply then
but if I make it like that, system won’t be able to ghost the prop which is physgunned by an admin because the owner of the prop is not the admin.