Script !commands

NoFake
Por NoFake
em Lixeira Pública

NoFake

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/10/11Posts: 3

Aew Galera, To Precisando De Um Script De Talkaction Que Mostre Todos Os COmandos Do Ot. Tipo !commands Ou /commands.

 

Se Alguem Tiver Aew E Poder Me Mandar Agradeço.

 

Valeo.

Mulizeu

Programar ate cair os dedos
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 05/08/10Posts: 218Gênero: Masculino

Ve esse!

 

local config = {
guildTalksEnabled = getBooleanFromString(getConfigValue('ingameGuildManagement'))
}

function onSay(cid, words, param, channel)
local playerAccess, t = getPlayerAccess(cid), {}
for i, talk in ipairs(getTalkActionList()) do
	if(not talk.hide and playerAccess >= talk.access) then
		local tmp = talk.words:sub(1, 1):trim()
		if((guildTalksEnabled or (talk.words ~= "!joinguild" and talk.words ~= "!createguild")) and (tmp == "!" or tmp == "/")) then
			table.insert(t, talk)
		end
	end
end

table.sort(t, function(a, b) return a.access > b.access end)
local lastAccess, str = -1, ""
for i, talk in ipairs(t) do
	local line = ""
	if(lastAccess ~= talk.access) then
		if(i ~= 1) then
			line = "\n"
		end
		lastAccess = talk.access
	end
	str = str .. line .. talk.words .. "\n"
end

doShowTextDialog(cid, 2160, str)
return true
end

NoFake

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/10/11Posts: 3

Valeu, Funcionou Certinho. Brigadao Em... Rep :button_ok: pra Vc :D