function doCreatureSayWithDistance(cid, position, text, type)
oldPosX = setPlayerStorageValue(cid, 10000, getCreaturePosition(cid).x)
oldPosY = setPlayerStorageValue(cid, 10001, getCreaturePosition(cid).y)
oldPosZ = setPlayerStorageValue(cid, 10002, getCreaturePosition(cid).z)
oldPos = { x = getPlayerStorageValue(cid, 10000), y = getPlayerStorageValue(cid, 10001), z = getPlayerStorageValue(cid, 10002) }
doTeleportThing(cid, position, 0)
doCreatureSay(cid, text, type)
return doTeleportThing(cid, oldPos, 0)
end