How would I check if a player has a certain amount of one material and taking it? Also if you were setting a building block build grade to stone how would you check the price of the stone foundation upgrade before it happens?
Solved Checking if a player has a certain amount of materials
Discussion in 'Rust Development' started by cookiecool, Feb 6, 2018.
-
1. Checking a player's inventory and removing a certain item if it was found.
2. Using an Oxide API hook. (or getting the method yourself xD)Last edited by a moderator: Feb 6, 2018 -
@cookiecool it's actually not funny, all what you want is already exists.
-
-
BGrade
You can also just decompile the rust files since its doing the exact same thing when you want to craft something. Its checking if you have the items. -
Code:
buildingBlock.blockDefinition.grades[playerGrade].costToBuild
-
Last edited by a moderator: Feb 6, 2018
-
-
Of course it's better if we all just write or show a complete code instead of you
As I see, it's useless to show you the right way. So yes, let just asking questions about every a string. -