Rev in one of your edits there is this:
class BIS_fnc_debugConsoleExec {}; // secure function made by Killzone Kid for BIS, only works for logged-in admins
Can you explain to me what this does? I am asking as I am trying to learn more in depth of your scripting...
Ok so when you are logged in as admin, on the pause menu there is a debug console to execute code. This is a great tool for admins to diagnose issues or simply spawn or clean up stuff.
However, the debug console relies on the remoteExec command to execute code; this is very impractical because it runs the code against the same filters used to block hacks, which prevented the debug console from being used altogether on public servers.
I explained this to BIS, and they implemented this new function and a bunch of other commands for the debug console to use instead. Basically, this function allows code called from the debug console to bypass BattlEye filters, but only gets executed if the person using the debug console is logged in as admin.
There is nothing special required to be done by you, I added the function name so that it could get past the CfgRemoteExec filters. You don't use the function directly, it is used behind the scenes by Arma itself.