how to make sure that when you touch the subject appeared currency

I want to make sure that when my character approaches the barracks, they add money to him.
Help to make sure that when my character came up to the tree, it disappeared on the map and appeared in the inventory.