HandyMan

Moved

Total Downloads: 1,669 - First Release: Mar 25, 2016 - Last Update: Feb 18, 2018

5/5, 15 likes
  1. MrMan submitted a new resource:

    HandyMan - AOE repair where you are allowed to build

    Read more about this resource...
     
  2. Hiya i like the idea, but i'm wondering if walls can be repaired while being raided? That would pretty much make the server only offline or C4 raid. If it does. i would use this plugin.
    Thanks for your reply :)
     
  3. MrMan updated HandyMan with a new update entry:

    1.0.1.2

     
  4. can high external wall's be repert ?

    ok first read the description then ask
     
    Last edited by a moderator: Mar 29, 2016
  5. Hello!
    I added to config:
    Code:
          "assets/prefabs/building/gates.external.high/gates.external.high.stone/gates.external.high.stone.prefab",
          "assets/prefabs/building/gates.external.high/gates.external.high.wood/gates.external.high.wood.prefab",
          "assets/prefabs/building/wall.external.high.stone/wall.external.high.stone.prefab",
          "assets/prefabs/building/wall.external.high.wood/wall.external.high.wood.prefab"
    but this not aoe repair.. any ideas?
     
  6. Code:
    10:13 [Error] Failed to call hook 'ChatCommand_HandyMan' on plugin 'HandyMan v1.0.1' (KeyNotFoundException: The given key was not present in the dictionary.)
    10:13 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,System.Boolean].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.ChatCommand_HandyMan (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    10:13 [Info] [BetterLoot] BetterLoot: Refreshed 12 containers (0 destroyed)
    
    this pops up by just doing /handyman before turning on
     
  7. Hey.
    Dose it work on Deployables, like auto turret
     
  8. will be nice to have this plugin with permission system included.
     
  9. It would be nice for deployables. :)
     
  10. Now with the decaye scaling fixed it would be very handy to get the high external wall repairing going :)
     
  11. Sometimes i get really spam hard in console by this error
    Code:
    (22:12:00) | [Oxide] 22:11 [Error] Failed to call hook 'OnStructureRepair' on plugin 'HandyMan v1.0.1' (InvalidCastException: Cannot cast from source type to destination type.)
    (22:12:00) | [Oxide] 22:11 [Debug]   at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    (22:12:02) | [Oxide] 22:11 [Error] Failed to call hook 'OnStructureRepair' on plugin 'HandyMan v1.0.1' (InvalidCastException: Cannot cast from source type to destination type.)
    (22:12:02) | [Oxide] 22:11 [Debug]   at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    (22:12:07) | [Oxide] 22:11 [Error] Failed to call hook 'OnStructureRepair' on plugin 'HandyMan v1.0.1' (InvalidCastException: Cannot cast from source type to destination type.)
    (22:12:07) | [Oxide] 22:11 [Debug]   at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    Also yeah would be nice to have the High External Walls in it ;)
     
  12. I get the same error and had to unload the plugin.
     
  13. This error comme from whe someone write just "/handyman"
    He need first time type "/handyman on" or "/handyman off".
    I'm looking how to fix it...
     
  14. Wulf

    Wulf Community Admin

    Try the below attachment, untested. The hook changed due to the Rust update.
     
  15. This fix doesn't work.

    But I have a big problem, I reload the server and oxide doesn't want load all of my plugin
    Could you help me please ?

    Error:
    Code:
    [Error] Failed to call hook 'ChatCommand_HandyMan' on plugin 'HandyMan v1.0.1' (KeyNotFoundException: The given key was not present in the dictionary.)
    (05:40:46) | [Oxide] 05:40 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,System.Boolean].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.ChatCommand_HandyMan (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: May 15, 2016
  16. Wulf

    Wulf Community Admin

    I'll take a more detailed look and see.
     
  17. Because if I type "/handyman on" the plugin work fine, I think variable need to be initialized.


    I have it,
    Code:
            private void ChatCommand_HandyMan(BasePlayer player, string command, string[] args)
            {
                if (args != null && args.Length >= 1)
                {
                    if (args[0].ToLower() == "on")
                    {                    playerPrefs_IsActive[player.userID] = true;
                    }
                    else
                    {
                        playerPrefs_IsActive[player.userID] = false;
                    }
                    dataFile.WriteObject(playerPrefs_IsActive);
                }
                else
                {
                    playerPrefs_IsActive[player.userID] = false;
                }            if (playerPrefs_IsActive[player.userID] == true)
                {
                    SendChatMessage(player, _ChatmessagePrefix, GetMsg("Hired", player.userID));
                }
                else
                {
                    SendChatMessage(player, _ChatmessagePrefix, GetMsg("Fired", player.userID));
                }
            }
    Now the code doesn't send problem.
    However, when someone put "/handyman" he turn off the plugin, and if he type "/handyman on" he trun on the plugin.
    Let met 5 - 10 to try something.
     
    Last edited by a moderator: May 15, 2016
  18. Wulf

    Wulf Community Admin

    That new error was a bug from the original, nothing to do with the broken hook. Most of that code isn't needed either. Try the version below:
     

    Attached Files:

  19. Code:
     [Oxide] 06:58 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,System.Boolean].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.ChatCommand (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HandyMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    Doesn't work
     
  20. Wulf

    Wulf Community Admin

    Please show the error above that, not only the debug info. I tested it before uploading it, no errors.