Hello, can anyone help me make a way to allow only certain steamids to have access/view a class? Why im asking this is because I want admins to be allowed to have custom player models in-game. Right now I have two classes, One for me and one for a friend, that only allow superadmins (us) to get access to that job. Thats nice and all but I dont want the public (none admins) seeing these classes that are for us.
So I guess what im really asking is how can I make classes, that are for admins only, only visible on by admins on the Jobs menu of the F4 menu.
Thanks
-Isaiah
[url]http://wiki.darkrp.com/index.php/Donator_Job_configuration[/url]
[url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
And please for the love of god read stickys,
Please go to the DarkRP forums next time, I swear I'm gonna cry from all of these dumb darkrp threads.
You could also try the Faction approach.
[lua] TEAM_FACTIONNAME = AddExtraTeam("JOB TITLE", {
//^Change the FACTIONNAME to the name of the desired faction. Job title is the title of which will appear in F4-jobs.
color = Color(255, 242, 0, 255),
//^Color of job. This will influence colors of chat broadcasting and possibly the TAB color.
model = "models/player/soldier_stripped.mdl",
//^Player-model of the faction members. You may find exact paths in your garrysmod\models\player folder. USE .MDL.
description = [[UNIQ4f94a5ee355ed7a-nowiki-00000000-QINU]],
//^Description seen in the F4 menu when selecting or hovering the job.
weapons = {},
//^What weapon to start with? Example: "lockpick". Find more by using tab and reading the green notification.possible, example:
command = "FACTIONNAME",
//^The command to join the faction.
max = 5,
//^Max members in the job simultaneously.
salary = 120,
//^Salary
admin = 0,
//^Admin job? if so = 1
vote = false,
//^Require vote to join the job?
hasLicense = true,
//^Has a gun license? If not make = false
customCheck = function(ply)
return ply:SteamID() == "STEAM_0:1:11517492"
or ply:SteamID() == "STEAM_0:0:5971531"
or ply:SteamID() == "ADD"
or ply:SteamID() == "ADD"
or ply:SteamID() == "ADD"
or ply:SteamID() == "ADD"
or ply:SteamID() == "ADD"
or ply:SteamID() == "ADD"
end
//^SteamIDs of the members.
})
GM:AddGroupChat(function(ply) return ply:IsCP() end)
GM:AddGroupChat(TEAM_FACTIONNAME)
//^Faction name for your Group chat. Must be the same as above, mind capitals!
AddDoorGroup("FACTION NAME", TEAM_FACTIONNAME)
//^Faction name for door groups. TEAM_ must be the same as above, mind capitals![/lua]
I am not 100% sure if this works in DarkRp 5 because I don't run DarkRP.
But you should place this code in the file where all the other jobs are placed.
I found this here: [url]http://wiki.darkrp.com/index.php/DarkRP:Factions[/url]
You don't need all of that...
Just do;
[code]customCheck = function( ply ) return CLIENT or ply:SteamID == "STEAM_ID" end,
CustomCheckFailMsg = "You don't have the required SteamID to become this job."[/code]
[QUOTE=koz;43685135]You don't need all of that...
Just do;
[code]customCheck = function( ply ) return CLIENT or ply:SteamID == "STEAM_ID" end,
CustomCheckFailMsg = "You don't have the required SteamID to become this job."[/code][/QUOTE]
My bad, simple and straight to the point.
Works the same way as setting a job to a ULX group. But instead of a group, it's a Steam ID.
I also wish you luck with your DarkRP server IsaiahFeldt!
Thanks a bunch!
Sorry, you need to Log In to post a reply to this thread.