You must have this function:
http://otland.net/f163/lua-function-determination-nearest-town-town-closest-us-153316/#post1477905
And talkaction is:
http://otland.net/f163/lua-function-determination-nearest-town-town-closest-us-153316/#post1477905
And talkaction is:
LUA:
function onSay(cid, words, param, channel)
if(param == '') then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
end
local t = string.explode(param, ",")
if((not t[1]) or (not t[2]) or (not t[3])) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
end
poz = getPlayerPosition(cid)
lol = getNajblizej(poz)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The nearest town is: ".. lol[1] ..", distance is: ".. lol[2] .."")
return true
end