DarkRP Printers wont remove on disconnect

how do i make it so players printer will disconnect when they leave the server,
which means people can hide there printer and log off come back a few hours later and collect what they have generated i need to know how to make it so they printers, drugs ect get removed when the player leaves

I use this:

hook.Add(‘PlayerDisconnected’, ‘DestroyPrinters’, function( ply )
local money_printer = ents.FindByClass( “money_printer” )
for printer, ply in pairs (money_printer) do
if printer.dt.owning_ent == ply then
print(“Printer(s) bought by " … ply:Nick() … " have been removed as they have disconnected.”);

You put this in init.lua of the entity. Make sure the entity name is money_printer ^_^,

so if i have 12 printers do i do it for all of them and is there a certain place i put it

Ignore his code, it’s not what you want, you are probably using FPP I assume, look around the config for it, you should be able to whitelist stuff.

Whitelist? theres nothing in the config looked over it a few times and finding nothing