- Documentation
- Server functions
- getResourceInfo
Function
getResourceInfo
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 "?"))