1. I don't think returning a boolean value (true) will result in a good end with other plugins if they have the same hook CanOpenDoor mostly can break theyr hooks. So think about it :)
     
  2. It's the only way to allow it to open the doors though, this might lead to certain plugin capability issues in the future but not much you can do about it if you want an admin feature to be able to open every door. :(
     
  3. There is no issue.

    The only way to allow to admins open the doors is this way.
    It will not be a issue because i return nil when is not a admin to other plugins may interact as well as the default behavior of the door trigger / hooks.
     
  4. i was actually going to update my door unlocker/locker to do this ...
    you beat me to it.
    but as SPoocK said it's not very very good to use return true as it will brake other plugins.
    i'll put here the code that i was going to use.
    [DOUBLEPOST=1420750814][/DOUBLEPOST]
    Code:
    function PLUGIN:CanOpenDoor( player, door )
        -- Check if player is admin
        if player:GetComponent("BaseNetworkable").net.connection.authLevel == 2 then
            door:SetFlag(global.Flags.Locked,false)
            timer.Once(0.1, function() door:SetFlag(global.Flags.Locked,true) end)
        end
    end
    
    don't need to return nil. just do return, or just don't return anything, when you don't want to return.
     
  5. Heyeaa! First of all I want to say that I love your plugin! I have some suggestions and I would love to see these in your plugin if this is possible!

    My suggestions:

    • Toggle the unlock function with a command (So I can normally play as admin and don't accidentally open doors while raiding)
    Would love to hear from you!
     
    Last edited by a moderator: Jan 9, 2015
  6. it doesnt work for storage boxes? cause i would imagine that it would.
     
  7. Sorry, I incorrectly stated that the storage boxes don't work, it works great and fine! I was meant to just to say that I would love see that I could toggle it by using a command! :D
     
  8. yes that would be usefull indeed:p
     
  9. Yeah! Would love to see that! :D Hope this is possible and I could see this in the future! :p
     
  10. Since i have installed the Plugin all Players can open locked doors ???
     
  11. Wulf

    Wulf Community Admin

    Are all your players admin? That's the only way they can open doors, having authLevel 2 (aka owner).
     
  12. No, only i as Admin have authlevel 2. But the players can open looked doors ???
     
  13. No that is not possible, The plugin is very simple.

    But there is a bug on Rust (Not on the plugin) that when the server restarts all doors/boxes locked are bugged and anyone can open the locked doors and chests.
     
  14. Ok, perhaps this is the Reason.
     
  15. NexusBR updated Admin Door Unlocker with a new update entry:

    Added chat commands and console commands