I'm trying to create a plugin but it needs to give players items. How would I give a player lets say an ak47 and 2 of them?
Solved Giving a player an item using short prefab name?
Discussion in 'Rust Development' started by cookiecool, Feb 13, 2018.
-
Wulf Community Admin
Take a look at the Give, Kits, or various other plugins that give items.
-
Code:
player.GiveItem(global::ItemManager.CreateByItemID(-1224598842)); or alternatively you could use
Code:var item = ItemManager.CreateByItemID(523855532, 1); item.MoveToContainer(player.inventory.containerWear);
Last edited by a moderator: Feb 13, 2018 -
-
Code:
Item one = ItemManager.CreateByName("rifle.ak", 1); Item two = ItemManager.CreateByPartialName("rifle.ak", 1);
Wouldn't be a bad idea to get visual studio -