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.
Solved Cleaning player inventory? (C#)
Discussion in 'Rust Development' started by PsychoTea, Sep 7, 2015.
-
Inventory Cleaner check it
-
-
Why everybody say "look in this plugin" instead of just saying how to do directly ?
It's a rule of the forum ? -
-
^ 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. -
And for example when I use
Code:void onEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { entity.(...) }
-
-
-
Wulf Community Admin
The Docs we provide now do need improvement, but they'll likely remain mostly Oxide-specific with generic examples. -
-
-
*Cheers*
Now I'm excited for doc updates
[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);
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 -
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. -
And which .dll files I must decompile ?
-
Located under RustDedicated_data/Managed/Assembly-CSharp.dll -
-
Wow it's very helpfull :^)Last edited by a moderator: Sep 7, 2015