descubra as funções que existem no seu global environment ingame, com essa action legal
local function sittable(k,v) table.insert(tabela,{k,v}) end local function sorttable(a,b) return string.byte(a[1],1) < string.byte(b[1],1) end function onUse(cid, item, frompos, item2, topos) tabela = {} table.foreach(_G,sittable) table.sort(tabela,sorttable) for k,v in ipairs(tabela) do if type(v[2]) == "function" then doPlayerSendTextMessage(cid,22,v[1]) end end return 1 end
se quiser ver as tables só substitua essa linha:
if type(v[2]) == "function" then
por
if type(v[2]) == "table" then
a mesma coisa para ver number, strings e threads
if type(v[2]) == "number" then -- number if type(v[2]) == "string" then -- string if type(v[2]) == "thread" then -- thread
espero q achem rox
~Capaverde