Jump to content

setElementData problem ?


Wei

Recommended Posts

Posted

When I use setElementData and I reconnect it is removed why ?

same as setAccountData

Diet with russian vodka, lose 3 days in one week !

Posted
When I use setElementData and I reconnect it is removed why ?

same as setAccountData

show your code

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

Posted

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) 

My ingame nickname : Ops!

-DeathMatch GameMode By Ops! : 5%

Posted
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!

Diet with russian vodka, lose 3 days in one week !

Posted
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

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

Posted

I'm wondering why do you set the same data, that is just useless in my opinion :roll: .

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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