EXAMPLE: Lets say you wanted to add 32 diamonds to your inventory when you hit the ground with a stick heres the code:
function useItem(x,y,z,itemId,blockId,side) if(itemId==280);//Stick addItemInventory;(264,32)//Diamond Gem
Okay sooooo the function is already inputted when you generate a new script so ignore that and below that there something like another function with brakets just delete that and line up the "if(itemId==280)" with the last letters of the function and the 280 is the id for stick (you could change it to another item but sticks are the best) the "//Stick" can be whatever you want it just explains it then there are basic functions on each thing addItemInventory explode etc. after that the 264 is the item id for a diamond gem and the 32 is for the amount that will be added! hope I helped ask anymore questions you have!
pssssssss if you would want to add more than one item it would be
function useItem(x,y,z,itemId,blockId,side) if(itemId==280);//Stick addItemInventory;(264,32)//Diamond Gem addItemInventory;(itemOrblockID,amount)//Do this however many times you want
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
if you can teach me i will be grateful
Back to modding! Follow me on Twitter @byteandahalf
Back to modding! Follow me on Twitter @byteandahalf
function useItem(x,y,z,itemId,blockId,side)
if(itemId==280);//Stick
addItemInventory;(264,32)//Diamond Gem
Okay sooooo the function is already inputted when you generate a new script so ignore that and below that there something like another function with brakets just delete that and line up the "if(itemId==280)" with the last letters of the function and the 280 is the id for stick (you could change it to another item but sticks are the best) the "//Stick" can be whatever you want it just explains it then there are basic functions on each thing addItemInventory explode etc. after that the 264 is the item id for a diamond gem and the 32 is for the amount that will be added! hope I helped ask anymore questions you have!
pssssssss if you would want to add more than one item it would be
function useItem(x,y,z,itemId,blockId,side)
if(itemId==280);//Stick
addItemInventory;(264,32)//Diamond Gem
addItemInventory;(itemOrblockID,amount)//Do this however many times you want