IsResourceRunning: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 9: | Line 9: | ||
==Example check isResourceRunning(resName)== | ==Example check isResourceRunning(resName)== | ||
<section name=" | <section name="isResourceRunning" class="shared" show="true"> | ||
You can insert this code example in your resources. | You can insert this code example in your resources. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function isResourceRunning(resName) | function isResourceRunning(resName) | ||
local res = getResourceFromName(resName) | |||
return (res) and (getResourceState(res) == "running") | |||
end | end | ||
| Line 24: | Line 24: | ||
--alert | --alert | ||
end | end | ||
addCommandHandler('pos', function (commandName) | addCommandHandler('pos', function (commandName) | ||
| Line 34: | Line 33: | ||
end | end | ||
end ) | end ) | ||
]] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 03:41, 2 April 2026
Syntax
- isResourceRunning You can insert this code example in your resources.
Required Arguments
- isResourceRunning: The value to check resources
Example check isResourceRunning(resName)
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo