Jump to content

setElementData problem ?


Wei

Recommended Posts

use my script and change lvl and exp with you have

function onLogin (_,account) 
        setElementData(source, "Level", getAccountData(account, "lvl") or "Level 0 !") 
        setElementData(source, "EXP", getAccountData(account, "exp") or "0") 
end 
addEventHandler ("onPlayerLogin", root, onLogin) 
  
function onQuit() 
local account = getPlayerAccount(source) 
if not account then return end 
  if not isGuestAccount(account) then 
        setAccountData (account, "lvl", getElementData(source, "Level")) 
        setAccountData (account, "exp", getElementData(source, "EXP")) 
    end 
end 
addEventHandler ("onPlayerQuit", root, onQuit) 

Link to comment
When I use setElementData and I reconnect it is removed why ?

same as setAccountData

show your code

allready fix it. It wasn't anything wrong with a code. I've removed and install again server and now works. It wasn't working for any code!

Link to comment
When I use setElementData and I reconnect it is removed why ?

same as setAccountData

show your code

allready fix it. It wasn't anything wrong with a code. I've removed and install again server and now works. It wasn't working for any code!

well it's good that you did it by yourself

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