Stevenn Posted May 12, 2012 Posted May 12, 2012 Hello. I need some help. If I want to increase someones element data, like different levels how can I do that? function lol () setElementData ( source, "Rank", +1 ) end or something?
Castillo Posted May 12, 2012 Posted May 12, 2012 function lol ( ) setElementData ( source, "Rank", tonumber ( getElementData ( source, "Rank" ) ) or 0 + 1 ) end
Stevenn Posted May 12, 2012 Author Posted May 12, 2012 thank you, can i use setElementData without adding a column on scoreboard?
Booo Posted May 12, 2012 Posted May 12, 2012 thank you, can i use setElementData without adding a column on scoreboard? exports.scoreboard:addScoreboardColumn('Rank') function lol ( ) if getElementData ( source, "Rank" ) then setElementData ( source, "Rank", tonumber ( getElementData ( source, "Rank" ) ) + 1 ) else setElementData ( source, "Rank",0 ) end end
Stevenn Posted May 12, 2012 Author Posted May 12, 2012 I clearly said WITHOUT, please stop post hunting !
Castillo Posted May 12, 2012 Posted May 12, 2012 Of course you can, the scoreboard is just a resource that uses the element data.
Booo Posted May 12, 2012 Posted May 12, 2012 I clearly said WITHOUT, please stop post hunting ! np I just wanted to help you
Stevenn Posted May 12, 2012 Author Posted May 12, 2012 guiSetText ( rankLabel, "Rank: " ..getElementData (localPlayer, "Rank") ) doesn't work..
Stevenn Posted May 12, 2012 Author Posted May 12, 2012 I had a typo, fixed now. But if I want it to update my level every now and then, how would I do that? I know its with a timer, but I'm not so god with timers!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now