function loadMod(fajl, model, col)txd = engineLoadTXD(\'modellek/\'.. fajl ..\'.txd\')engineImportTXD(txd, model)dff = engineLoadDFF(\'modellek/\'.. fajl ..\'.dff\', 0)engineReplaceModel(dff, model)if col then col = engineLoadCOL(\'modellek/\'.. fajl ..\'.col\') engineReplaceCOL(col, model)endend
loadMod(\"fajlodneve\", kicserelendoobjectedidje, true)
<file src=\"modellek/fajlodneve.dff\"/>... és a többi
function loadMod(f, m)if fileExists(\'asd/\'.. f ..\'.txd\') thentxd = engineLoadTXD(\'asd/\'.. f ..\'.txd\')engineImportTXD(txd, m)endif fileExists(\'asd/\'.. f ..\'.dff\') thendff = engineLoadDFF(\'asd/\'.. f ..\'.dff\', m)engineReplaceModel(dff, m)endif fileExists(\'asd/\'.. f ..\'.col\') thencol = engineLoadCOL(\'asd/\'.. f ..\'.col\')engineReplaceCOL(col, m)endendloadMod(\"teszt\", 670)
local dir = \"mods\" -- mappa neve, ahol a modell találhatófunction loadMod(f, m)local txdFile = dir..\"/\"..f..\".txd\"local dffFile = dir..\"/\"..f..\".dff\"local colFile = dir..\"/\"..f..\".col\"if fileExists(txdFile) thenlocal txd = EngineTXD(txdFile)if txd then txd:import(m)endendif fileExists(dffFile) thenlocal dff = EngineDFF(dffFile,m)if dff then dff:replace(m)endendif fileExists(colFile) thenlocal col = EngineCOL(colFile)if col then col:replace(m)endendend
<oop>true</oop>
addEventHandler(\"onClientResourceStart\", resourceRoot, function()loadMod(\"teszt_object\", 4848)end