Как сделать VIP / admin профессию?

Как сделать админ професию и сам отдел для админ професии

1 лайк

Чтобы это сделать, нужно использовать customCheck

То-есть

    customCheck = function(ply) 
        return table.HasValue({"admin"}, ply:GetUserGroup()) 
    end,
    CustomCheckFailMsg = "Вы не админ",
})

Там где admin, можно поставить запятую и написать “owner”, тем самым сделать админ профу.

Фулл код

TEAM_ADMIN = DarkRP.createJob("Администратор", {
    color = Color(230, 0, 0),
    model = "models/player/barney.mdl",
    description = [[ВЫ админ]],
    weapons = {},
    command = "admin",
    max = 99,
    salary = 400,
    admin = 1,
    vote = false,
    hasLicense = false,
    category = "Админы",
    canDemote = false,
    customCheck = function(ply) 
        return table.HasValue({"admin"}, ply:GetUserGroup()) 
    end,
    CustomCheckFailMsg = "Вы не админ",
})

Модель думаю сам знаешь как заменять.

1 лайк

Как можно сделать профессию, которую сможет использовать определенный игрок, который сможет выдавать к ней доступ?

table.HasValue({“STEAM_0:1:7099”} заменить Steam ID

TEAM_POLICE = DarkRP.createJob("Civil Protection", {
    color = Color(25, 25, 170, 255),
    model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
    description = [[The protector of every citizen that lives in the city.
        You have the power to arrest criminals and protect innocents.
        Hit a player with your arrest baton to put them in jail.
        Bash a player with a stunstick and they may learn to obey the law.
        The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
        The Battering Ram can also unfreeze frozen props (if enabled).
        Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
    command = "cp",
    max = 4,
    salary = GAMEMODE.Config.normalsalary * 1.45,
    admin = 0,
    vote = true,
    hasLicense = true,
    ammo = {
        ["pistol"] = 60,
    },
    category = "Civil Protection",
    customCheck = function(ply)
           return table.HasValue({"STEAM_0:1:7099"}, ply:SteamID())
    end,
    CustomCheckFailMsg = "Эта работа не для тебя бро",
})

what do u say about of my love?

Может быть интересно: