I am currently developing a solo only server concept and want to achieve the following
Outline
- Single set exclusion by use of the TC
Check for tc priv
If no tc priv do any of the following (Configurable)
- Do not allow Lock
- Do not allow Unlock
- Disable opening doors alltogether (Even if you had been previously authorised through code)
- Disable opening entities such as furnaces and boxes
The configurable options above should nut out most possibilities of abuse.
Further forward you can also add
CanAssignBed = False for both people with and without tc
Rust Deny Access To doors when not approved on Cupboard
Discussion in 'Plugin Requests' started by virobeast, Mar 7, 2018.
-
Group limits has 2 failings that the request above addresses to prevent them being circumvented and with as little need for admin input as possible.
- De-authorise on cupboard place alternate lock for entrance
- Place and authorise additional locks for additional people before tc
-
General idea of what i wish to achieve, it is likely wrong but will give an idea.
Code:object CanUseLockedEntity(BasePlayer player, BaseLock door) { if (!initialized) return null; var parent = door.parentEntity.Get(true); var prefab = parent.LookupPrefab(); if (parent.IsOpen()) return true; { if (AllowedToBuild(player)) return true; } else return false; }
-
Achieved by adding the following to the shared doors plugin
Code:private bool CanOpenCodeLock(CodeLock door, BasePlayer player) { bool canUse = false; canUse = (player.CanBuild() && checker.IsPlayerAuthorized()); return canUse; } private bool CanOpenKeyLock(KeyLock door, BasePlayer player) { bool canUse = false; canUse = (player.CanBuild() && checker.IsPlayerAuthorized()); return canUse; }