Advertisement
Marz1pan

Untitled

Nov 1st, 2019
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.06 KB | None | 0 0
  1. {
  2.             if !(_x getVariable ["ocap_isInitialised", false]) then {
  3.                 _ammoType = typeOf _x;
  4.                 _class = _ammoType call _getClass;
  5.                 if ((_class isEqualTo "unknown") || (_ammoType in ocap_excludeFromRecord)) exitWith {
  6.                     LOG(ARR2("WARNING: vehicle is defined as 'unknown' or exclude:", _ammoType));
  7.                     _x setVariable ["ocap_isInitialised", true];
  8.                     _x setVariable ["ocap_exclude", true];
  9.                 };
  10.                 _x setVariable ["ocap_id", _id];
  11.                 [":NEW:VEH:", [
  12.                     ocap_captureFrameNo, //1
  13.                     _id, //2
  14.                     _class,  //3
  15.                     _ammoType  //4
  16.                 ]] call ocap_fnc_extension;
  17.                 _x spawn ocap_fnc_addEventHandlers;
  18.                 _id = _id + 1;
  19.                 _x setVariable ["ocap_isInitialised", true];
  20.             };
  21.             if !(_x getVariable ["ocap_exclude", false]) then {
  22.                 private _crew = [];
  23.                
  24.                 _pos = getPosATL _x;
  25.                 _pos set [2, round(_pos select 2)];
  26.                 [":UPDATE:VEH:", [
  27.                     (_x getVariable "ocap_id"), //1
  28.                     _pos,  //2
  29.                     round getDir _x,  //3
  30.                     BOOL(alive _x),  //4
  31.                     _crew  //5
  32.                 ]] call ocap_fnc_extension;
  33.             };
  34.             false
  35.         } count allMines;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement