Hello, I wonder what the command used in .lua item to give to a player.
I am very new and do not know anything.
I'm trying so player.inventory:GiveItem(global.ItemManager.CreateByItemID(hammer),1,true) , unfortunately most will not.
Can anyone help me? Thank U!
Give item to a player
Discussion in 'Rust Development' started by vitor.ag, Mar 2, 2015.
-
Wulf Community Admin
For Rust Experimental or Rust Legacy?
-
if for Rust Experimental:
local item = global.ItemManager.CreateByItemID(itemID,quantity,blueprint)
player.inventory:GiveItem(item, player.inventory.containerMain);
blueprint = true or false .... -
item = ItemManager.FindItemDefinition('hammer')
player.inventory.GiveItem(ItemManager.CreateByItemID(int(item.itemid), 1, False), player.inventory.containerMain) -
Rust Experimental, Thank you, It was a Great Help!