Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Cenda1986
Created March 20, 2015 19:24
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 Cenda1986/1f32fbfa92a4f57b9f3c to your computer and use it in GitHub Desktop.
Save Cenda1986/1f32fbfa92a4f57b9f3c to your computer and use it in GitHub Desktop.
Remote
if(_type == "global") exitWith { systemChat _message; };
};
};
fnc_remote_marker = {
private ["_req","_location","_shape","_color","_size","_alpha","_timeout","_marker","_name"];
_req = _this select 0;
if(player hasWeapon _req) then {
_location = _this select 1;
_shape = _this select 2;
_color = _this select 3;
_size = _this select 4;
_alpha = _this select 5;
_timeout = _this select 6;
_name = _this select 7;
_marker = createMarkerLocal [_name,_location];
_marker setMarkerShapeLocal _shape;
_marker setMarkerColorLocal _color;
_marker setMarkerAlphaLocal _alpha;
_marker setMarkerSizeLocal [(_size),(_size)];
[_timeout, _marker] spawn {
sleep (_this select 0);
deleteMarkerLocal (_this select 1);
};
};
};
"RemoteMessage" addPublicVariableEventHandler { (_this select 1) call fnc_remote_message; };
"RemoteMarker" addPublicVariableEventHandler { (_this select 1) call fnc_custom_marker; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment