Jump to content

[scarCODE] S.A.R. (Simple Ammo Repack) by IT07


IT07

Recommended Posts

S.A.R. (Simple Ammo Repacker)

by IT07

 

INFO

This script/menu is an extremely simple concept for merging/packing/refilling your USED magazines for any kind of gun/weapon.

The video below will show you it all in a bit more detail :)

 

VIDEO (older version)

 

SCREENSHOT (latest)

http://imgur.com/34gOsEP

 

DOWNLOAD & INSTALL

https://github.com/IT07/A3_ScarCode_ScriptBundle

Link to comment
Share on other sites

Hey IT... this looks great! Especially  after the nightmare I've had with a different one that crashes my server....  One concern I have is over the hpp file. I'm running a number of other scripts with rsc defines most importantly Black Market, a spawn script, a salvage and an earplug script.  They all use scroll selects and have GUIs... is this going to run an issue defining rsc s "globally"?

Link to comment
Share on other sites

Hey IT... this looks great! Especially  after the nightmare I've had with a different one that crashes my server....  One concern I have is over the hpp file. I'm running a number of other scripts with rsc defines most importantly Black Market, a spawn script, a salvage and an earplug script.  They all use scroll selects and have GUIs... is this going to run an issue defining rsc s "globally"?

 

Not sure what you mean but just follow the install instructions mate.

Link to comment
Share on other sites

Hey IT07,

 

Loving the PVE and introcam scripts. Got a small problem getting this one to work. I've followed the instructions regarding installation (including the alterations to description.ext and the addition of the appropriate folder (SAR) to the scarCODE folder.

 

Initially the script appears in the scroll menu and selecting it produces the menu as expected but the menu states "processing magazines" and doesn't appear to do anything after that.

 

Hopefully you can help me out.

 

Many thanks,

 

Woot

Link to comment
Share on other sites

I agree with Woot, I did a simple install of this.

Mind ya I had PSR already installed and working fine.

I installed this one also incorporating a HOTKEY and a Menu Button for it instead of the addaction.

I get the same result, constant processing mags.

wonder if this script needs a line in init.sqf

I notice this in one of your scripts for SAR

You can not call this function. NANANANANAA
lol so we need an execVM in the init to get this running then?

No I did not loose my motivation, yet :P I just need to learn how to take it easy and do one thing at a time.

Couldn't agree with you more IT07

Link to comment
Share on other sites

Not sure how you guys are having this problem because the text "processing magazines" is not in the latest build anymore.... you guys sure that you have the latest buid?

 

@DirtySanchez: that "you can not call this function NANANANA" is for when a "hacker" calls the function when the menu is not open.

And no you do not need an ExecVM because I execute my scripts with postInit = 1; in the cfgFunctions section which makes them automatically launch when mission starts.

Link to comment
Share on other sites

gotcha, I read all of it fine, the message threw me off a bit.

Thanks for your help, and there is a new download, fantastic bud, Thank you very much for all your hard work.

And nice, that might come in handy in the future!

Quick update, my original download was from yesterday and the SAR update was 2 and 3 days ago....

Not sure that's my issue.

Found my issue and im sure its WOOTY's too.

I added the hpp but not what you mentioned above, the cfgFunction

Update: that was in fact my issue it is now functioning properly

Link to comment
Share on other sites

Spotted that i didn't have the updated SAR folder that IT07 uploaded the other day. It now lets me merge the magazines. :) thanks for noticing that DirtySanchez

Unfortunately other players are saying they don't see the option in the scroll menu at all. Running Infistar btw and have configured as required by install (unless that's changed recently too).

 

Stranger still i'm only seeing the scroll menu option for short period of time before it disappears from the scroll menu altogether. 

Link to comment
Share on other sites

Spotted that i didn't have the updated SAR folder that IT07 uploaded the other day. It now lets me merge the magazines. :) thanks for noticing that DirtySanchez

Unfortunately other players are saying they don't see the option in the scroll menu at all. Running Infistar btw and have configured as required by install (unless that's changed recently too).

 

Stranger still i'm only seeing the scroll menu option for short period of time before it disappears from the scroll menu altogether.

scroll menu's are addactions.

Do you have any other addaction menu's that might be doing a removeallactions?

Otherwise I know there are some issues with some action menu's disappearing.

There was some code that I had from one that had some code horbin used to keep the scroll wheel action always on.....

Lets see if I can find it.

Link to comment
Share on other sites

//loop to keep player addaction, method by horbin
while {true} do 
{
    waitUntil {!alive player};
    // uh oh...
    waitUntil {alive player};
	diag_log "#YourScriptInit: Player is Donor";
	[] execVM "custom/yourscript.sqf";
};     

} else {
	diag_log "#YourScriptInit: Player is not donor";
};
Link to comment
Share on other sites

  • 4 weeks later...

IT07 - awesome work! I'm using your script on my server now.

 

I made a little change though to trigger the script by pressing CTRL+R buttons instead of via an addaction of the mousewheel.

 

in fn_initSAR.sqf comment out everything

// if not(hasInterface) exitWith {};
// [] spawn // Why? Because of { postInit = 1; };
// {
	// waitUntil { uiSleep 0.5; !isNull(findDisplay 46); !isNil"EPOCH_loadingScreenDone"; };
	// uiSleep 1;

	//_aa = player addAction ["<img size='1.5' image='\a3\ui_f\data\IGUI\Cfg\Actions\reload_ca.paa' />  Ammo Repack",{createDialog'SC_sarDiag';}, "", -1, false, true];
// };

in init.sqf add one more line 

if (!isServer) then {


//keybind for ammo reload
waituntil {!(IsNull (findDisplay 46))}; _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "(if ((_this select 1 == 19) && ( _this select 3)) then {createDialog 'SC_sarDiag';})"];

};	
Link to comment
Share on other sites

Nice thanks for the addition but couldn't you've just asked me to add it? As a result, I will have to correct your code.

I know you mean good dude but let me do the coding ok? ;)

// In fn_initSAR.sqf, put this:

[] spawn
{
waitUntil { uiSleep 1; not(isNull(findDisplay 46)); not(isNil"EPOCH_loadingScreenDone") };
uiSleep 2;
_keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "(if ((_this select 1 == 19) && ( _this select 3)) then {createDialog 'SC_sarDiag';})"];
};
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...