mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add function to disable dogtags for factions, and disable for civilians
This commit is contained in:
parent
cd79ebe3ce
commit
130265fd9f
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
PREP(addDogtagActions);
|
PREP(addDogtagActions);
|
||||||
PREP(addDogtagItem);
|
PREP(addDogtagItem);
|
||||||
PREP(bloodType);
|
PREP(bloodType);
|
||||||
@ -11,3 +12,4 @@ PREP(sendDogtagData);
|
|||||||
PREP(showDogtag);
|
PREP(showDogtag);
|
||||||
PREP(ssn);
|
PREP(ssn);
|
||||||
PREP(takeDogtag);
|
PREP(takeDogtag);
|
||||||
|
PREP(disableFactionDogtags);
|
||||||
|
@ -45,3 +45,6 @@ if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// disable dogtags for civilians
|
||||||
|
"CIV_F" call FUNC(disableFactionDogtags);
|
||||||
|
@ -20,4 +20,7 @@ params ["_player", "_target"];
|
|||||||
|
|
||||||
if (isNull _target) exitWith {false};
|
if (isNull _target) exitWith {false};
|
||||||
|
|
||||||
|
// check if disabled for faction
|
||||||
|
if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false};
|
||||||
|
|
||||||
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
||||||
|
@ -20,4 +20,7 @@ params ["_player", "_target"];
|
|||||||
|
|
||||||
if (isNull _target) exitWith {false};
|
if (isNull _target) exitWith {false};
|
||||||
|
|
||||||
|
// check if disabled for faction
|
||||||
|
if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false};
|
||||||
|
|
||||||
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
||||||
|
24
addons/dogtags/functions/fnc_disableFactionDogtags.sqf
Normal file
24
addons/dogtags/functions/fnc_disableFactionDogtags.sqf
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Disable this faction from using dogtags.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Faction <STRING>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* "CIV_F" call ace_dogtags_fnc_disableFactionDogtags
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params [["_faction", "", [""]]];
|
||||||
|
|
||||||
|
if (isNil QGVAR(disabledFactions)) then {
|
||||||
|
GVAR(disabledFactions) = [] call CBA_fnc_createNamespace;
|
||||||
|
};
|
||||||
|
|
||||||
|
GVAR(disabledFactions) setVariable [_faction, true];
|
Loading…
Reference in New Issue
Block a user