ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getResourceInfo

Function

getResourceInfo

ServerResourcesIdentical to MTA:SA

Returns an attribute value from <info> in the resource's meta.xml, e.g. name, author, version, type, description.

Syntax

string getResourceInfo(resource theResource, string attribute)

Arguments

theResourceresource
The resource.
attributestring
The attribute name.

Returns

The value or false.

Example

local res = getThisResource()
outputServerLog(("%s %s, autor: %s"):format(getResourceName(res), getResourceInfo(res, "version") or "?", getResourceInfo(res, "author") or "?"))

See also