- Joined
- Aug 19, 2007
- Messages
- 4,941
- Solutions
- 11
- Reaction score
- 352
global.lua OR functions.lua:
This is the example Ive tested it with:
Code:
Requested by Serp:
http://otland.net/showthread.php?t=9949
Code:
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
Code:
Code:
function onSay(cid, words, param)
pos = {x=102,y=121,z=7}
return doCreatureSayWithDistance(cid, pos, "WORKING !!!", TALKTYPE_ORANGE_1)
end
Requested by Serp:
http://otland.net/showthread.php?t=9949