в мете:
<file src="filename.ext" download="false"/>
в клиентском файле:
files ={
{"filename1.ext1", id},
"filename2.ext2"
}
addEventHandler("onClientResourceStart", root,
function()
for _, i in pairs(files) do
if type(i)=="table" then
downloadFile(i[1])
else downloadFile(i)
end
end
end, true, "high")
function engine(name, id)
if string.match(name, ".txd") then
engineImportTXD(engineLoadTXD(name), id)
elseif string.match(name, ".dff") then
engineReplaceModel(engineLoadDFF(name, id), id)
elseif string.match(name, ".col") then
engineReplaceCOL(engineLoadCOL(name), id)
end
end
addEventHandler("onClientFileDownloadComplete", root,
function(file)
for __, u in pairs(files) do
if type(u)=="table" and file==u[1] then
engine(file, u[2])
--elseif file==u then outputChatBox(u)
end
end
fileDelete(file)
end)