Garry's Mod

[HELP] with Lua

Submitted by Sparky148, , Thread ID: 236747

Thread Closed
05-03-2022, 04:02 AM
This post was last modified: 09-03-2022, 06:01 AM by Sparky148
#1
I need help figuring out why everyone can see these categories even though I've added the canSee and set it to certain roles

DarkRP.createCategory{

name = "Shipments",

categorises = "shipments",

startExpanded = true,

color = Color(0, 0, 0, 255),

canSee = function(ply) table.HasValue({TEAM_GUNDEALER, TEAM_SPECARMS}, ply:Team()) end,

sortOrder = 2

}

DarkRP.createCategory{

name = "Weapons",

categorises = "shipments",

startExpanded = true,

color = Color(0, 0, 0, 255),

canSee = function(ply) table.HasValue({TEAM_GUNDEALER, TEAM_SPECARMS}, ply:Team()) end,

sortOrder = 2

}

EDIT:
the f4 menu i was using was for some reason skipping the canSee function so i made a new one and its working perfectly now

RE: [HELP] with Lua

#2
Man u know a lua file "categories" not for shipments or weapons. It's for entites or jobs only.

See:
DarkRP.createCategory{
name = "Business",
categorises = "jobs",
startExpanded = false,
color = Color(0, 136, 145, 255),
canSee = function(ply) return true end,
sortOrder = 11,
}

RE: [HELP] with Lua

OP
#3
08-03-2022, 09:45 AM
heret1c Wrote:
Man u know a lua file "categories" not for shipments or weapons. It's for entites or jobs only.

See:
DarkRP.createCategory{
name = "Business",
categorises = "jobs",
startExpanded = false,
color = Color(0, 136, 145, 255),
canSee = function(ply) return true end,
sortOrder = 11,
}
yes I do its just easier to hide the entire folder in which the shipments and weapons are in than individually doing them it turned out anyway that the f4 menu i was using was for some reason skipping the can see function so i made a new one and its working perfectly now

Users browsing this thread: 1 Guest(s)