Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:3.4

Description

Description:

Adds a new Systems-Menu item to the parent item.

For more information, see Systems Menu in the VBS3 User Manual.

Syntax

Syntax:[vehicle, parentItemID, itemType, itemName, itemTooltip] call fn_vbs_addSystemItem
Parameters:
  • vehicle: Object - The vehicle.
  • parentItemID: Number - The parent system item ID.
  • itemType: Number - The type of the item, can be (you must add #include "\vbs2\plugins\vehicle_systems\systemTypes.hpp" for those defines to be available):
    • SYSTEM_TYPE_ITEM 0
    • SYSTEM_TYPE_TOGGLE 1
    • SYSTEM_TYPE_SUBMENU 2
  • itemName: String - The item name.
  • itemTooltip: String - The item tooltip (optional, default: "").
Return Value:Number - The item ID, or -1 if the parent item does not exist.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
 [player, _system, SYSTEM_TYPE_SUBMENU, "SMOKE"] call fn_vbs_addSystemItem

Additional Information

See also: fn vbs createSystem, fn vbs removeSystemItem, fn vbs getSystemItemType
Multiplayer:
Problems:

Notes