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: 2523

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: 2523

Re: Overall Scoreboard Variables

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