Items Blocker

Prevents some items from being used for a limited period of time. With UI.

Total Downloads: 1,864 - First Release: Apr 11, 2017 - Last Update: Mar 12, 2018

5/5, 15 likes
  1. Help me to move the window unit weapons on the right side as You =)
     
  2. Read the faq. If it's too hard - here is the tool RustCui - Editor
    You can adjust the panel as you want it where, just remember to remove "," from anchors.
     
  3. ..........
    or you can copy code

    Code:
        "Use On Screen Panel": true,
        "On Screen Panel (shown if the block is active)": {
          "Minimum anchor": "0.650 0.021",
          "Maximum anchor": "0.830 0.135",
          "Color": "0 0 0 0.3"
        },
     
    Last edited by a moderator: Oct 2, 2017

  4. Thank You, really helped =)
     
  5. how to remove gui block alert from screen?
     
  6. "Use On Screen Panel": true, to >>false
     
  7. Im getting this spammed in console anyone have a clue why
    (21:17:29) | Failed to call hook 'CanWearItem' on plugin 'ItemsBlocker v3.1.0' (NullReferenceException: Object reference not set to an instance of an object)

    (21:17:29) | at Oxide.Plugins.ItemsBlocker.CanWearItem (.PlayerInventory inventory, .Item item) [0x00000] in <filename unknown>:0

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

    at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  8. Hm, strange. Gonna take a look.
     
  9. Is there a way to put different time of block on each gun
     
  10. my image wont change its stuck on the default rust icon


    Code:
    "Image (shown on On Screen Panel": {
          "Minimum anchor": "0.67 0.25",
          "Maximum anchor": "0.92 0.75",
          "Link to the image or file in the data folder": "https://s20.postimg.org/wqn6qglgt/image.jpg",
          "Opacity of the image": 0.4
        }
      },

    im also getting spammed with this in console

    Code:
    (13:42:23) | Failed to call hook 'OnReloadWeapon' on plugin 'ItemsBlocker v3.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    (13:42:23) | at Oxide.Plugins.ItemsBlocker.OnReloadWeapon (.BasePlayer player, .BaseProjectile projectile) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ItemsBlocker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
     
    (13:42:27) | Failed to call hook 'OnReloadMagazine' on plugin 'ItemsBlocker v3.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    (13:42:27) | at Oxide.Plugins.ItemsBlocker.OnReloadMagazine (.BasePlayer player, .BaseProjectile projectile) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ItemsBlocker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Nov 10, 2017
  11. wired. About the icon - unload the plugin,remove the file from the data, called ItemsBlocker.json, load the plugin back.
     
  12. ive tryed that still didnt work i event went as far as making a new folder in data called ItemsBlocker and trying to load the image from there and no luck
     
  13. Ok, this is wired. Just the data doesn't seems to be reloaded. Stop your server, remove the data file(oxide/data/ItemsBlocker.json) and check that the path in the config is correct.
    I'm gonna remade the way of handling the image data.
     
  14. Vlad-00003 updated Items Blocker with a new update entry:

    3.1.1

     
  15. Vlad-00003 updated Items Blocker with a new update entry:

    3.1.11


    [DOUBLEPOST=1510510833][/DOUBLEPOST]
    Update your plugin and if that wouldn't work(wich I actually think wont - cos on the first run it just uses the saved image) and run the ib.refresh command
     
  16. Failed to call hook 'OnReloadMagazine' on plugin 'ItemsBlocker v3.1.11' (ArgumentOutOfRangeException: Argument is out of range. Parameter name: index)
    at System.Collections.Generic.List`1[Item].get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemsBlocker.IsAmmoBlocked (.BasePlayer owner, .BaseProjectile proj) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemsBlocker.OnReloadMagazine (.BasePlayer player, .BaseProjectile projectile) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemsBlocker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  17. hm.... wired. code is taken from the game itself....
    Does it says the line? Does this error occur more then 1 time?
     
  18. the error disappeared
     
  19. more and more
    Code:
    22:39 [Error] Failed to call hook 'OnReloadMagazine' on plugin 'ItemsBlocker v3.1.11' (ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index)
    22:39 [Stacktrace]   at System.Collections.Generic.List`1[Item].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ItemsBlocker.IsAmmoBlocked (.BasePlayer owner, .BaseProjectile proj) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ItemsBlocker.OnReloadMagazine (.BasePlayer player, .BaseProjectile projectile) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ItemsBlocker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  20. For some reason I'm no longer getting the e-mails from the site... wired.
    Do you know what was going on? Or how to reproduce it? Cos I can't do that on my own...(