• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction To which city we are closest to. (nearest town)

Seminari

Banned User
Joined
Dec 13, 2009
Messages
1,496
Reaction score
34
Location
Poland
You must have this function:
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
 
Back
Top