rhaggan 10 Posted April 23, 2011 Guys is there any way to get a normal 30 rnd mag to have say 15 rounds in it? I have tried the seach function with the words "magazine" and "round count"# Cheers Share this post Link to post Share on other sites
riouken 14 Posted April 23, 2011 You have to use event handlers and scripts, here is how we did it for my units rifle range: define the round count varable in the init: rounds_fired_p = 0; you will need one for each player, ie. p1,p2 in this example p1 addEventHandler ["Fired", {rounds_fired_p1 = rounds_fired_p1 + 1; _handler = [p1, rounds_fired_p1] execVM "RoundCounter.sqf"; if(rounds_fired_p1 == 5) then { rounds_fired_p1 = 0; };}]; here is the script: // This script counts the number of rounds fired and when it reaches 5 it delets the magazine and replaces it. // Simulates 5 rounds per magazine. _unit = _this select 0; _rounds_fired = _this select 1; if(_rounds_fired == 5) then { {_unit removemagazine _x} forEach magazines _unit; _unit addMagazine "30rnd_556x45_stanag"; }; _unit = nil; _rounds_fired = nil; This is for 5 round magazines but im sure you can see where to change it to make it 15 rounders. Share this post Link to post Share on other sites
rhaggan 10 Posted April 23, 2011 Cheers thats exactly what iam looking for ---------- Post added at 01:29 PM ---------- Previous post was at 01:03 PM ---------- So do i need a copy of roundcounter.sqf for each player of is it just the p1 addEventHandler ["Fired", {rounds_fired_p1 = rounds_fired_p1 + 1; _handler = [p1, rounds_fired_p1] execVM "RoundCounter.sqf"; if(rounds_fired_p1 == 5) then { rounds_fired_p1 = 0; };}]; and does that part go in the init of is it just the rounds_fired_p = 0; Share this post Link to post Share on other sites