Quote:to avoid server crashes with badly writtenwell i did write it in 3-7 minutes
plugins.
this is the code i used:
function Initialize(Plugin) PLUGIN = Plugin Plugin:SetName("PickupFix") Plugin:SetVersion(1) PluginManager = cRoot:Get():GetPluginManager() cPluginManager:Get():AddHook(Plugin, cPluginManager.HOOK_BLOCK_TO_PICKUPS) LOGINFO("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() ) return true end function OnBlockToPickups(World, Digger, BlockX, BlockY, BlockZ, BlockType, BlockMeta, Pickups) Item = Pickups:Get( 0 ) Pickups:Clear() local Pickup = cItems(); Pickup:Add( Item ) World:SpawnItemPickups( Pickup, BlockX, BlockY, BlockZ, 0, 0, 0 ) end