TopMenu.AddItem Method

Adds an item to a TopMenu category.

TopMenuObject AddItem(const char[] name, TopMenuHandler handler, TopMenuObject parent, const char[] cmdname, int flags, const char[] info_string)

Parameters

const char[] name

Object name (MUST be unique).

TopMenuHandler handler

Handler for topobj.

TopMenuObject parent
No description.
const char[] cmdname

Command name (for access overrides).

int flags

Default access flags.

const char[] info_string

Arbitrary storage (max 255 bytes).

Return Value

A new TopMenuObject ID, or INVALID_TOPMENUOBJECT on failure.