TLArtic Posted June 23, 2014 Share Posted June 23, 2014 hey guys, me and my friend made a new Server Called: TL but there is one problem, we downloaded a resource to show the money in the scoreboard but when we start the resource it doesnt show me the money in the scoreboard and also not a tab for it. The code of it: exports [ "scoreboard" ]:addScoreboardColumn ( "Money", 3 ) -- Add the "Money" column to the scoreboard. function updatePlayersMoney ( ) -- Create "updatePlayersMoney" function. for index, player in ipairs ( getElementsByType "player" ) do -- Loop through all online players. setElementData ( player, "Money", getPlayerMoney ( player ) ) -- Set "Money" element data to the player money. end -- End our loop. end -- End our function. setTimer ( updatePlayersMoney, 2500, 0 ) -- Set a infinite 2.5 seconds timer to execute "updatePlayersMoney" function. i hope you guys can help me out Kind Regards, Artic 1 Link to comment
#1ERuPTiON Posted July 1, 2014 Share Posted July 1, 2014 Make sure you started scoreboard, and then again restarted the money resource. If that doesn't work, try this : exports [ "scoreboard" ]:addScoreboardColumn ( "Money", 3 ) function updatePlayersMoney ( ) for index, player in ipairs ( getElementsByType "player" ) do local money = getPlayerMoney ( player ) setElementData ( player, "Money", "$"..money ) end end setTimer ( updatePlayersMoney, 2500, 0 ) You forgot to add local money = getPlayerMoney ( player ) before setting the element data. You didn't specify "money" 1 1 Link to comment
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