Skip to content

Instantly share code, notes, and snippets.

@commy2
Last active October 24, 2023 03:11
Show Gist options
  • Save commy2/351c1262933016ce313e0c74be89480a to your computer and use it in GitHub Desktop.
Save commy2/351c1262933016ce313e0c74be89480a to your computer and use it in GitHub Desktop.
// initPlayerLocal.sqf
params ["_unit"];
commy_safezone_muzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles") + getArray (configFile >> "CfgWeapons" >> "Put" >> "muzzles");
commy_safezone_eachFrame = {
if (_this inArea "safezone") then {
{
_this setWeaponReloadingTime [_this, _x, 1];
} forEach commy_safezone_muzzles;
//_this allowDamage false;
true
} else {
//_this allowDamage true;
false
};
};
_unit addAction ["", {true}, [], -99, false, true, "DefaultAction", "call commy_safezone_eachFrame"];
_unit addEventHandler ["Respawn" {
params ["_unit"];
_unit addAction ["", {true}, [], -99, false, true, "DefaultAction", "call commy_safezone_eachFrame"];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment