Jump to content

DxScoreboard Add Country Collum?


Admigo

Recommended Posts

Posted

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

Posted

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.

Posted (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 by Guest
Posted (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 by Guest
Posted
local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) 
setElementData(source,"Country",flag) 

Posted

Why this dont work?

Server Side:

  
exports.scoreboard:addScoreboardColumn('Country')  
function addCountryScore () 
local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) 
    setElementData(source,"Country","..flag..") 
end 

Posted

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) 
  

Posted

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.

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