Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> bulletToFire = "B_30mm_APFSDS";
- muzzleVelocity = 1300;
- cc_fnc_changeBullet = {
- _weapon = _this select 1;
- _bullet = _this select 6;
- if (_weapon isKindOf ["srifle_GM6_F",configFile >> "CfgWeapons"]) then {
- // Collect information about the bullet fired
- _vel = vectorNormalized velocity _bullet;
- _pos = getPosATL _bullet;
- // Delete the original bullet fired
- deleteVehicle _bullet;
- // Now spawn a new bullet in the old one's position, and give it velocity
- _newBullet = bulletToFire createVehicle _pos;
- _newBullet setShotParents [_this select 0, _this select 0];
- _newBullet setPosATL _pos;
- _newBullet setVelocity (_vel vectorMultiply muzzleVelocity);
- };
- };
- _changeBullet = player addEventHandler ["Fired", {_this call cc_fnc_changeBullet}];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement