fn_createVehicle.sqf 377 B

123456789101112
  1. private ["_type", "_pos", "_obj"];
  2. _type = [_this,0,"",[""]] call BIS_fnc_param;
  3. _pos = [_this,1,[0,0,0],[[]],[2,3]] call BIS_fnc_param;
  4. _dir = [_this,2,false,[0]] call BIS_fnc_param;
  5. _obj = _type createVehicle _pos;
  6. _obj setPos _pos;
  7. _obj addEventHandler ["killed", { (_this select 0) call AW_fnc_addDead; }];
  8. if (typeName _dir == "SCALAR") then { _obj setDir _dir; };
  9. _obj