diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:53:22 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:53:22 +0300 |
| commit | c055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch) | |
| tree | 7ac98d865915930bebc86b36b512a859c31538e5 /Client/Functions/Client_CommanderUpgrade.sqf | |
| download | a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2 a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | Client/Functions/Client_CommanderUpgrade.sqf | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Client/Functions/Client_CommanderUpgrade.sqf b/Client/Functions/Client_CommanderUpgrade.sqf new file mode 100644 index 0000000..366fa31 --- /dev/null +++ b/Client/Functions/Client_CommanderUpgrade.sqf @@ -0,0 +1,34 @@ +private ["_i","_index","_index2","_name","_time","_upgrades"];
+_time = _this select 0;
+_index = _this select 1;
+_index2 = _this select 2;
+_name = _this select 3;
+isUpgrading = true;
+
+hint Format [localize "STR_WF_Upgrade_Start",_name];
+
+WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERUPGRADESCORE' Call GetNamespace)]];
+publicVariable 'WFBE_RequestChangeScore';
+if (!isMultiplayer || (isServer && local player)) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERUPGRADESCORE' Call GetNamespace)]] Spawn HandleSPVF};
+
+_i = _time;
+while {_i > 0} do {
+ _i = _i - 1;
+ upgradingTime = _i;
+ sleep 1;
+};
+_upgrades = (sideJoinedText) Call GetSideUpgrades;
+_upgrades Set [_index,_index2 + 1];
+Call Compile Format ["%1Upgrades = _upgrades; publicVariable '%1Upgrades';",sideJoinedText];
+upgradingTime = -1;
+isUpgrading = false;
+hint Format [localize "STR_WF_Upgrade_Complete",_name,_index2 + 1];
+WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index,(_index2 + 1)]];
+publicVariable 'WFBE_LocalizeMessage';
+if (!isMultiplayer || (isServer && local player) || local player) then {[sideJoined,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index,(_index2 + 1)]] Spawn HandlePVF};
+
+sleep 0.3;
+
+WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',['upgrade',sideJoined]];
+publicVariable 'WFBE_RequestSpecial';
+if (!isMultiplayer || (isServer && local player)) then {['SRVFNCREQUESTSPECIAL',['upgrade',sideJoined]] Spawn HandleSPVF};
|
