GetResourceName: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 29: | Line 29: | ||
* The current implementation returns the name of the executing resource. | * The current implementation returns the name of the executing resource. | ||
[[Category:Lua Functions]] | |||
[[Category:Shared Functions]] | [[Category:Shared Functions]] | ||
[[Category:Resource Functions]] | [[Category:Resource Functions]] | ||
Latest revision as of 09:53, 15 August 2026
getResourceName
Returns the name of the current resource.
Syntax
string getResourceName([resource resource = getThisResource()])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resource |
resource |
no | The resource object. The current runtime resolves its own resource. |
Returns
Returns the resource name as a string.
Examples
Print the name of the running resource:
local resourceName = getResourceName(getThisResource())
print(resourceName)
Notes
- Available in both client-side and server-side resource scripts.
- The current implementation returns the name of the executing resource.