Custom Coding: How to Give items to players and how to input variables as strings.

1 post / 0 new
Offline
Last seen: 1 week 5 days ago
Joined: 05/10/2014 - 22:11
Gems: 0
Custom Coding: How to Give items to players and how to input variables as strings.

First things first, I need to know how to give someone something with cuustom code using the items ID.

Example: Give someone a stone block, but using the ID 1 not minecraft:stone

Example: Give someone a command block, but using the ID 137 not minecraft:command_block

If possible I would like the code to look something like this, but in programming languages:

add ID to inventory

 

Next:

How do you make a variable a string in custom code, like if ID (above) was represented by the number variable n?

soooo...

add n to inventory

 

Anyway, erm, I can code BASIC, but that won't get me anywhere, soo... help?

P.S., if this is in the wrong section, please notify me.

P.P.S., you might as well just give the code for the example above.

P.P.P.S. and could there be one making the variable into damage for an item?

Edited by: Yosh on 10/06/2015 - 01:57