Unowning an entity

Well I made an entity for use with darkrp and it can be sold via a menu. When sold it uses ent:Remove(), it dissapears however it still counts towards the limit of this entity in darkrp. So is there another way to remove an entity which will get rid of it entirely? Or am I doing something wrong? Thanks

So there’s code specific to DarkRP that lets you put a cap on specific classes of SENT? If that’s the case you’ll want to look at the code, see how it works and put code in your SENT to remove from the limit. I recommend putting the taking-away-from-limit code in ENT:OnRemove, because that function is fired whenever the entity is removed by whatever means.

I’d have thought DarkRP would be able to take away from the limits automatically, though.

I got it working now, falco helped me :slight_smile: So this thread may aswell die.