• 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!

[LUA] How to do a good doShowTextDialog

Dantarrix

Member
Joined
Aug 27, 2010
Messages
546
Reaction score
18
Location
Stgo, Chile
Well, like title say, i want to learn how to do a good Text Dialog....
With tables and all stuff....

I have a basic lua knowledge....
 
LUA:
local text = "Hello world"
function onUse(cid, item, fromPosition, itemEx, toPosition)
     return doShowTextDialog(cid, ITEMID OF IMAGE, text) 
end
 
Oks, thank you....
Now, i have another doubt.....
I want to do a table like this:
Name --(space) -- Value

For an item catalog, how i do that??? How i make 2 columns and write in them???
Thank you
 
LUA:
local texts = {
{name1, value1},
{name2, value2},
{name3, value3},
{name4, value4}
}
local text = ""
function onUse(cid, item, fromPosition, itemEx, toPosition)
	for i = 1, #texts do
		text = text .. texts[i][1] .."       ".. texts[i][2] .."\n"
	end
	return doShowTextDialog(cid, 2222, text)
end
 
Back
Top