Jump to content

Help Add On


Recommended Posts

Posted

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

  • Moderators
Posted
bf9726bf80.png

You could edit the code ?

Watch your mouth, don't be so arrogant!

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted
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.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
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

Posted

calm down guys, @koko.m.t.a i already gave you the solution so try to do it by yourself.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
calm down guys, @koko.m.t.a i already gave you the solution so try to do it by yourself.

Dear No I do not have any programming experience

..

I have a conversation (ccw) and he said that I seek help from the following link

Posted

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> 

Wolf Inc Discord

Youtube channel
Github

Posted
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

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...