GetResourceOrganizationalPath: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Added example) |
||
Line 1: | Line 1: | ||
{{Server function}} | {{Server function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function returns the organizational file path (e.g. ''[admin]'') of a resource. | This function returns the organizational file path (e.g. ''[admin]'') of a resource. | ||
Line 16: | Line 15: | ||
Returns the organizational path of the [[resource]]. | Returns the organizational path of the [[resource]]. | ||
==Example== | ==Example== | ||
This example outputs the path of the current resource when it is started. | |||
<syntaxhighlight lang="lua"> | |||
addEventHandler("onResourceStart", resourceRoot, | |||
function () | |||
outputChatBox(getResourceName(resource) .. "'s path: " .. getResourceOrganizationalPath(resource)) | |||
end) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Resource_functions}} | {{Resource_functions}} |
Revision as of 05:32, 28 June 2017
This function returns the organizational file path (e.g. [admin]) of a resource.
Syntax
string getResourceOrganizationalPath ( resource theResource )
OOP Syntax Help! I don't understand this!
- Method: resource:getOrganizationalPath (...)
Required Arguments
- theResource: the resource of which you want to know the organizational path
Returns
Returns the organizational path of the resource.
Example
This example outputs the path of the current resource when it is started.
addEventHandler("onResourceStart", resourceRoot, function () outputChatBox(getResourceName(resource) .. "'s path: " .. getResourceOrganizationalPath(resource)) end)
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo