GreenHell Modding
Search…
Welcome to the GreenHell Modding docs!
TUTORIALS
How to install GreenHellModLoader
How to install a mod
Mods in multiplayer
MODDING TUTORIALS
How to create a mod project
How to create an AssetBundle
CLIENT - CODE EXAMPLES
Reading private variables
Modifying private variables
Accessing the player instance
Giving items to a player
Modifying the inventory max weight
Unlocking everything in the Notepad
Disabling player movement
Toggling the mouse/cursor
Printing to the console
WEBSITE
Slugs
Powered By
GitBook
Giving items to a player
To give an item to a player you can use the
AddItemToInventory
method on the
Player
class.
Player
.
Get
().
AddItemToInventory
(
"Meat_Cooked"
);
Player
.
Get
().
AddItemToInventory
(
"Candy_bar_1"
);
Player
.
Get
().
AddItemToInventory
(
"Mouse_Meat_Cooked"
);
Player
.
Get
().
AddItemToInventory
(
"Bamboo_Spear"
);
You can find all in-game items in the ItemID enum.
In 1.5.2 there is more than 700 items!
CLIENT - CODE EXAMPLES - Previous
Accessing the player instance
Next - CLIENT - CODE EXAMPLES
Modifying the inventory max weight
Last modified
2yr ago
Copy link