Code:
? localize "STR_USRACT_CHEAT_1" != "FWATCH" : hint "Cannot detect Fwatch"; exit
; For ww4mod v2.5 Config ONLY!
; Compatible with Arma:CWA (v1.99) and OFP (v1.96), Fwatch v1.1 required
; All credit goes to Faguss
; Loop displaying stance(from animation code)
; Pistol animations are included. Dying and being dead is treated as lying stance.
CrouchCodes = [40,41,43,44,46,47,51,323,347,451,477,478,855,857,860,861]
_ranges2 = [152,183,308,310,313,316,381,398,439,442,500,509]
LyingCodes = [0,45,209,280,312,313,429,481,852,854]
_ranges = [19,22,52,54,89,100,211,275,317,322,324,343,377,380,443,450,471,476,481,483,872,875]
_i = 0
_i2 = 0
_j = _ranges select _i
_j2 = _ranges2 select _i2
#loop
? _j <= (_ranges select _i+1) : LyingCodes=LyingCodes+[_j]; _j=_j+1; goto "loop"
? _i < (count _ranges -2 ) : _i=_i+2; _j=_ranges select _i; goto "loop"
#loop2
? _j2 <= (_ranges2 select _i2+1) : CrouchCodes=CrouchCodes+[_j2]; _j2=_j2+1; goto "loop2"
? _i2 < (count _ranges2 -2) : _i2=_i2+2; _j2=_ranges2 select _i2; goto "loop2"
#checkloop
~0.5
_stance="Standing"
_animCODE = call loadFile ":mem getplayeranim"
? _animCODE in LyingCodes : _stance="Lying";
? _animCODE in CrouchCodes : _stance="Crouch";
player globalchat format ["Stance: %1",_stance]
goto "checkloop"