Overall Scoreboard Variables

Overall Scoreboard Variables

« posted: Feb 12, 2019, 12:40 PM »
Does anyone knows the overall scoreboard variables names (Death and Kills), so I could use it in a script?

Re: Overall Scoreboard Variables

« Reply #1 posted: Feb 13, 2019, 09:03 AM »
They're private variables in loadScoreboard.sqf, you wont be able to use them in scripts.

Re: Overall Scoreboard Variables

« Reply #2 posted: Feb 13, 2019, 08:01 PM »
Ok, thanks
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2538

Re: Overall Scoreboard Variables

« Reply #3 posted: Feb 13, 2019, 11:35 PM »
You must enable A3W_playerStatsGlobal = 1;

However if you do that, it will show the global scores on the leaderboard. If you want to keep it showing current round scores only, go in server\functions\fn_getScore.sqf and make this edit:

_global = param [2, false, [false]];

then you will be able to retrieve global scores in custom scripts like this:

Code: [Select]
_pKills = [_player, "playerKills", true] call fn_getScore;
_aiKills = [_player, "aiKills", true] call fn_getScore;
_deaths = [_player, "deathCount", true] call fn_getScore;

Re: Overall Scoreboard Variables

« Reply #4 posted: Feb 14, 2019, 05:40 PM »
The idea was to make a script that would reset those variables to 0, so players wouldn’t be able to know that I’m an admin just by the scoreboard, but I can only change those manually in the sql file, right?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2538

Re: Overall Scoreboard Variables

« Reply #5 posted: Feb 14, 2019, 08:09 PM »
Yes, I believe that would be the easiest solution.

Re: Overall Scoreboard Variables

« Reply #6 posted: Jun 15, 2019, 05:52 PM »
Hello, Thank you for your help.  I will post my question here, but since this is an older thread Ill start a new thread if nobody responds.

I would like the scoreboard to work as designed.   The scoreboard is divided into two sections   "Round" and "Overall" 

When I started, all I had was current round information in both "Round" and "Overall" sections.  restart of server set everything to 0.

Then I added,  A3W_playerStatsGlobal = 1;

That made both sections (Round and Overall) display total stats for the player on my server.  The values would hold thru server restart.

Then, I added    _global = param [2, false, [false]]; as discussed in this thread.

That put me back to where I started, both secions (Round and Overall) display round only information and all fields reset to 0 on restart.

I would really like to have the "round" section fields reset to 0 on restart, and the "overall' section to keep the total of players stats while on my server.

Can you please help?

thanks