CreateElement

From Multi Theft Auto: Wiki
Revision as of 16:41, 16 August 2006 by Vandalite (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is used to create dummy elements in the element table, but do not have a counterpart within the San Andreas world. A common use for this function is for creating group or team elements.

Syntax

element createElement ( string type, string name )

Required Arguments

  • type: This is the type of element being created. This value will be returned if getElementType is used on it.
  • name: This is the name of the element being created.

Example

This example creates a squad element called 'Alpha', which will appear just off root on the element table:

alphahandle = createElement("Squad", "Alpha")

See Also