Hi, How can I make custom classes only visible to that one person in DarkRP
Here is my Code for the job, but it's visible to everyone :/
[CODE]TEAM_MAJOR = DarkRP.createJob("Pain Train", { -- Name
color = Color(0, 229, 255, 255), -- Team color
model = "models/conex/stickguy/stickguy.mdl", -- Player model
description = [[He is one with the sword.]], -- Job description
weapons = {"m9k_ump45", "m9k_knife", "m9k_damascus", "m9k_barret_m82", "m9k_usas", "m9k_dbarrel", "lightsaber", "m9k_m61_frag", "m9k_mp7","weapon_cbox"}, -- Additional weapons
command = "paintrain", -- Command to become the job
max = 1, -- Maximum amount of said job
salary = 45, -- Salary
admin = 1, -- Requires Admin? 1 for yes, 0 for no.
vote = false, -- Do they need to vote? true for yes, false for no.
hasLicense = false, -- Has a license
customCheck = function(ply) return ply:SteamID() == "STEAM_0:1:1234567" end
})[/CODE]
You'd have to mess with the menu itself, unless DarkRP has something for this.
[QUOTE=Nookyava;47401007]You'd have to mess with the menu itself, unless DarkRP has something for this.[/QUOTE]
You mean the F4 menu settings?
There is a setting in the DarkRP config for that, haven't tested, but it should do it:
GM.Config.hideNonBuyable = true
It's false by default.
[QUOTE=Newjorciks;47402199]There is a setting in the DarkRP config for that, haven't tested, but it should do it:
GM.Config.hideNonBuyable = true
It's false by default.[/QUOTE]
Unfortunately, I don't think this works for jobs after doing a quick search on the DarkRP repository.
[url]https://github.com/FPtje/DarkRP/search?utf8=✓&q=hidenonbuyable[/url]
Looks like you are going to have to copy and paste the f4menu module within the core DarkRP gamemode and paste it into a darkrpmodification, disable the default module, and then edit it through there.
Weird, I just tested it, when I set it to true the menu breaks completely, not showing any job, but even if it's false it still hides the job that I cannot use, don't know why it doesn't work for you.
Sorry, you need to Log In to post a reply to this thread.