local dir = \"mods\"
function loadMod(f, m)
local txdFile = dir..\"/\"..f..\".txd\"
local dffFile = dir..\"/\"..f..\".dff\"
local colFile = dir..\"/\"..f..\".col\"
if fileExists(txdFile) then
local txd = EngineTXD(txdFile)
if txd then
txd:import(m)
end
end
if fileExists(dffFile) then
local dff = EngineDFF(dffFile,m)
if dff then
dff:replace(m)
end
end
if fileExists(colFile) then
local col = EngineCOL(colFile)
if col then
col:replace(m)
end
end
end
Meta:
<oop>true</oop>
Az oopt engedélyezését metaban a </meta> elé rakd, és a xenius által írt funkciót így használhatod.
loadMod(filenév, objectId)
ha ezt külső resourceból szeretnéd használni, akkor a metaba még írd bele ezt.
<export function=\"loadMod\" type=\"client\"/>
a dir változó pedig egyértelműen a mappanév.