Klesh Posted May 9, 2011 Posted May 9, 2011 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
Aibo Posted May 9, 2011 Posted May 9, 2011 client-side Thanks for any help. client-side https://wiki.multitheftauto.com/wiki/RU/ ... Scoreboard all scoreboard exported functions are server-side.
Klesh Posted May 9, 2011 Author Posted May 9, 2011 Not Works, i change it to server-side stil no works, the money no appears.
Castillo Posted May 9, 2011 Posted May 9, 2011 client-side Thanks for any help. client-side https://wiki.multitheftauto.com/wiki/RU/ ... Scoreboard all scoreboard exported functions are server-side. That's not true, i've created columns in client-side using the exported functions from the Scoreboard.
Castillo Posted May 9, 2011 Posted May 9, 2011 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.
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