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

Function

renameResource

ServerResourcesIdentical to MTA:SA

Renames a stopped resource. In the current server version the function is not wired up yet and returns false with a warning.

Syntax

resource renameResource(resource theResource, string newResourceName [, string organizationalPath])

Arguments

theResourceresource
The resource (must be stopped).
newResourceNamestring
The new name.
organizationalPathstring, optional
A subfolder.

Returns

The resource under the new name or false.

Example

local res = getResourceFromName("stara_nazwa")
stopResource(res)
renameResource(res, "nowa_nazwa")

See also