Hello
I would like this function teleport summon but it doesnt work.
Im using tfs 0.2.11pl2
Please help!
I would like this function teleport summon but it doesnt work.
Im using tfs 0.2.11pl2
function onSay(cid, words, param)
local pid = getCreatureSummons(cid)
local summonPos, playerPos = getThingPos(pid), getThingPos(cid)
local thisPlayer, thisSummon = {x = summonPos.x + 5, y = summonsPos.y, z = summonPos.z}, {x = playerPos.x - 5, y = playerPos.y, z = playerPos.z}
if getDistanceBetween(thisPlayer, thisSummon) >= 5 then
doTeleportThing(pid, playerPos, true)
end
return true
end
Please help!