BIS fnc addCommMenuItem: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " " to " ")
m (Text replacement - " \| *(\[\[[a-zA-Z ]+\]\].+) \|x1=" to " |r1=$1 |x1=")
Line 25: Line 25:
|p5= '''notification''' (Optional): [[String]] - notification class from CfgNotifications. Empty string will disabled the notification.
|p5= '''notification''' (Optional): [[String]] - notification class from CfgNotifications. Empty string will disabled the notification.


| [[Number]] - item ID, used in [[BIS_fnc_removeCommMenuItem]]
|r1=[[Number]] - item ID, used in [[BIS_fnc_removeCommMenuItem]]


|x1= <code>_supportHeli = [<nowiki/>[[player]],"Support_Request_CAS_Heli"] [[call]] [[BIS_fnc_addCommMenuItem]];
|x1= <code>_supportHeli = [<nowiki/>[[player]],"Support_Request_CAS_Heli"] [[call]] [[BIS_fnc_addCommMenuItem]];

Revision as of 21:25, 10 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Communication Menu

Syntax

Syntax:
Syntax needed
Parameters:
owner: Object - object to which the item belongs to
itemClass: String - CfgCommunicationMenu class
textArguments (Optional): Anything - Additional info to display in the text attribute. %1 will be replaced by the first array element, %2 with the second and so on.
expressionArguments (Optional): Anything - Similar to textArguments, just this time in the expression attribute.
notification (Optional): String - notification class from CfgNotifications. Empty string will disabled the notification.
Return Value:
Number - item ID, used in BIS_fnc_removeCommMenuItem

Examples

Example 1:
_supportHeli = [player,"Support_Request_CAS_Heli"] call BIS_fnc_addCommMenuItem; _supportHeli = [player,"Support_Request_CAS_Heli",nil,nil,""] call BIS_fnc_addCommMenuItem; // don't show notification

Additional Information

See also:
BIS_fnc_removeCommMenuItemArma 3: Communication Menu

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note