[2] General Configuration
Command Details
Command_Name = 'bdoor',
Command_Restriction = false, -- Restricted permissions through server.cfg. If true, then restricted to '5S_DB_BarricadeCommand'. (More details in DOCUMENTATION)Permissions Command Details
To restrict permissions for the entire command, we use ACE Permissions,
Set
Command_Restrictiontotruein the configuration.Add this to the server.cfg. Make sure to change the group:
add_ace group.admin 5S_DB_BarricadeCommandBarricade Strengths
Barricade_Strengths = {
[1] = { -- [LEVEL]
Material = 'Wood', -- Options: 'Wood' OR 'Metal'
Setup_Time = 5, -- Seconds it takes to put up the barricades.
Kicks = 10, -- Seconds it takes to kick the door down.
Tool = true, -- True = Players can use a CROWBAR to open the barricaded door at 1.5x speed (must have weapon in hand).
Perms = 1, -- Permission type -- || 1 = Everyone || 2 = Custom || 'ACEPermissionTitle' = ACE Permissions || Check Documentation for details.
},
},Permissions Barricade Strengths
To restrict permission for speicifc strengths, we use ACE Permissions or Custom Permissions:
Enter the name of the ACE Group Title you want to set the permissions to.
(a)
Perms = 'barricadeLevel1'Set the permissions for that group in your server.cfg.
The Custom Permissions feature uses a server export. This allows you to connect your permissions/inventory system with this script. Create a server export in your personal script that will return TRUE or FALSE. You are given the Barricade Strength when the permissions check is called.
-- This custom permissions check is for the Barricade_Strengths feature.
-- Must be a SERVER export. Make sure your export returns a TRUE or FALSE value.
-- Set `Perms` to 2 in the Barricade_Strengths section to use this feature.
-- The function gives you the Barricade Strength number (1,2,etc...) the user is attempting to use. This allows you to set your own restrictions for each strength.
function Custom_Permissions_Check(BarricadeStrength)
-- FORMAT: return exports.RESOURCEname.FUNCTIONname()
endLast updated