Added function onTarget(cid, target)