1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

How to get rid of "this object is to heavy"

Discussion in 'DarkRP Modding Questions & Help' started by Ian®, Apr 26, 2015.

  1. Ian®

    Ian® New Member

    local mass = trace.Entity.RPOriginalMass and trace.Entity.RPOriginalMass or phys:GetMass()
    if mass > 9999999999999 then return false, DarkRP.getPhrase("object_too_heavy") end

    I changed it to that but I still get the same error. How can I remove the weight limit on pocketing items?
  2. Tomelyr

    Tomelyr Active Member

    hook.Add("canPocket", "test", function() return true end)
    Last edited: Apr 27, 2015
  3. Ian®

    Ian® New Member

    How would that help, its a test function?
  4. Tomelyr

    Tomelyr Active Member

  5. Ian®

    Ian® New Member

  6. PwndKilled

    PwndKilled Member

    Create a .lua file called heavypocket.lua file in autorun/server with this code.

    Code (Text):
    hook.Add("canPocket", "FuckHeavyObject", function() return true end)
  7. Ian®

    Ian® New Member

    Allowed players to be picked up.
  8. Tomelyr

    Tomelyr Active Member

    good. Now you know atleast what is does, right?

    then gonna make an Whitelist.
    local whitelist = {"weapon_ak47", "weapon_p228"}
    hook.Add("canPocket", "test", function(ply, ent) return table.HasValue(whitelist, ent:GetClass()) end)

Share This Page