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

Function

getResourceState

ServerResourcesIdentical to MTA:SA

Returns the resource state: "running" when it runs or "loaded" when it is on disk but stopped. It also works on the client: there it only knows the resources running for the player, so it returns "running" or false.

Syntax

string getResourceState(resource theResource)

Arguments

theResourceresource
The resource (a handle or a name).

Returns

"running", "loaded" or false.

Example

local admin = getResourceFromName("admin")
outputServerLog("admin: " .. tostring(admin and getResourceState(admin)))

See also