GetResourceName

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

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.