Jump to content

Help Add On


Recommended Posts

Hello

I ask you to help me add the following code verification

CODE

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 --لوب للجدول لاحظار جميع القيم filePath 
            local file, ID = v [ 1 ], v [ 2 ]; -- متغير لقيم الجدول 
            if not modelID [ file ] then -- يتحقق ان الملف ليس بالجدول modelID 
                downloadFile ( file ); -- نحمل الملف 
                modelID [ file ] = ID; -- وقيمتها اي دي السيارى modelID نضع متغير بالجدول 
            end -- اغلاق التحقق ان الملف ليس موجود 
        end -- end تحتاج do اغلاق اللوب لان 
    end -- الغاء التحقق من التحميل الخاص بالسيرفر 
end -- checkTransfer اغلاق الوظيفة 
addEventHandler ( "onClientResourceStart", resourceRoot, checkTransfer ); -- وضع حدث عند تشغيل المود وربطه بفنشكن checkTransfer 
  
addEventHandler ( "onClientFileDownloadComplete", resourceRoot, -- حدث عند اكتمال التحميل 
    function ( file, success ) -- وظيفة للحدث 
        if success then  -- (ربما التحميل تجي فيه مشاكل) التحقق من نجاح عملية التحميل 
            local ID = modelID [ file ]; -- احظار الملف من الجدول 
            if ID then -- اذ كان موجود حقا 
                if string.find ( file, ".txd" ) then -- نتحقق ان اسم الملف به txd 
                    txd = engineLoadTXD ( file ); -- احظار txd 
                    engineImportTXD ( txd, ID ); -- تشغيل txd 
                end -- اغلاق التحقق من وجود اسم الملف txd 
                if string.find ( file, ".dff" ) then -- نتحقق ان اسم الملف به dff 
                    dff = engineLoadDFF ( file, ID ); -- احظار dff 
                    engineReplaceModel ( dff, ID ); -- تشغيل dff 
                end -- اغلاق التحقق من وجود اسم الملف dff 
                modelID [ file ] = nil; --  فارغة modelID وضع قيمة اللف بالجدول 
                
                local resourceName = getResourceName ( getThisResource (  ) ); -- احظار اسم المود الشغال حاليا 
                local file_ = fileCreate ( ":" .. resourceName .. "/" .. file ); -- صنع ملف 
                if file_ then -- يتحقق من نجاح عملية صنع الملف 
                    fileWrite ( file_, "This Private File .." ); -- كتابة بالملف 
                    fileClose ( file_ ); -- اغلاق الملف 
                end -- اغلاق التحقق من نجاح عملية صنع الملف 
            end -- اغلاق التحقق من وجود اسم الملف بالجدول modelID 
        end -- اغلاق تحقق من نجاح عملية التحميل 
    end -- اغلاق الوظيفة 
); -- (كل قوس فتح له قوس اغلاق تذكر هذا دائماً) قوس اغلاق الحدث 

Please add functionality isChekBoxTransfertActive With CODE

https://wiki.multitheftauto.com/wiki/Is ... rBoxActive

Link to comment
  • Moderators
bf9726bf80.png

You could edit the code ?

"You could edit the code ?" = a very arrogant way of asking somebody his help

Instead of that, you can ask it like this: "Can you pls help me with editing the code, so that I understand what I have to change?"

If you don't know anything about LUA, you shouldn't ask this in the first place, but follow a tutorial first, study examples and ask specific LUA questions.

Link to comment
bf9726bf80.png

You could edit the code ?

"You could edit the code ?" = a very arrogant way of asking somebody his help

Instead of that, you can ask it like this: "Can you pls help me with editing the code, so that I understand what I have to change?"

If you don't know anything about LUA, you shouldn't ask this in the first place, but follow a tutorial first, study examples and ask specific LUA questions.

Method of arrogance !!

My dear, I did not mean to be a very arrogant way because I do not speak English only used only do I use the translator

Link to comment

The man barley speaks any English give him a break, not his fault google translate translated it like so.

koko.m.t.a

badalaan min tahmil almilaffat min khilal albarnamaj alnnasi 'iidafatan ma yali 'iilaa milaff .meta alkhass bik

  
<download_priority_group>-1</download_priority_group> 

Link to comment
The man barley speaks any English give him a break, not his fault google translate translated it like so.

koko.m.t.a

badalaan min tahmil almilaffat min khilal albarnamaj alnnasi 'iidafatan ma yali 'iilaa milaff .meta alkhass bik

  
<download_priority_group>-1</download_priority_group> 

Possible your Skype account

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...