CupboardForFriends

Moved

Total Downloads: 3,116 - First Release: Dec 28, 2015 - Last Update: May 6, 2017

5/5, 16 likes
  1. Anyway to get this working with RustIO Friends instead of the old Friends API?

    Thanks!
     
  2. I have extended the plugin to work also with the RustIO Friends.
    @LaserHydra: I would very much appreciate if you merge it into your next update.
    The modified plugin works fine on our server.
    Feel free to test it.
     
  3. Works for me, but just to let you know, Incendiary rounds will still do damage if you shoot the ground next to it, and set the cupboard on fire. @GonzoTheThird
     
  4. Same for explosives rounds which can also start some kind of fire.
     
  5. Any update with the fire/explosive ammo destroying the cupboards? Players have realized this and have began to abuse it.
     
  6. any way so that if im admin i can auth on any ones cp's?
     
  7. Its possible but its not really the subject of this plugin.
     
  8. the MasterKey plugin would solve your reuqest:

    MasterKey for Rust | Oxide
     
  9. (19:12:59) | [Oxide] 19:12 [Error] Failed to initialize plugin 'CupboardForFriends v1.2.4' (InvalidCastException: Cannot cast from source type to destination type.)

    (19:12:59) | [Oxide] 19:12 [Debug] at Oxide.Plugins.CupboardForFriends.Loaded () [0x00000] in <filename unknown>:0

    at Oxide.Plugins.CupboardForFriends.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0

    (19:12:59) | [Oxide] 19:12 [Info] Unloaded plugin Cupboard for Friends v1.2.4 by LaserHydra
     
  10. NOP

    NOP

    I found a bug in the plugin. It may or may not have to do with having the "SafeHomes" plugin also installed, so only people with Priv's can damage things.

    Whenever someone places a cupboard, and I auth first on it, then de-auth, and then the owner re-auths on the cupboard -- they cant damage it, even tho they have priv's, are a friend, and originally placed a cupboard. Or some variant of those steps. Which could lead to unremoveable cupboards?

    Maybe it's not an issue -- just not working the way I would have expected?

    I addressed this nuance by making it so the ORIGINAL ENTITY/CUPBOARD owner can always destroy his own cupboards, regardless if he has privileges, etc.

    Modify the OnEntityTakeDamage method so It looks like this :

    Code:
    void OnEntityTakeDamage(BaseCombatEntity vic, HitInfo info)
            {
                if (!blockDamage)
                    return;
              
                if(vic != null && info != null && info?.Initiator != null && info?.Initiator?.ToPlayer() != null){
                    if(vic.OwnerID == info.Initiator.ToPlayer().userID){
                        return;
                    }
                }
    And If people want the ability for mods/admins to always have the ability to damage entitys, then modify the "TestForFriends" method so It looks like :

    Code:
            object TestForFriends(BuildingPrivlidge priviledge, BasePlayer player, bool isDamage = false)
            {
                DevMsg($"-------------------------------------------");
                DevMsg($"Any authed: {priviledge.AnyAuthed()}");
              
                if(player.net.connection.authLevel >= 1){
                    return null;
                }
    Cheers, hope this helps some others out!
     
  11. Fix for :
    Failed to initialize plugin 'CupboardForFriends v1.2.4' (InvalidCastException: Cannot cast from source type to destination type.) ?
     
  12. Somehow I can only damage the cupboard when NOT authed, it takes no damage when i am authed. Am I doing something wrong, or is the plugin broken?
     
  13. Laser ? Fix for (?):
    Code:
    09:04 [Info] CupboardForFriends was compiled successfully in 1737ms
    09:04 [Info] Loaded plugin Cupboard for Friends v1.2.4 by LaserHydra
    09:04 [Warning] [Cupboard for Friends] Generating new config file...
    09:04 [Error] Failed to initialize plugin 'CupboardForFriends v1.2.4' (InvalidCastException: Cannot cast from source type to destination type.)
    09:04 [Stacktrace]   at Oxide.Plugins.CupboardForFriends.Loaded () [0x00000] in <filename unknown>:0  at Oxide.Plugins.CupboardForFriends.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0
    09:04 [Info] Unloaded plugin Cupboard for Friends v1.2.4 by LaserHydra
    09:04 [Info] No previous version to rollback plugin: CupboardForFriends
    Code:
    Protocol: 1969
    Build Version: 1177.75
    Build Date: Thursday, March 02, 2017 6:06:11 PM
    Unity Version: 5.4.2f2
    Changeset: 19494
    Branch: /main
    Oxide Version: 2.0.3115
    Thanks and waiting for the fix ...
     
  14. Same problem
     
  15. Wulf

    Wulf Community Admin

    Wulf updated Cupboard for Friends with a new update entry:

    1.2.5

     
  16. No compiling rust experimental
     

    Attached Files:

    • 22.jpg
      22.jpg
      File size:
      7 KB
      Views:
      17
  17. Wulf

    Wulf Community Admin

    Download it again, missed a } removal. :p
     
  18. I get this error:
    Error while compiling: CupboardForFriends.cs(15,9): error CS0246: The type or namespace name `Plugin' could not be found. Are you missing `Oxide.Core.Plugins' using directive?
     
  19. Wulf

    Wulf Community Admin

    Grr, thought I got it all. One second. :p
     
  20. Wulf

    Wulf Community Admin

    Wulf updated Cupboard for Friends with a new update entry:

    1.2.6