Add AdminByPass-Permission to locked vehicles?Solved

Hi,
is it possible to bypass the locked vehicles(copter, modular cars,..) if you have the permission for it?
Sometimes i would like to move a blocking modular car instead of just deleting it (and all its content..)

But after the "Can't Use"-Message, you can still see the owner.

Like this:

private object CanMountEntity(BasePlayer friend, BaseMountable entity)
        {			
            if (friend == null || entity == null) return null;
            var vehicleParent = entity.VehicleParent();
            if (vehicleParent == null || vehicleParent.IsDestroyed) return null;
            Vehicle vehicle;
            if (!vehiclesCache.TryGetValue(vehicleParent, out vehicle)) return null;
            if (AreFriends(vehicle.playerID, friend.userID)) return null;
            if (configData.globalS.preventDriverSeat && vehicleParent.HasMountPoints())
            {
                foreach (var allMountPoint in vehicleParent.allMountPoints)
                {
                    if (allMountPoint != null && allMountPoint.mountable == entity)
                    {
                        if (!allMountPoint.isDriver)
                        {
                            return null;
                        }
                        break;
                    }
                }
            }
            SendCantUseMessage(friend, vehicle);
			if (friend.IsAdmin)
				return null;
            return False;
        }

 

Maybe the same for the Hook "OnLootEntity", so admins can look into modular-car containers/fuel containers?

Updated

Thank you very much for this feature :)

Locked automatically