From c055d44dcdb87e8db49fb23e632fc086aa44cce6 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:53:22 +0300 Subject: init --- Client/Functions/Client_CommanderUpgrade.sqf | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Client/Functions/Client_CommanderUpgrade.sqf (limited to 'Client/Functions/Client_CommanderUpgrade.sqf') 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}; -- cgit v1.3.1