Skip to content

Commit

Permalink
disable ranked mode parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
McDiod committed Feb 3, 2017
1 parent fc07a1b commit f8c8e94
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
8 changes: 8 additions & 0 deletions cfgParams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,12 @@ class Params {
texts[] = {"On", "Off"};
default = true;
};

class RankedMode
{
title = "Ranked Mode";
values[] = {1,0};
texts[] = {"On","Off"};
default = 1;
};
};
2 changes: 2 additions & 0 deletions initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CAMPTIME = "CampProtection" call BIS_fnc_getParamValue;
RANDOMTEAMS = ("RandomTeams" call BIS_fnc_getParamValue) == 1;
TEAMSIZE = "TeamSize" call BIS_fnc_getParamValue;
SAMEALTCHANNEL = ("SameAltChannel" call BIS_fnc_getParamValue) == 1;
RANKEDMODE = ("RankedMode" call BIS_fnc_getParamValue) == 1;

//Settings
PLAYAREAMINSIZE = 100;
Expand All @@ -48,6 +49,7 @@ publicVariable "CAMPTIME";
publicVariable "RANDOMTEAMS";
publicVariable "TEAMSIZE";
publicVariable "SAMEALTCHANNEL";
publicVariable "RANKEDMODE";
publicVariable "PLAYAREAMINSIZE";
publicVariable "PLAYAREAMAXSIZE";
publicVariable "MUZZLEATTACHMENTPROB";
Expand Down
16 changes: 9 additions & 7 deletions server/endGame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ params ["_winner"];
//start game end procedure on clients
[getPos _winner, _winner] remoteExec ["mcd_fnc_endingCeremony", 0, false];

//update stats
_startTime = serverTime;
_stats = [] call mcd_fnc_updateLeaderboard;
_compiledStats = [_stats] call mcd_fnc_compileForGRADScoreboard;
if (RANKEDMODE) then {
//update stats
_startTime = serverTime;
_stats = [] call mcd_fnc_updateLeaderboard;
_compiledStats = [_stats] call mcd_fnc_compileForGRADScoreboard;

//show on clients
sleep 10;
[_compiledStats] remoteExec ["mcd_fnc_showGRADScoreboard",0,false];
//show on clients
sleep 10;
[_compiledStats] remoteExec ["mcd_fnc_showGRADScoreboard",0,false];
};

//end mission
sleep 24;
Expand Down

0 comments on commit f8c8e94

Please sign in to comment.