First of all, it was hard to figure out how to use this module. Now I synced the module to a trigger that has Any Player Present, Repeatable as condition. Then synced the module to the player that's inside the trigger and not allowed to leave.
Now the trigger part works. Only during the warning time the time ticker in the module doesn't stop resulting into getting punished even tough you walked back into the zone. This is because in the Zone Restriction FSM Function - CHECK this part of code is called when the trigger is de-activated:
[_x, _warningTime, _inverse, _trgs, _effectPunishment, _airExcluded] spawn { _deserter = _this select 0; _warningTime = _this select 1; _inverse = _this select 2; _trgs = _this select 3; _effectPunishment = _this select 4; _airExcluded = _this select 5; _t = time; while {time < _t + _warningTime && (if (_inverse) then {{vehicle _deserter in list _x} count _trgs > 0} else {{vehicle _deserter in list _x} count _trgs == 0}) && (if (_airExcluded && vehicle _deserter isKindOf "Air") then {FALSE} else {TRUE})} do { sleep 1 }; if (time >= _t + _warningTime) then {_deserter call _effectPunishment} else {_deserter setVariable ["BIS_deserter", FALSE]}; };
I guess this is supposed to set the variable "BIS_deserter" to false when the trigger is reactivated again. Although because you pass _trgs in the spawn function _trgs will never change in this while loop thus it will be impossible to get "BIS_deserter" reset even when the _trgrs that gets passed into the [] spawn {} contains the activated trigger again.