|
1 | | -if (!isNil "savingClient" && {savingClient}) exitWith {hint "Your personal stats are being saved"}; |
2 | | - |
3 | | -[] call A3A_fnc_savePlayer; |
4 | | - |
5 | | - if (!isServer) exitWith {}; |
6 | | - if (savingServer) exitWith {"Server data save is still in progress" remoteExecCall ["hint",theBoss]}; |
7 | | - savingServer = true; |
8 | | - private ["_garrison"]; |
9 | | - ["countCA", countCA] call fn_SaveStat; |
10 | | - ["gameMode", gameMode] call fn_SaveStat; |
11 | | - ["difficultyX", skillMult] call fn_SaveStat; |
12 | | - ["bombRuns", bombRuns] call fn_SaveStat; |
13 | | - ["smallCAmrk", smallCAmrk] call fn_SaveStat; |
14 | | - ["membersX", membersX] call fn_SaveStat; |
15 | | - ["antennas", antennasDead] call fn_SaveStat; |
16 | | - //["mrkNATO", (markersX - controlsX) select {sidesX getVariable [_x,sideUnknown] == Occupants}] call fn_SaveStat; |
17 | | - ["mrkSDK", (markersX - controlsX - outpostsFIA) select {sidesX getVariable [_x,sideUnknown] == teamPlayer}] call fn_SaveStat; |
18 | | - ["mrkCSAT", (markersX - controlsX) select {sidesX getVariable [_x,sideUnknown] == Invaders}] call fn_SaveStat; |
19 | | - ["posHQ", [getMarkerPos respawnTeamPlayer,getPos fireX,[getDir boxX,getPos boxX],[getDir mapX,getPos mapX],getPos flagX,[getDir vehicleBox,getPos vehicleBox]]] call fn_Savestat; |
20 | | - ["prestigeNATO", prestigeNATO] call fn_SaveStat; |
21 | | - ["prestigeCSAT", prestigeCSAT] call fn_SaveStat; |
22 | | - ["dateX", date] call fn_SaveStat; |
23 | | - ["skillFIA", skillFIA] call fn_SaveStat; |
24 | | - ["destroyedCities", destroyedCities] call fn_SaveStat; |
25 | | - ["distanceSPWN", distanceSPWN] call fn_SaveStat; |
26 | | - ["civPerc", civPerc] call fn_SaveStat; |
27 | | - ["chopForest", chopForest] call fn_SaveStat; |
28 | | - ["maxUnits", maxUnits] call fn_SaveStat; |
29 | | - ["nextTick", nextTick - time] call fn_SaveStat; |
30 | | - /* |
31 | | - ["unlockedWeapons", unlockedWeapons] call fn_SaveStat; |
32 | | - ["unlockedItems", unlockedItems] call fn_SaveStat; |
33 | | - ["unlockedMagazines", unlockedMagazines] call fn_SaveStat; |
34 | | - ["unlockedBackpacks", unlockedBackpacks] call fn_SaveStat; |
35 | | - */ |
36 | | - ["weather",[fogParams,rain]] call fn_SaveStat; |
37 | | - ["destroyedBuildings",destroyedBuildings] call fn_SaveStat; |
38 | | - //["firstLoad",false] call fn_SaveStat; |
| 1 | +if (hasInterface) then { |
| 2 | + if (!isNil "savingClient" && {savingClient}) exitWith {hint "Your personal stats are being saved"}; |
| 3 | + [] call A3A_fnc_savePlayer; |
| 4 | +}; |
| 5 | + |
| 6 | +//Server only from here on out. |
| 7 | +if (!isServer) exitWith {}; |
| 8 | + |
| 9 | +if (savingServer) exitWith {"Server data save is still in progress" remoteExecCall ["hint",theBoss]}; |
| 10 | +savingServer = true; |
| 11 | +private ["_garrison"]; |
| 12 | +["countCA", countCA] call fn_SaveStat; |
| 13 | +["gameMode", gameMode] call fn_SaveStat; |
| 14 | +["difficultyX", skillMult] call fn_SaveStat; |
| 15 | +["bombRuns", bombRuns] call fn_SaveStat; |
| 16 | +["smallCAmrk", smallCAmrk] call fn_SaveStat; |
| 17 | +["membersX", membersX] call fn_SaveStat; |
| 18 | +["antennas", antennasDead] call fn_SaveStat; |
| 19 | +//["mrkNATO", (markersX - controlsX) select {sidesX getVariable [_x,sideUnknown] == Occupants}] call fn_SaveStat; |
| 20 | +["mrkSDK", (markersX - controlsX - outpostsFIA) select {sidesX getVariable [_x,sideUnknown] == teamPlayer}] call fn_SaveStat; |
| 21 | +["mrkCSAT", (markersX - controlsX) select {sidesX getVariable [_x,sideUnknown] == Invaders}] call fn_SaveStat; |
| 22 | +["posHQ", [getMarkerPos respawnTeamPlayer,getPos fireX,[getDir boxX,getPos boxX],[getDir mapX,getPos mapX],getPos flagX,[getDir vehicleBox,getPos vehicleBox]]] call fn_Savestat; |
| 23 | +["prestigeNATO", prestigeNATO] call fn_SaveStat; |
| 24 | +["prestigeCSAT", prestigeCSAT] call fn_SaveStat; |
| 25 | +["dateX", date] call fn_SaveStat; |
| 26 | +["skillFIA", skillFIA] call fn_SaveStat; |
| 27 | +["destroyedCities", destroyedCities] call fn_SaveStat; |
| 28 | +["distanceSPWN", distanceSPWN] call fn_SaveStat; |
| 29 | +["civPerc", civPerc] call fn_SaveStat; |
| 30 | +["chopForest", chopForest] call fn_SaveStat; |
| 31 | +["maxUnits", maxUnits] call fn_SaveStat; |
| 32 | +["nextTick", nextTick - time] call fn_SaveStat; |
| 33 | +/* |
| 34 | +["unlockedWeapons", unlockedWeapons] call fn_SaveStat; |
| 35 | +["unlockedItems", unlockedItems] call fn_SaveStat; |
| 36 | +["unlockedMagazines", unlockedMagazines] call fn_SaveStat; |
| 37 | +["unlockedBackpacks", unlockedBackpacks] call fn_SaveStat; |
| 38 | +*/ |
| 39 | +["weather",[fogParams,rain]] call fn_SaveStat; |
| 40 | +["destroyedBuildings",destroyedBuildings] call fn_SaveStat; |
| 41 | +//["firstLoad",false] call fn_SaveStat; |
39 | 42 | private ["_hrBackground","_resourcesBackground","_veh","_typeVehX","_weaponsX","_ammunition","_items","_backpcks","_containers","_arrayEst","_posVeh","_dierVeh","_prestigeOPFOR","_prestigeBLUFOR","_city","_dataX","_markersX","_garrison","_arrayMrkMF","_arrayOutpostsFIA","_positionOutpost","_typeMine","_posMine","_detected","_typesX","_exists","_friendX"]; |
40 | 43 |
|
41 | 44 | _hrBackground = (server getVariable "hr") + ({(alive _x) and (not isPlayer _x) and (_x getVariable ["spawner",false]) and ((group _x in (hcAllGroups theBoss) or (isPlayer (leader _x))) and (side group _x == teamPlayer))} count allUnits); |
|
0 commit comments