Help DarkRp Job Max

Hello guys, My name is Sergei if from Khazakstan and no understand english :с (25%)

Help me limit DarkRP job

Example: this limit 3 amm… i dont know :smiley: if online => 15 then max = 5 i dont understand :smiley:

TEAM_GANG = DarkRP.createJob(“Gangster”, {
color = Color(36, 36, 36, 255),
model = {
“models/player/Group03/Female_01.mdl”,
“models/player/Group03/Female_02.mdl”,
“models/player/Group03/Female_03.mdl”,
“models/player/Group03/Female_04.mdl”,
“models/player/Group03/Female_06.mdl”,
“models/player/group03/male_01.mdl”,
“models/player/Group03/Male_02.mdl”,
“models/player/Group03/male_03.mdl”,
“models/player/Group03/Male_04.mdl”,
“models/player/Group03/Male_05.mdl”,
“models/player/Group03/Male_06.mdl”,
“models/player/Group03/Male_07.mdl”,
“models/player/Group03/Male_08.mdl”,
“models/player/Group03/Male_09.mdl”},
description = [],
weapons = {“weapon_fists”},
command = “gangster”,
max = 3, – this limit 3 amm… i dont know :smiley: if online => 15 then max = 5 i dont understand :smiley:
salary = 65,
admin = 0,
vote = false,
category = “Criminal”,
})

this limit 3 amm… i dont know :smiley: if online => 15 then max = 5 i dont understand :smiley:




max = 0.33 --if 15 players are on, 33% so almost 4 or 5 players can become that job



I am really unsure if this works, someone correct me if I am wrong

my friendly write me this

max = (#player.GetAll() > 14 and 5 or 3),

But this will only be 1 time when the server is started, it is necessary to repeat this action as always i dont know :frowning:

You should go with the setting I told you, it is way more efficent,
if you want to make a specific number of slots availible on a specific number of players online you would have to make some functions outside jobs.lua

This is right, go with this option.