Jump to content

طلب مسأعدة في حفظ قيمة الداتا


#Soking

Recommended Posts

السلام عليكم ورحمة الله وبركاته

حاولت احفظ الداتا والقيمة حقتها باستخدام

get/setAccountData

معرفت لاحد يحط لي روابط ومادري شو لاني شفت حق دا بيست وحاولت ومادري شو ماعرفت ياريت مساعده

Link to comment

كنت ابي جاهز بس مافي مشكلة حاولت اسويه ومازبط :D

addEventHandler('onPlayerQuit',root,function() 
local vAcc = getPlayerAccount(source) 
if not vAcc or isGuestAccount(vAcc) then return end 
setAccountData(vAcc,'NobsAcc',getElementData(source,"Nobs")) 
end 
) 
      
addEventHandler('onPlayerLogin',root,function(_,acc) 
    local v_Data = getAccountData(acc,'NobsAcc') 
    if ( v_Data ) then 
    setElementData(source, "NobsAcc",getAccountData(acc,'Nobs')) 
        end 
    end 
) 

Link to comment

addEventHandler('onPlayerQuit',root, 
 function (   ) 
  local vAcc = getPlayerAccount(source) 
  if not vAcc or isGuestAccount (vAcc) then return end 
  setAccountData(vAcc,'NobsAcc',getElementData(source,"Nobs")) 
   end 
 ) 
      
addEventHandler('onPlayerLogin',root, 
 function(_,acc) 
    local v_Data = getAccountData(acc,'NobsAcc') 
    if ( v_Data ) then 
    setElementData(source, "Nobs",getAccountData(acc,'NobsAcc')) 
        end 
    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...