mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Clientside display text option for weapon reload
This commit is contained in:
parent
358a95381b
commit
d919c2436d
@ -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)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user