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.

Need help with canSee

Discussion in 'Player General Chat' started by lelman, Jun 29, 2019.

  1. lelman

    lelman New Member

    I added a meth addon and a meth cook job, but I can't seem to get the canSee function to work, as all teams are able to see and buy the entities from the category

    category:

    DarkRP.createCategory{
    name = "Meth Equipment",
    categorises = "entities",
    startExpanded = true,
    color = Color(43, 150, 209, 255),
    canSee = function(ply) return table.HasValue({TEAM_METH}, ply:Team()) end,
    }

    job:

    TEAM_METH = DarkRP.createJob("Meth Cook", {
    color = Color(22, 175, 230, 255),
    model = {
    "models/player/hostage/hostage_01.mdl",
    "models/player/hostage/hostage_02.mdl",
    "models/player/hostage/hostage_03.mdl",
    "models/player/hostage/hostage_04.mdl"
    },
    description = [[You are the meth cook. Your job is to combine ingredients and create meth. Once you have made meth, find a NPC which will buy the meth off of you. Be careful though, if you're caught transporting meth you'll get arrested!]],
    weapons = {},
    command = "methcook",
    max = 2,
    salary = 45,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
    category = "Criminals"
    })

    Is this a bug or did I do something wrong? I get no errors, it's just simply still visible to all other jobs
     
    Matt4499 likes this.

Share This Page