Jump to content

Scoreboard Trouble


Klesh

Recommended Posts

Hi community i make this script, that shows money on scoreboard but not show:

Here my code:

localPlayer = getLocalPlayer() 
  
function addColumns() 
     exports.scoreboard:scoreboardAddColumn("Money") 
     setElementData(localPlayer,"Money",0) 
end 
  
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addColumns) 
  
outputChatBox("Score Money System Reloaded",255,105,0) 
outputChatBox("Author: AlienBoss",255,105,0) 
  
local playermoney = getPlayerMoney(source) 
  
addEventeHandler("onResourceStart",getRootElement(getThisResource() ), 
function() 
         addEventHandler("onClientPlayerJoin",getRootElement(), updateplayerList) 
         addEventHandler("onClientPlayerLogin",getRootElement(), updateplayerList) 
         addEventHandler("onClientPlayerSpawn",getRootElement() , updateplayerList) 
         populateGridList() 
    end 
) 

client-side

Thanks for any help.

client-side

Link to comment

I don't know what your script should do, but i guess it should update the scoreboard money with your current, right?

localPlayer = getLocalPlayer() 
  
function addColumns() 
     exports.scoreboard:scoreboardAddColumn("Money") 
     setElementData(localPlayer,"Money",0) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addColumns) 
  
outputChatBox("Score Money System Reloaded",255,105,0) 
outputChatBox("Author: AlienBoss",255,105,0) 
  
function updateScoreboardMoney() 
local money = getPlayerMoney(localPlayer) 
setElementData(localPlayer,"Money",tonumber(money)) 
end 
setTimer(updateScoreboardMoney,1000,0) 

It should work.

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