Scripting/Client/GUI/list.AddItem
Adds a row at the end. Numbers are turned into text. Returns the new row's index (-1 when the list is full: 10000 rows).
Syntax
list.AddItem(text)Arguments
- string text
Returns
integer
Example
function onScriptLoad()
{
// list is a list handle (see List boxes and dropdown boxes)
local result = list.AddItem( "Hello world" );
MessagePlayer( "list.AddItem returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: List boxes and dropdown boxes
Categories: Client functions | List boxes and dropdown boxes