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.

F4 itmes are not owned

Discussion in 'DarkRP Modding Questions & Help' started by Dookin Foof Lord, Jun 12, 2020.

  1. Dookin Foof Lord

    Dookin Foof Lord New Member

    Hay im not the best at using lua but i've got a problem with this file not working on items in the f4 menu that are bought buy the player

    Code (Text):
    local entTable = {
                    [""] = true,
                    [""] = true
    }

    hook.Add("playerBoughtCustomEntity", "SetOwnerOnEntBuy", function(ply, enttbl, ent, price)



        if entTable[ent:GetClass()] then          --Check table of entities
        ent:CPPISetOwner(ply)
        end

         

    end)
    Any help would be nice thanks :)
     
  2. Down

    Down New Member

    Make sure the file is put it in a lua/autorun/server folder
     
  3. Dookin Foof Lord

    Dookin Foof Lord New Member

    It is in that file, just it dont seems to be running probbly or even working at all
     

Share This Page