CreateListItem

From GT-MP
Jump to: navigation, search
CreateListItem
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Creates a list item on the menu.


Syntax

createListItem(string text, string description, List<string> items, int index);

Required Arguments

  • text: parameter input should be in string type.
  • description: parameter input should be in string type.
  • items: parameter input should be in List<string> type.
  • index: parameter input should be in int type.

NOTE: This function returns data in UIMenuListItem type.

Usage example

var list = new List(String);
list.Add("item1");
list.Add("item2");
list.Add("item3");
API.createListItem("Item list", "Description", list, 0);

References