GetResourceName

From GT-MP
Jump to: navigation, search
GetResourceName
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Gets the resource name from the resource passed in to the function.


Syntax

API.getResourceName(string resource);

Required Arguments

  • resource: parameter input should be in string type.

NOTE: This function returns data in string type.

Usage example(s)

Example Description

public string ResourceName(string resource)
{
	//Stop here if the resource string is empty.
	if (string.IsNullOrEmpty(resource)) 
	{
		return string.empty;
	}
	
	return API.getResourceName(resource);
}

References