GetStoreLocation: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
No edit summary
m (Habi moved page GetStoreURL to GetStoreLocation without leaving a redirect)
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
}
}
</source>
</source>
Output:
<source inline>C:/Users/UName/AppData/Roaming/VCMP/04beta/store/127.0.0.1-8192/script/main.nut</source>|
<source inline>C:/Users/UName/AppData/Roaming/VCMP/04beta/store/127.0.0.1-8192/script/main.nut</source>|
relfuncs=
*[[OnStoreDownloadComplete]]
*[[IsStoreDownloading]]
}}
}}

Latest revision as of 00:41, 13 October 2024

This function was added in v1.8 beta 4 and will not work on previous versions.


Description:
Gets the relative path where the store-files are downloaded


Parameters:

NoParams


Return Values:
The relative path of the hostname:port directory (eg. "127.0.0.1-8192" ) in which store-files (script/main.nut, vehicles/carcols.xml) are downloaded if npc was connected with -d or -D switch. Otherwise, null is returned (store-files are not downloaded i.e. skipped )


Example

function OnStoreDownloadComplete()
{
	local path=GetStoreLocation();
	if(path)
	{
		path+="script/main.nut";
		
		print(path);
	}
}

Output: C:/Users/UName/AppData/Roaming/VCMP/04beta/store/127.0.0.1-8192/script/main.nut

Related Functions

The following functions may be helpful as they relate to this function in one way or another.