Forrest Posted November 6, 2012 Posted November 6, 2012 Right, I've been making a country on the scoreboard resource for my Race servers, but I seem to be having some problems. Here's my script.. exports.scoreboard:addScoreboardColumn('Country') function showcountry() local country = exports.admin:getPlayerCountry ( source ) if country then setElementData(source,"Home","..country..") else country = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) And I've got this in the admin group on the ACL, so..? Ps. I'm a complete noob, this is just something for me to learn, please go easy..
Castillo Posted November 7, 2012 Posted November 7, 2012 exports.scoreboard:addScoreboardColumn ( 'Country' ) function showcountry ( ) local country = ( exports.admin:getPlayerCountry ( source ) or "N/A" ) setElementData ( source, "Country", country ) end addEventHandler ( "onPlayerJoin", getRootElement(), showcountry ) 1: Your colum name is 'Country' not 'Home'. 2: The dots in setElementData and the quotes aren't required at all.
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