Advertisement
cctv

APFSDS Lynx

Mar 28th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.76 KB | None | 0 0
  1. span class="re5"> bulletToFire = "B_30mm_APFSDS";
  2. muzzleVelocity = 1300;
  3.  
  4. cc_fnc_changeBullet = {
  5.     _weapon = _this select 1;
  6.     _bullet = _this select 6;
  7.  
  8.     if (_weapon isKindOf ["srifle_GM6_F",configFile >> "CfgWeapons"]) then {
  9.         // Collect information about the bullet fired
  10.         _vel = vectorNormalized velocity _bullet;
  11.         _pos = getPosATL _bullet;
  12.         // Delete the original bullet fired
  13.         deleteVehicle _bullet;
  14.         // Now spawn a new bullet in the old one's position, and give it velocity
  15.         _newBullet = bulletToFire createVehicle _pos;
  16.         _newBullet setShotParents [_this select 0, _this select 0];
  17.         _newBullet setPosATL _pos;
  18.         _newBullet setVelocity (_vel vectorMultiply muzzleVelocity);
  19.     };
  20. };
  21.  
  22. _changeBullet = player addEventHandler ["Fired", {_this call cc_fnc_changeBullet}];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement