Scripting/Server/Classes/XML/GetAttribute

Attributes. value may be a string, integer, float or bool (stored as text).

Syntax

el.GetAttribute(key)
el.SetAttribute(key, value)
el.RemoveAttribute(key)

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "getattribute" )
	{
		// el is a el handle (see XML)
		el.GetAttribute( "X" );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: XML

Categories: Server methods | XML