1. Hey.

    I was just wondering how to clear everything from a players inventory (including armour and stuff on toolbar) and couldn't find anything?!

    Anyway, how would I wipe a players inventory?
    Also, how would I give a player an item?

    Thanks, PsychoTea.
     
  2. Inventory Cleaner check it
     
  3. .... Download the give plugin open it and search what you want.
     
  4. Why everybody say "look in this plugin" instead of just saying how to do directly ?
    It's a rule of the forum ?
     
  5. One i was starting learning i asked 1000 times everyone how do this and other stuff.. then someone told me that its better to try alone than simply have the code copy pasted. We like helping others... well it isnt hard to open a plugin and search a bit.. this wont make u get cancer or stuff like that.
     
  6. ^ Learned from this method.

    If you teach yourself to fish, You will learn how to feed yourself for a life time.


    If everything is going to be given to you on a silver platter. How will you ever learn to do things your self. The smallest thing will break and you will hold up your platter again. Put the food on the platter yourself.
     
  7. Yeah but it's hard to find just what we want in a plugin.

    And for example when I use
    Code:
    void onEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
            {
                entity.(...)
            }
    How can I know methods of "entity" ?, it's not in doc.
     
  8. Another thing that we say many times "Decompile the Assembly with a Decompiler such as Telerik Decompile"
     
  9. tbh he's got a point, although i think a better solution may be improving the doc by adding (for example) the methods of "entity" or whatever. Alot of times i go to the doc and can't find what i'm looking for, only to find out it exists but isn't in the doc.
     
  10. Wulf

    Wulf Community Admin

    We're hoping to provide a full generated documentation for each game soon, but that won't be useful for users unfamiliar to it.

    The Docs we provide now do need improvement, but they'll likely remain mostly Oxide-specific with generic examples.
     
  11. As Wulf said.. the doc update is on the To-Do list.. one day you will have everything that exists in the Docs.
     
  12. Hum, I don't know how to do this, can you be more specific ?
     
  13. *Cheers*
    Now I'm excited for doc updates :D
    [DOUBLEPOST=1441649235][/DOUBLEPOST]Is it possible to give a player 2 items with 1 line of code and 1 variable?

    Eg
    Code:
    var starterKit = ItemManager.Merge(ItemManager.CreateByItemID((int)ItemManager.FindItemDefinition("rifle.bolt").itemid, 1, false), ItemManager.CreateByItemID((int)ItemManager.FindItemDefinition("rifle.ammo").itemid, 128, false));
    player.inventory.GiveItem(starterKit);
    Or would I have to do
    Code:
    var starterKitGun = ItemManager.CreateByItemID((int)ItemManager.FindItemDefinition("rifle.bolt").itemid, 1, false);
    var starterKitAmmo = ItemManager.CreateByItemID((int)ItemManager.FindItemDefinition("rifle.ammo").itemid, 128, false);player.inventory.GiveItem(starterKitGun);
    player.inventory.GiveItem(starterKitAmmo);
     
    Last edited by a moderator: Sep 7, 2015
  14. Let me google that for you (Click it )
    Download the decompile program then you will be able to double click dlls.. then it will open. Once you open it you can use the Shift+F (Search) and find stuff like "heal" "damage" "entity" "teleport" and other keywords.
     
  15. And which .dll files I must decompile ?
     
  16. Check this screenshot!
    Located under RustDedicated_data/Managed/Assembly-CSharp.dll
     
  17. Isn't that the same thing hackers do to find exploits in the code and write hacks? o_O
     
  18. Thx for your help
    Wow it's very helpfull :^)
     
    Last edited by a moderator: Sep 7, 2015