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

Function

addResourceConfig

Adds a config file (<config src type>) to the meta.xml of a resource – your own, or one this script created with createResource. Adding the same file twice changes nothing.

Syntax

bool addResourceConfig(resource theResource, string filePath [, string fileType = "server"])

Arguments

theResourceresource
The resource.Different type in MTA:SA: string filePath
filePathstring
The file path.Optional in MTA:SA: string filetype = "server"
fileTypestring, optional = "server"
"server" or "client".Not in MTA:SA

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

addResourceConfig(string filePath, string filetype = "server")

Returns

true on success.

Example

addResourceConfig(getThisResource(), "ustawienia.xml", "server")

See also