celery 8 Posted April 29, 2007 I made this little script for one of my deathmatch maps and I thought why not share it with whomever needs it as well. In addition to unlimited ammo, it gives your gun an unbelievable rate of fire. I didn't test it on vehicles, only humans. Here it is, just remember to execute it at some point! <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start @alive player ~0.1 _playergun=primaryweapon player player setvehicleammo 1 _ammo=(player ammo _playergun) #check ?!alive player:goto "start" ?_playergun!=primaryweapon player:goto "start" player setvehicleammo (1/_ammo) ~0.01 goto "check" If you want a normal rate of fire, change (1/_ammo) to just 1. Share this post Link to post Share on other sites
maddogx 13 Posted April 30, 2007 Sorry to steal your show Celery but I've improved on your ammo script - your version has some limits. It now works with every weapon on every vehicle. I have also translated it into .SQF: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> for [{_loop1=0},{_loop1>=0},{_loop1=_loop1}] do {   waitUntil {alive player};   _muzzles = [];   _weapons = weapons (vehicle player);   _ammo = 10000;   for [{_x=0},{_x<(count _weapons)},{_x=_x+1}] do   {     _weaponMuzzles = getArray (configFile >> "CfgWeapons" >> (_weapons select _x) >> "muzzles");     if ((_weaponMuzzles select 0)=="this") then     {       _muzzles = _muzzles + [_weapons select _x];     }     else     {       _muzzles = _muzzles + _weaponMuzzles;     };   };   (vehicle player) setvehicleammo 1;   for [{_x=0},{_x<(count _muzzles)},{_x=_x+1}] do   {     _mxammo = ((vehicle player) ammo (_muzzles select _x));     if (_mxammo<_ammo && _mxammo>0) then     {       _ammo=((vehicle player) ammo (_muzzles select _x));     };   };   for [{_loop2=0},{_loop2>=0},{_loop2=_loop2}] do   {     if (_ammo>0) then {(vehicle player) setvehicleammo (1/_ammo);};     sleep 0.01;     if (!(alive player) || ((_weapons select 0)!=(weapons (vehicle player) select 0))) then {_loop2=-1;};   }; }; Dare I say "pwnd".... no hard feelings. Share this post Link to post Share on other sites
-DirTyDeeDs--Ziggy- 0 Posted April 30, 2007 fanf***ingtastic work both of you thanks Share this post Link to post Share on other sites
celery 8 Posted April 30, 2007 Well that's the last time for me posting any scripts here if all people are gonna do is improve them!!!1 Share this post Link to post Share on other sites
maddogx 13 Posted April 30, 2007 Well that's the last time for me posting any scripts here if all people are gonna do is improve them!!!1 Â Is that supposed to be sarcasm or are you serious? I didn't mean to offend you or anything, I just corrected a bug and added some functionality. I'm a compulsive scripter - I really can't help myself . Share this post Link to post Share on other sites
CarlGustaffa 4 Posted April 30, 2007 Well that's the last time for me posting any scripts here if all people are gonna do is improve them!!!1 Â Seriously? OMG Anyway, not taking that too seriously MadDogX, how do you paste code into a code snippet and keep prevailing identing spaces? I'm always getting those removed. Share this post Link to post Share on other sites
maddogx 13 Posted April 30, 2007 (...)MadDogX, how do you paste code into a code snippet and keep prevailing identing spaces? I'm always getting those removed. I got that too, but only when using tabs. If you replace tabs with spaces they will not be removed. Share this post Link to post Share on other sites
BLSmith2112 0 Posted May 1, 2007 Well that's the last time for me posting any scripts here if all people are gonna do is improve them!!!1 You should be thanking him. If someone made a 2D nuke script, and someone improved it to 3D.. You sit there, fold your arms, and pout. Thankx both of you. Share this post Link to post Share on other sites
celery 8 Posted May 1, 2007 Just because I'm feeling so generous, here is another script I wrote for the people posting here: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop _post = position player nearestObject "Post" ?getSarcasm _post > 0:hint "Just kidding!!!";playmusic "yaketysax" ~0.01 goto "loop" It's very simple to use, I suggest people use it! P.S. Could someone convert it to SQF or even improve it for the SQS disabled ones? Share this post Link to post Share on other sites
Guest Posted May 1, 2007 Just because I'm feeling so generous, here is another script I wrote for the people posting here:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop _post = position player nearestObject "Post" ?getSarcasm _post > 0:hint "Just kidding!!!";playmusic "yaketysax" ~0.01 goto "loop" It's very simple to use, I suggest people use it! Â P.S. Could someone convert it to SQF or even improve it for the SQS disabled ones? I recieve an error, it cant find the music. WTF am I doing wrong? Share this post Link to post Share on other sites
CarlGustaffa 4 Posted May 2, 2007 Lol, awesome reply But I was hoping so. However, there will always be someone with thoughts like that. Share this post Link to post Share on other sites
Nicolas Eymerich 0 Posted May 3, 2007 Sorry to steal your show Celery but I've improved on your ammo script - your version has some limits. It now works with every weapon on every vehicle. I have also translated it into .SQF: Sorry for this little off topic but I see a lot of sqs file which are translated in a sqf file. Is there someone who can explain me why? Share this post Link to post Share on other sites