1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Any custom printer is unbreakable

Discussion in 'DarkRP Modding Questions & Help' started by that1nub, Nov 22, 2017.

  1. that1nub

    that1nub New Member

    I have tried 3 addons now, each have the same issue. When I spawn a custom printer via the spawn menu, it is breakable with a gun, but when you buy it from the F4 menu, you cannot break it with any means. I did not make these addons, they are public ones, on the steam workshop. Has anyone else had this issue?
    --- Double Post Merged, Nov 22, 2017 ---
    I have seemed to fix it, but it makes the printers have no health, this is what I have modified:

    function ENT:OnTakeDamage(dmg)
    if self:IsOnFire() then return end

    self.damage = (self.damage or 100) - dmg:GetDamage()
    if self.damage <= 0 then
    self:Destruct()
    self:Remove()
    end
    end

    This is now:

    function ENT:OnTakeDamage(dmg)
    self:Destruct()
    self:Remove()
    end

    Is there any other solution?
     
    Last edited: Nov 22, 2017

Share This Page