Admigo Posted September 19, 2011 Share Posted September 19, 2011 Hee all, I only need a country collum for my server now. I already looked into the admin pannel but i cant find the code. Can someone send me the code for GetPlayerCountry function for the collum? Thanks Admigo Link to comment
JR10 Posted September 19, 2011 Share Posted September 19, 2011 You don't need to make a new topic. https://community.multitheftauto.com/index.php?p= ... ls&id=1995 Link to comment
Admigo Posted September 19, 2011 Author Share Posted September 19, 2011 I used this resource and my scoreboard is starting in mtaserver.cfg. But when i load the files it says country lui error the resource scoreboard is not running. Pls help. Link to comment
JR10 Posted September 19, 2011 Share Posted September 19, 2011 You must start scoreboard first, put it before countryid. Link to comment
Admigo Posted September 19, 2011 Author Share Posted September 19, 2011 The script sux because nothing happens. Only the country collum is added in scoreboard with nothing in it:s So i need new code. Link to comment
Admigo Posted September 21, 2011 Author Share Posted September 21, 2011 Pls need fix! Link to comment
BinSlayer1 Posted September 21, 2011 Share Posted September 21, 2011 (edited) getting a player's country obviously requires getPlayerIP() I bet you didn't give the resource admin rights, even though you can clearly see in the resource's description @ community that you need to do so Edited September 22, 2011 by Guest Link to comment
DoKtoR Posted September 21, 2011 Share Posted September 21, 2011 (edited) maybe like this (when player join server) use: local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country",flag) and ofcourse add scoreboard collumn called "Country" @ onResourceStart. Edited September 21, 2011 by Guest Link to comment
TAPL Posted September 21, 2011 Share Posted September 21, 2011 local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country",flag) Link to comment
Admigo Posted September 21, 2011 Author Share Posted September 21, 2011 Why this dont work? Server Side: exports.scoreboard:addScoreboardColumn('Country') function addCountryScore () local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country","..flag..") end Link to comment
bandi94 Posted September 21, 2011 Share Posted September 21, 2011 the script won't start by himself exports.scoreboard:addScoreboardColumn('Country') function addCountryScore () local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) setElementData(source,"Country",flag) end addEventHandler("onPlayerJoin",getRootElement(),addCountryScore) Link to comment
Admigo Posted September 21, 2011 Author Share Posted September 21, 2011 Thanks for code but it dont work. The Country collum is blank:S Link to comment
Admigo Posted September 22, 2011 Author Share Posted September 22, 2011 Can someone give me a worked code pls:( Just i want to add country id into dxscoreboard,so you can see in scoreboard where someone lives. Example: Name Country Admigo NL Pls help me,i really need it for my server. 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