blitzshadow
New Member
- Joined
- Apr 16, 2015
- Messages
- 39
- Solutions
- 1
- Reaction score
- 1
Hello,
I got such problem with talkactions, other player talkactions work propertly, but God and Gm's commands doesent. Please anybody help me...
Thats console screen : http://s29.postimg.org/bgi0j968n/error.jpg
and thats my teleportmaster.lua file code:
I got such problem with talkactions, other player talkactions work propertly, but God and Gm's commands doesent. Please anybody help me...
Thats console screen : http://s29.postimg.org/bgi0j968n/error.jpg
and thats my teleportmaster.lua file code:
Code:
function onSay(cid, words, param, channel)
local tid = cid
if(param ~= '') then
tid = getPlayerByNameWildcard(param)
if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
return true
end
end
local pos = getPlayerTown(tid)
local tmp = getTownName(pos)
if(not tmp) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.")
return true
end
pos = getTownTemplePosition(pos)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".")
return true
end
pos = getClosestFreeTile(tid, pos)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return true
end
tmp = getCreaturePosition(tid)
if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
return true
end
Last edited by a moderator: