GetThisResource

From GTA Network Wiki
Jump to: navigation, search

GetThisResource
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

Function Description

Syntax

string NAPI.Resource.GetThisResource(Script scriptEngine);

Required Arguments:

  • scriptEngine any class instance extending Script. Input parameter has to be of Script type.

NOTE: This function returns data in string type.

Usage example(s)

Example Description

public void OutputResourceInfo()
{
	string resource = NAPI.Resource.GetThisResource(this);
	string author = NAPI.Resource.GetResourceAuthor(resource);
	string name = NAPI.Resource.GetResourceName(resource);
	string version = NAPI.Resource.getResourceVersion(resource);
	
	//Message the server about this resource!
	NAPI.Chat.SendChatMessageToAll("* Resource: " + name + " - Author: " + author + " - version: " + version);
}

Changelog

Version Description
1.0 Release.

References