أكيد فيه طريقة ..
*فقط للإصدار 1.4
*تقدر تضيف مواتر إلى الجدول عشان تصير لها حماية
* لازم تكون الملفات في المود إلي فيه الكود نفسه
*فقط لملفات txd - dff
نفترض إن الملفات الي ماتبي أحد يزرفه يحمل إسم
433.txd - 433.dff
تروح الميتا وتسوي كذا:
"443.dff" download="false" />
"443.txd" download="false" />
بعدها تروح داخل الملف, وتستبدل أكواد الإستبدال بـ
filePath = {
{ "443.txd", 443 };
{ "443.dff", 443 };
-- { "filePath", ID };
};
modelID = { };
function checkTransfer ( )
if isTransferBoxActive ( ) == true then
setTimer ( checkTransfer, 1000, 1 );
else
for i, v in ipairs ( filePath ) do
local file, ID = v [ 1 ], v [ 2 ];
if not modelID [ file ] then
downloadFile ( file );
modelID [ file ] = ID;
end
end
end
end
addEventHandler ( "onClientResourceStart", resourceRoot, checkTransfer );
addEventHandler ( "onClientFileDownloadComplete", resourceRoot,
function ( file, success )
if success then
local ID = modelID [ file ];
if ID then
if string.find ( file, ".txd" ) then
txd = engineLoadTXD ( file );
engineImportTXD ( txd, ID );
end
if string.find ( file, ".dff" ) then
dff = engineLoadDFF ( file, ID );
engineReplaceModel ( dff, ID );
end
modelID [ file ] = nil;
local resourceName = getResourceName ( getThisResource ( ) );
local file_ = fileCreate ( ":" .. resourceName .. "/" .. file );
if file_ then
fileWrite ( file_, "This Private File .." );
fileClose ( file_ );
end
end
end
end
);
طيب وين تروح ملفات السيارات بعدين ؟
يعني الاحظ ان السيارات تبقى بالجهاز