Вот самый простой пример не требующий дополнительных библиотек и прочего:
TEAM_MOB = DarkRP.createJob("Mob boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[The Mob boss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficient crime organization.
He has the ability to break into houses by using a lockpick.
The Mob boss posesses the ability to unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.34,
admin = 0,
vote = false,
hasLicense = false,
category = "Gangsters",
customCheck = function(ply)
if not ply:GetPData("MobBoss", false) then
if ply:canAfford(5000) == false then
ply:ChatPrint("Вы не можете себе позволить покупку этой профессии за 5000$")
return false
end
ply:addMoney(-5000)
ply:SetPData("MobBoss", "1")
end
})
В качестве более совершенной альтернативы могу предложить: Job System | Job Employer NPCs · gmodstore
Он имеет поддержку покупки профессий за внутриигровую валюту и разблокирование профессий за время - из коробки.