• logo_cipsoft
    Nowe serwery zostały otwarte 27 Paź 2025:
    Idyllia (Optional PvP) Hostera (Open PvP) us_logo Dracobra (Open PvP)

[8.1-8.6]Sprawdzanie wszytkich funckji silnika

Status
Zamknięty.

Aragornkk

Senior User
Ot?? coraz wi?cej os?b prosi o funkcje odpowiadaj?c? za co?.Skrypt nie daje nam parametr?w ale parametry mo?na znale?? wklejaj?c chcian? funkcje do Google. UWAGA: Nie pokazuje funkcji mySQL.


Autorem pierwotnym jest Capaverde (niestety nie posiadam linku do jego dzie?a)
link do skryptu umie?ci? Rahim,ale nie ka?dy go widzia?.


To jest skrypt actions, ale lepiej aby by?o to w funkcjach(lepsze rozpoznanie)
Kod:
-- a Capaverde's production
local function sittable(k,v)
table.insert(tabela,{k,v})
end
local function sorttable(a,b) -- tried to put it into alphabetical order
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

Wszelkie b??dy jakie macie mo?ecie zg?asza? w tym temacie, ja w miar? moich mo?liwo?ci spr?buje je rozwi?za?.
 
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Od?nie?am, nikt nie przetestowa? skryptu? Dziwne bo dzia? request p?ka od takich pr??b. Wystarczy tylko wklei? do notatnika wynik skryptu a nast?pnie szukamy to co b?dzie nam potrzebne.
 
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Tzn.? Chodzi o to, ?e sprawdza jakie komendy s? na serwerze? Je?li tak to to jest lepsze:
PHP:
function getLuaFunctions()-- by Mock
	local str = ""
	for f,k in pairs(_G) do
		if type(k) == 'function' then
			str = str..f..','
		elseif type(k) == 'table' then
			for d,o in pairs(k) do
				if type(o) == 'function' then
					if f ~= '_G' and d ~= "_G" and f ~= 'package' then
						str = str..f.."."..d..','
					end
				elseif type(o) == 'table' then
					for m,n in pairs(o) do
						if type(n) == 'function' then
							if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then
								str = str..f.."."..m..","
							elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
								str = str..f.."."..d..'.'..m..','
							end
						elseif type(n) == 'table' then
							for x,p in pairs(n) do
								if type(p) == 'function' then
									if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..x..','
									elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..x..','
									elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f..'.'..m..'.'..x..','
									elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..m..'.'..x..','
									end
								end
							end
						end
					end
				end
			end
		end
	end
	return string.explode(str,',')
end

local k = getLuaFunctions()
--- Create file content your server function list
local file__ = io.open('Your Server Function List.txt','w')
table.sort(k)
for i=1,#k do
    if k[i] ~= "" then
        file__:write((i-1)..' - '..k[i]..'\n')
    end
end
file__:close()
Made by Mock ;)
 
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Don Muha
No ba pewnie ?e lepsze tylko ?e to co ty poda?e? zosta?o napisane stosunkowo niedawno a to co ja wklei?em pojawi?o si? ju? za czas?w pierwszych TFS?w. Nie zadzia?a to w starszych wersjach silnik?w 0.3.5 w d??.


Yondaime
Wklejasz tak jak zwyk?y skrypt actions a nast?pnie u?ywasz tego przedmiotu jaki sobie wybra?e? i masz wszystkie komendy kt?re posiadasz w silniku ( nie ma tych zwi?zanych z MYSQL)
 
Status
Zamknięty.
Back
Do góry Bottom