# getResourceInfo (Server)

> Reads an attribute of the `<info>` tag in a resource's `meta.xml`, such as `author` or `version`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Resources and modules
- **URL**: https://wiki.mymp.gg/en/getResourceInfo

## Syntax

```lua
string|false getResourceInfo(resource|string resource, string key)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `resource` | `resource\|string` | The resource, or its name. |
| `key` | `string` | The attribute's name. |

## Returns

The attribute's value, or `false` if the resource does not exist or the attribute is missing or empty.

## Example

```lua
local version = getResourceInfo(getThisResource(), "version") or "unknown"
outputServerLog("running version " .. version)
```

## See also

- [getResourceName (Shared)](https://wiki.mymp.gg/en/getResourceName.md): Returns a resource's name.
- [getResourceFiles (Shared)](https://wiki.mymp.gg/en/getResourceFiles.md): Lists the files a resource declares with <file> in its meta.xml, with patterns already expanded, in alphabetical order.
- [getResourceState (Shared)](https://wiki.mymp.gg/en/getResourceState.md): Tells which state a resource is in.
