Jump to content

طلب شرج كود


Recommended Posts

لاهنتو ممكن شرح الكود ذا

function xmlFile ( find ) 
    if ( find == true ) then 
        setElementData ( localPlayer, "checkbox", true ) 
    else 
        setElementData ( localPlayer, "checkbox", false ) 
    end 
    xmlFileName = "login.xml" 
    local xmlFile = xmlLoadFile ( xmlFileName ) 
    if not ( xmlFile ) then 
        xmlFile = xmlCreateFile ( xmlFileName, "checkbox" ) 
        xmlNodeSetAttribute ( xmlFile, "savecheckbox", tostring ( getElementData ( localPlayer, "checkbox" ) ) ) 
    end 
    xmlNodeSetAttribute ( xmlFile, "savecheckbox", tostring ( getElementData ( localPlayer, "checkbox" ) ) ) 
    xmlNodeSetAttribute ( xmlFile, "username", tostring ( guiGetText ( Edit_user ) ) )  
    xmlNodeSetAttribute ( xmlFile, "password", tostring ( guiGetText ( Edit_pass ) ) )  
    xmlSaveFile ( xmlFile ) 
    xmlUnloadFile ( xmlFile ) 
end 
  
function getUserNameAndPass (   ) 
    xmlFileName = "login.xml" 
    local xmlFile = xmlLoadFile ( xmlFileName ) 
    if ( xmlFile ) then 
        status = xmlNodeGetAttribute ( xmlFile, "savecheckbox" ) 
    end 
    if ( status == "true" ) then 
    local username = tostring ( xmlNodeGetAttribute ( xmlFile, "username" ) ) 
    local password = tostring ( xmlNodeGetAttribute ( xmlFile, "passWord" ) ) 
        if not ( username == "" ) and not ( password == "" ) then 
        guiCheckBoxSetSelected ( auto, true )  
        guiSetText ( Edit_user, username )  
       guiSetText ( Edit_pass, password ) 
    end 
  end 
end 
  

و مثال اخر نستخدم فيه

xml

يعني مثل الاكواد ذي

و شكرا :roll:

Link to comment

م اعرف اشرحه بالتفصيل لأن من الاساس فيه اشياء فالكود لسا م اعرفها , ومنها الاكس ام ال

خلاصة الكود انه يحفظ لك اليوزر والباسوورد تقريباً على حسب اللي شايفه انا , والاكس ام ال فايدتها انها تحفظ لك الاشياء مثل الاس كيو ال بس اظنها اسهل

هذا اللي اعرفه , وإنتظر إفادة الاخوان :wink:

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