mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ffaa195fe5
* Fixed headers to work with silentspike python script * Fixed rest of the files * Fixed ace-team
30 lines
714 B
Plaintext
30 lines
714 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Sets a public object namespace variable that gets reset with the same value after respawn, so JIP clients keep the value.
|
|
*
|
|
* Arguments:
|
|
* 0: Object <OBJECT>
|
|
* 1: Variable name <STRING>
|
|
* 2: Any value <ANY>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, "varname", 5] call ace_common_fnc_setVariableJIP
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_varName", "_value"];
|
|
|
|
private _respawnVariables = _unit getVariable ["ACE_respawnVariables", []];
|
|
|
|
if !(_varName in _respawnVariables) then {
|
|
_respawnVariables pushBack _varName;
|
|
_unit setVariable ["ACE_respawnVariables", _respawnVariables, true];
|
|
};
|
|
|
|
_unit setVariable [_varName, _value, true];
|