Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Air command channel #1

Open
MildlyInterested opened this issue Dec 4, 2023 · 0 comments
Open

Air command channel #1

MildlyInterested opened this issue Dec 4, 2023 · 0 comments

Comments

@MildlyInterested
Copy link
Contributor

MildlyInterested commented Dec 4, 2023

//initPlayerLocal.sqf
if (player getVariable ["16AA_AirCommandChannel", false]) then {
	l6AA_AirCommandChannelID radioChannelAdd [player];
	[{setCurrentChannel (l6AA_AirCommandChannelID + 5);},nil,3] call CBA_fnc_waitAndExecute;
	addMissionEventHandler ["MapSingleClick", {
		params ["_units", "_pos", "_alt", "_shift"];
		setCurrentChannel (l6AA_AirCommandChannelID + 5);
	}];
};

//restore access to AirCommand Channel
_player addMPEventHandler ["MPRespawn", {
	params ["_unit", "_corpse"];
	if (player getVariable ["16AA_AirCommandChannel", false]) then {
		l6AA_AirCommandChannelID radioChannelAdd [player];
		setCurrentChannel (l6AA_AirCommandChannelID + 5);
	};
}];
//initServer.sqf
l6AA_AirCommandChannelID = radioChannelCreate [[0.3, 0.3, 0.5, 1], "Air Command", "%UNIT_NAME", [], true];
publicVariable "l6AA_AirCommandChannelID";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant