Jump to content
  • 0

Script Mag Repack


ch4rlys

Question

Hi 

 

I try to add the mag repack to the my epoch server.

 

http://www.armaholic.com/page.php?id=19692

 

I have a problem i have this restriction i can't fix :

 

I already fix 2-3 restriction error but i lock on that one!

 

#52 "ntil {!(isNull (findDisplay 46))};
 
(findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"];
 
system"
 

 

 

Please anyone could help me for that ?

Link to comment
Share on other sites

Recommended Posts

  • 0

Download and unzip to your mission folder.  http://www.mediafire.com/download/dp38a5zdp4307m3/outlw_magRepack.zip

 

 

In your mission init.sqf:

[] execVM "outlw_magRepack\MagRepack_init_sv.sqf";

In description.ext at the top:

#include "outlw_magRepack\MagRepack_config.hpp"

Add to security_checks.h in @epochhive\addons\a3_epoch_server_settings\configs\security_checks.h

{"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""MagRepack_init_sv.sqf"""}

Should look like this:

checkDisplays[] = {
            {"RscDisplayMainMap", {}, {}},
            {"RscDisplayGetReady", {}, {}},
            {"RscDisplayInventory", {}, {}},
            {"RscDisplayLoadMission", {}, {}},
            {"RscDisplayInterrupt", {}, {}},
            {"RscDisplayOptionsVideo", {}, {}},
            {"RscDisplayOptions", {}, {}},
            {"RscDisplayAVTerminal", {}, {}},
            {"RscDisplayConfigure", {"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""\x\cba\addons\keybinding\gui\initDisplay.sqf"""}, {"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""MagRepack_init_sv.sqf"""}},
            {"RscDisplayConfigureAction", {}, {}},
            {"RscDisplayConfigureControllers", {}, {}},
            {"RscDisplayControlSchemes", {}, {}},
            {"RscDisplayCustomizeController", {}, {}},
            {"RscDisplayDebriefing", {}, {}},
            {"RscDisplayDiary", {}, {}},
            {"RscDisplayGameOptions", {}, {}},
            {"RscDisplayJoystickSchemes", {}, {}},
            {"RscDisplayLoading", {}, {}},
            {"RscDisplayMicSensitivityOptions", {}, {}},
            {"RscDisplayOptionsAudio", {}, {}},
            {"RscDisplayOptionsLayout", {}, {}},
            {"RscDisplayStart", {}, {}},
            {"RscDisplayVehicleMsgBox", {}, {}},
            {"RscDisplayInsertMarker", {}, {}}
        };
    };

Oops! Also need to add at line 55 in security_checks.h

keyDown = "_this call EPOCH_KeyDown; _this call outlw_MR_keyDown;";

Battleye scripts.text

7 createDialog !"createDialog "outlw_MR_keybindingMenuActive = false";" !"createDialog \"outlw_MR_canCreateDialog\";" !"createDialog \"MagRepack_Dialog_Keybindings\";"
7 displaySetEventHandler !" {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; systemChat" !"}; }; [_display] call _fnc_animate; { _display displayaddeventhandler [_x,_fnc_animate]; } foreach ["mousemoving","mouseholdin"
7 addEventHandler !"}; }; [_display] call _fnc_animate; { _display displayaddeventhandler [_x,_fnc_animate]; } foreach ["mousemoving","mouseholdin" !"ntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; system"
7 displayAddEventHandler !"ntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; system"
7 addMagazine !="player addMagazine [((_magInfo select 0) select _n), ((_magInfo select 1) sel" 

Not the prettiest of Be filters. But it works.

Link to comment
Share on other sites

  • 0

Download and unzip to your mission folder.  http://www.mediafire.com/download/dp38a5zdp4307m3/outlw_magRepack.zip

 

 

In your mission init.sqf:

[] execVM "outlw_magRepack\MagRepack_init_sv.sqf";
In description.ext at the top:

#include "outlw_magRepack\MagRepack_config.hpp"
Add to security_checks.h in @epochhive\addons\a3_epoch_server_settings\configs\security_checks.h

{"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""MagRepack_init_sv.sqf"""}
Should look like this:

checkDisplays[] = {
            {"RscDisplayMainMap", {}, {}},
            {"RscDisplayGetReady", {}, {}},
            {"RscDisplayInventory", {}, {}},
            {"RscDisplayLoadMission", {}, {}},
            {"RscDisplayInterrupt", {}, {}},
            {"RscDisplayOptionsVideo", {}, {}},
            {"RscDisplayOptions", {}, {}},
            {"RscDisplayAVTerminal", {}, {}},
            {"RscDisplayConfigure", {"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""\x\cba\addons\keybinding\gui\initDisplay.sqf"""}, {"{""onLoad"",_this,""RscDisplayConfigure"",'GUI'} call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; _this call compile preprocessfilelinenumbers ""MagRepack_init_sv.sqf"""}},
            {"RscDisplayConfigureAction", {}, {}},
            {"RscDisplayConfigureControllers", {}, {}},
            {"RscDisplayControlSchemes", {}, {}},
            {"RscDisplayCustomizeController", {}, {}},
            {"RscDisplayDebriefing", {}, {}},
            {"RscDisplayDiary", {}, {}},
            {"RscDisplayGameOptions", {}, {}},
            {"RscDisplayJoystickSchemes", {}, {}},
            {"RscDisplayLoading", {}, {}},
            {"RscDisplayMicSensitivityOptions", {}, {}},
            {"RscDisplayOptionsAudio", {}, {}},
            {"RscDisplayOptionsLayout", {}, {}},
            {"RscDisplayStart", {}, {}},
            {"RscDisplayVehicleMsgBox", {}, {}},
            {"RscDisplayInsertMarker", {}, {}}
        };
    };
Oops! Also need to add at line 55 in security_checks.h

keyDown = "_this call EPOCH_KeyDown; _this call outlw_MR_keyDown;";
Battleye scripts.text

7 createDialog !"createDialog "outlw_MR_keybindingMenuActive = false";" !"createDialog \"outlw_MR_canCreateDialog\";" !"createDialog \"MagRepack_Dialog_Keybindings\";"
7 displaySetEventHandler !" {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; systemChat" !"}; }; [_display] call _fnc_animate; { _display displayaddeventhandler [_x,_fnc_animate]; } foreach ["mousemoving","mouseholdin"
7 addEventHandler !"}; }; [_display] call _fnc_animate; { _display displayaddeventhandler [_x,_fnc_animate]; } foreach ["mousemoving","mouseholdin" !"ntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; system"
7 displayAddEventHandler !"ntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call outlw_MR_keyDown;"]; system"
Not the prettiest of Be filters. But it works.

 

 

 

not work :(   

[] execVM "outlw_magRepack\MagRepack_init_sv.sqf";"

05:18:26 : Script Log: #0 Simych (99dd3dd91f97f74bab600fdef3611235) - #22 "#line 1 "mpmissions\__CUR_MP.Altis\init.sqf"

[] execVM "outlw_magRepack\MagRepack_init_sv.sqf";"

05:18:26 : Player #0 Simych (99dd3dd91f97f74bab600fdef3611235) has been kicked by BattlEye: Script Restriction #22

my scripts.txt

your fix

:( 

 

- #25 "agInfo select 1) select _n) != _ammoCount}) then

{

player addMagazine [((_magInfo select 0) select _n), ((_magInfo select 1) sel"

 

Link to comment
Share on other sites

  • 0

I suggest using the scarCODE Sar simple ammo Repack.

it's recent, it's light and if it has any issues IT07 is around.

But my tests showed it still worked fine with 0304b2

Agreed. I took the originals authors mod from armoholic and made it work with Epoch. IT07 just made it easier. But my main thing was to teach how to incorporate using Epoch mod antihack, I know most use infistar, And  I don't. I've learned more running Epoch AH. But to to show that most of the setting to allow dialogs, keypress, and everything else is just as configurable in the Epoch antihack as it is in Infistars. Most don't even look. If you want to pay for infistar then so be it. You won't learn anything. So easy to just adjust a toggle true or false in infistar. Damn that, learn how it works for yourself to make you a better admin. 

Link to comment
Share on other sites

  • 0

The first time I installed this my server wouldn't start. That's a pretty good indicator that something is being called in the script that it cannot find. So after some looking around I found that there's an error with the code posted on the armaholic page. 

Change this line

[] execVM "outlw_magRepack\MagRepack_init.sqf";

to this

[] execVM "outlw_magRepack\MagRepack_init_sv.sqf";

 

and change this line

#include "outlw_magRepack\MagRepack_config.cpp"

to this

#include "outlw_magRepack\MagRepack_Config.hpp"

It turns out the file names were different than the in the script. :P

I don't have CBA installed so I couldn't test this to see if it actually worked but I logged in to my server with no errors so that has to be a good thing, yeah? :)

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
  • Advertisement
×
×
  • Create New...