diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:57:23 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:57:23 +0300 |
| commit | 3533c3aa9393fc6350178b196c813dc636ec9cf6 (patch) | |
| tree | 2f96a879c3935dea18e73410926b03c7eef1a751 /Client/Functions/Client_GetIncome.sqf | |
| download | a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.gz a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.bz2 a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.zip | |
init
Diffstat (limited to 'Client/Functions/Client_GetIncome.sqf')
| -rw-r--r-- | Client/Functions/Client_GetIncome.sqf | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Client/Functions/Client_GetIncome.sqf b/Client/Functions/Client_GetIncome.sqf new file mode 100644 index 0000000..c3e2529 --- /dev/null +++ b/Client/Functions/Client_GetIncome.sqf @@ -0,0 +1,33 @@ +Private["_commanderTeam","_income","_incomeSystem","_side"];
+
+_side = _this;
+_incomeSystem = 'WFBE_INCOMESYSTEM' Call GetNamespace;
+_income = (_side) Call GetTownsIncome;
+
+switch (_incomeSystem) do {
+ case 2: {_income = round(_income /2)};
+ case 3: {
+ Private["_ply"];
+ _commanderTeam = (_side) Call GetCommanderTeam;
+ if (isNull _commanderTeam) then {_commanderTeam = grpNull};
+ _ply = round(_income * (((100 - (Call Compile Format ["%1CommanderPercent",_side]))/100)/maxPlayers));
+ if (_commanderTeam == group player) then {
+ _income = round((_income * ((Call Compile Format ["%1CommanderPercent",_side])/100)) / ('WFBE_INC_DIVIDE_COM' Call GetNamespace)) + _ply;
+ } else {
+ _income = _ply;
+ };
+ };
+ case 4: {
+ Private["_ply"];
+ _commanderTeam = (_side) Call GetCommanderTeam;
+ if (isNull _commanderTeam) then {_commanderTeam = grpNull};
+ _ply = round(_income * (100 - (Call Compile Format ["%1CommanderPercent",_side])) / 100);
+ if (_commanderTeam == group player) then {
+ _income = _ply + round((_income - _ply)*maxPlayers);
+ } else {
+ _income = _ply;
+ };
+ };
+};
+
+_income
\ No newline at end of file |
