How does it all work.
Making many assumptions you'd have a database for players and in the players table there might be there items.
If so... All you have to do is delete the item from the player sending the item, and add it to the player who is accepting the item.
Doesnt sound too hard, but its probably more difficuilt than that if i cant tell how things work in your script.