Skip to content

Commit

Permalink
Merge pull request #219 from OperationPandoraTrigger/Event2024_anpass…
Browse files Browse the repository at this point in the history
…ungen_2

Event 2024 Anpassungen 2
  • Loading branch information
formtapez authored Nov 23, 2023
2 parents ec77f6a + 1aedff2 commit 3228195
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addons/main/REVIVE/fn_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ DFUNC(SelfCare) =
// Var setzen
player setVariable ["OPT_isUnconscious", 0, true];
player setVariable ["OPT_isStabilized", 0, true];
player setVariable ["OPT_SpawnTime", time, false];
GVAR(OPT_isDragging) = false;
player setVariable ["OPT_isDragged", 0, true];

if (GVAR(Respawnzeitdynamisch)) then
{
// Respawnzeit setzen
setPlayerRespawnTime GVAR(Respawnzeit);
};

//Chat abschaltung bei Bewustlosigkeit
(findDisplay 46) displayAddEventHandler ["KeyDown", {_this call FUNC(keyUnbind)}];

Expand Down
1 change: 1 addition & 0 deletions addons/main/REVIVE/fn_clientInitEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ DFUNC(HandleDamage) =
_newPlayer setVariable ["OPT_isUnconscious", 0, true];
_newPlayer setVariable ["OPT_isStabilized", 0, true];
_newPlayer setVariable ["OPT_isDragged", 0, true];
_newPlayer setVariable ["OPT_SpawnTime", time, false];
_newPlayer allowDamage true;
_newPlayer setVariable ["tf_unable_to_use_radio", false];

Expand Down
18 changes: 18 additions & 0 deletions addons/main/REVIVE/fn_dialog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ GVAR(startzeit) = time;
} forEach _units;
};

//Dynamische Respawnzeit
if (GVAR(Respawnzeitdynamisch)) then
{
//Dynamische Respawnzeit
private _PlayerOnMapTime = player getVariable ['OPT_SpawnTime',GVAR(Respawnzeit)];
private _PlayerRespawnTime = GVAR(Respawnzeit) - (time - _PlayerOnMapTime);

// Respawnzeit setzen
if (_PlayerRespawnTime <= 0) then
{
setPlayerRespawnTime 10;
}
else
{
setPlayerRespawnTime _PlayerRespawnTime;
};
};

// Textausgabe über Medic entfernung
_MedicNearLabel_Meter ctrlSetText format ["%1", _hintMsg];

Expand Down
26 changes: 26 additions & 0 deletions addons/main/REVIVE/fn_initCBASettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,29 @@
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
{} // function that will be executed once on mission start and every time the setting is changed.
] call CBA_Settings_fnc_init;

[
QGVAR(Respawnzeitdynamisch), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting.
"CHECKBOX", // setting type
[
"Dynamische Respawn Zeit", // Pretty name shown inside the ingame settings menu. Can be stringtable entry.
"Dynamische Respawn Zeit aktivieren" + endl // Mouse-Over description of the above
],
"OPT Respawn", // Pretty name of the category where the setting can be found. Can be stringtable entry.
false, // Default value <BOOLEAN>
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
{} // function that will be executed once on mission start and every time the setting is changed.
] call CBA_Settings_fnc_init;

[
QGVAR(Respawnzeit), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting.
"SLIDER", // setting type
[
"Respawnzeit Spieler", // Pretty name shown inside the ingame settings menu. Can be stringtable entry.
"Maximale Respawn-Zeit [in s]" + endl // Mouse-Over description of the above
],
"OPT Respawn", // Pretty name of the category where the setting can be found. Can be stringtable entry.
[0, 1200, 900, 0], // [min, max, default, decimal]
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
{} // function that will be executed once on mission start and every time the setting is changed.
] call CBA_Settings_fnc_init;

0 comments on commit 3228195

Please sign in to comment.