Jump to content

تعديل كود


Recommended Posts

السلام عليكم

شباب انا ابي اشياء تنحفظ زي مود حفظ الفلوس بس ابيها انا الفوز والموت وكم مره جاب هنتر والنقاط وكذا ><

هذي الكود الي عدلتها من حفظ الفلوس

--By JBoy-- 
node = xmlLoadFile ("accounts.xml") 
  
function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) 
    if not (isGuestAccount (getPlayerAccount(source))) then 
        local accountData = getAccountData (theCurrentAccount, "wins") 
        if (accountData) then 
            local playerwins = getAccountData(theCurrentAccount, "wins") 
            setElementData(source, playerwins) 
             
        else 
     
        setElementData(source, 0) 
        end 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), playerLogin) 
  
function onQuit() 
    if not (isGuestAccount (getPlayerAccount (source))) then 
        account = getPlayerAccount (source) 
        if (account) then 
            setAccountData(account,"wins", tostring(getAccountData(source))) 
        end 
    end 
end 
addEventHandler("onPlayerQuit", getRootElement(), onQuit) 

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