-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #508 from CBATeam/fix-bi-callsign-attribute
fix BI 3den callsign attribute
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
class Cfg3DEN { | ||
class Group { | ||
class AttributeCategories { | ||
class Init { | ||
class Attributes { | ||
class Callsign { | ||
expression = "[_this, _value] call CBA_fnc_setCallsign"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_setCallsign | ||
Description: | ||
Set call sign of a group. | ||
Works in SP, MP and Eden-Editor and at any point. | ||
Parameters: | ||
_group - A group <GROUP, OBJECT> | ||
_callsign - The call sign the group should receive <STRING> | ||
Returns: | ||
Nothing | ||
Example: | ||
(begin example) | ||
[group player, "Banana Squad"] call CBA_fnc_setCallsign | ||
(end) | ||
Author: | ||
snippers, commy2 | ||
---------------------------------------------------------------------------- */ | ||
#include "script_component.hpp" | ||
SCRIPT(setCallsign); | ||
|
||
params [["_group", grpNull, [grpNull, objNull]], ["_callsign", "", [""]]]; | ||
|
||
private _group = _group call CBA_fnc_getGroup; | ||
|
||
if (is3DEN) then { | ||
_group setGroupId [_callsign]; | ||
}; | ||
|
||
[{ | ||
params ["_group", "_callsign"]; | ||
|
||
_group setGroupIdGlobal [_callsign]; | ||
}, [_group, _callsign]] call CBA_fnc_execNextFrame; |