Jump to content

XML FILE


TD[M]ER

Recommended Posts

السسلام عليكمم

اخباركمم .. عساكم بخير %

دوم ي رب ...

المهم ي عيال انا سويت ملف XML

ومثلا سويت لوحةة فيها زر . مثلا نسخ سريال .

ابي لمن الاعب يظغط الـ زر يرسل سرياله على ملف الاكسمل

وكل شي ظابط بس ابي

لو ضغط مرهه ثانية وكان السريال موجود م ينظاف ثاني مرهه

كيف اسويه ؟

ذا الملف اللي سويتهه ذذ

            local Serial = xmlLoadFile("serials.xml") 
xmlNodeSetValue (xmlCreateChild ( Serial, "Name"), ""..getPlayerName(source).."" ) 
xmlNodeSetValue (xmlCreateChild ( Serial, "Serial"), ""..getPlayerSerial(source).."" ) 
xmlUnloadFile(Serial) 
xmlSaveFile(Serial) 

Link to comment

استخدم ذي الفنكشن

xml انا مو خبير في الـ

function isPlayerSerialInXML(playerSerial) 
    local file = xmlLoadFile("serials.xml") 
    local child = xmlFindChild(file,"Serial",0) 
    for i,serial in ipairs(xmlNodeGetAttributes(child)) do 
        if ( serial == playerSerial ) then 
            return true 
        end 
    end 
    return false 
end 

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