Falco's Prop Protection

I’m hoping this is a really simple question to answer, I have a few entity’s that I want only the owner of that entity to be able to grab. I tried looking through the Physgun settings and there was nothing I could find but the blacklist, I also tried looking in the FPP files and only found blacklisted entity’s as well. If anybody could tell me how to make it so people can pick up certain entity’s they bought or own, that would be great.

Do the entities spawned actually show as owned by the player who spawned it or as “world”?

If it’s world you will need to set CPPISetOwner when the entity is spawned.

They show as world, how do I set that?

How are the entities spawned?

DarkRP has Custom entity fields, there is a wiki page for it here:
http://wiki.darkrp.com/index.php/DarkRP:CustomEntityFields

You specifically want the Spawn field, you can call CPPISetOwner() here.



spawn = function(ply, tr, tblEnt) return ents.Create("prop_physics") end,


Through the F4 Menu

[editline]2nd May 2015[/editline]

Added that coding to the entity, and when I tried spawning any of the entity’s, they would not spawn.



function ENT:PhysgunPickup(ply, ent)
    return (ply == self:Getowning_ent()) or ply:IsAdmin()
end


Should do the trick - overrides FPP logic.