Clientside display text option for weapon reload

This commit is contained in:
Glowbal 2015-03-08 16:56:57 +01:00
parent 358a95381b
commit d919c2436d
4 changed files with 20 additions and 3 deletions

View File

@ -14,7 +14,7 @@ class Extended_PostInit_EventHandlers {
class Extended_Take_EventHandlers {
class CAManBase {
class ACE_AmmoIndicatorReload {
clientTake = QUOTE(if (_this select 0 == ACE_player && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_3(_this select 0, vehicle (_this select 0), true)] call FUNC(checkAmmo)};);
clientTake = QUOTE(if !(GVAR(DisplayText)) exitwith {}; if (_this select 0 == ACE_player && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_3(_this select 0, vehicle (_this select 0), true)] call FUNC(checkAmmo)};);
};
};
};

View File

@ -17,3 +17,14 @@ class CfgPatches {
#include "CfgActions.hpp"
#include "RscInGameUI.hpp"
class ACE_Settings {
class GVAR(DisplayText) {
typeName = "BOOL";
isClientSetable = 1;
value = 1;
displayName = "$STR_ACE_reload_SettingDisplayTextName";
description = "$STR_ACE_reload_SettingDisplayTextDesc";
};
};

View File

@ -2,12 +2,12 @@
* Author: commy2
*
* Count the ammo of the currently loaded magazine or count rifle grenades. Play animation and display message.
*
*
* Argument:
* 0: The player (Object)
* 1: The vehicle (Object)
* 2: Skip the animation? Used after reloading (Bool)
*
*
* Return value:
* Nothing
*/

View File

@ -2,6 +2,12 @@
<!-- Edited with tabler - 2014-09-09 -->
<Project name="ACE">
<Package name="Reload">
<Key ID="STR_ACE_reload_SettingDisplayTextName">
<English>Check ammo on weapon reload</English>
</Key>
<Key ID="STR_ACE_reload_SettingDisplayTextDesc">
<English>Check the ammo in your new magazine on magazine reload.</English>
</Key>
<Key ID="STR_ACE_Reload_checkAmmo">
<English>Check Ammo</English>
<German>Munition prüfen</German>