So I had an idea, but I had to make some restrictions to make use of it. I can't get it to work, I've tried alot, but I guess it's because I don't really know what I am doing :P
function onUse(cid, item, frompos, item2, itemEx, topos)
player1pos = getCreaturePosition(cid)
player1 =...