Skip to content

Instantly share code, notes, and snippets.

@commy2
Last active August 30, 2019 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save commy2/da0fd9eef31e6b72d0746fe5f0301d2c to your computer and use it in GitHub Desktop.
Save commy2/da0fd9eef31e6b72d0746fe5f0301d2c to your computer and use it in GitHub Desktop.
// init.sqf
if (hasInterface) then {
superobject addAction [
"Einmalaktion XYZ",
{_this remoteExecCall ["mission_fnc_actionXYZ", 2]},
[],
1.5, true, true, "",
"_target getVariable ['mission_actionXYZEnabled', true];",
];
mission_fnc_actionXYZ_local = {
params ["_target", "_caller", "_actionId", "_arguments"];
systemChat str _arguments;
};
};
if (isServer) then {
mission_fnc_actionXYZ = {
params ["_target"];
if !(_target getVariable ["mission_actionXYZEnabled", true]) exitWith {};
_target setVariable ["mission_actionXYZEnabled", false, true];
_this remoteExec ["mission_fnc_actionXYZ_local", _target];
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment