Currently, if you set a trap on a door and use that door, it triggers the trap.
It would seem when you set a trap it should not be triggered by the person who set it.
Ideally, it wouldn't be triggered by friends or clanmates.
Currently, if you set a trap on a door and use that door, it triggers the trap.
It would seem when you set a trap it should not be triggered by the person who set it.
Ideally, it wouldn't be triggered by friends or clanmates.
const string authPerm = "boobytraps.auth";On line 152, add:
permission.RegisterPermission(authPerm, this);On line 224, change the TryActivateTrap function definition to remove assigning the player object to null. This line should read:
void TryActivateTrap(uint Id, BasePlayer player)Starting at line 242, add the following three lines and another blank line (4 lines total):
if (HasPermission(player.UserIDString, authPerm))
if (player.IsBuildingAuthed())
return;
private bool HasAnyPerm(string userId) => (HasPermission(userId, explosivePerm) || HasPermission(userId, deployPerm) || HasPermission(userId, elementPerm) || HasPermission(userId, adminPerm) || HasPermission(userId, authPerm));