How to restrict duping of entities?

So on my server, admins are able to dupe money/item entites, how can I prevent that?

I looked into:


But, still not idea how to do it :confused:

Install FPP And disallow toolgunning world enities and props for admins.

In all of your entities you should use that hook and remove the entity if necessary. There might be another way.

I got it:

if (IsValid(trace.Entity) and trace.Entity.SmartyPants and ("advdupe2" or tool == "duplicator")) then
	return false;

SmartyPants should be set true if you want that entity class to never be duped.
I set self.SmartyPants = true in initialization of the entity.