Mds.id Shared function
Jump to navigation
Jump to search
This function was added in version: 0.0.0.0 |
Function gets mds id by it's file name. Mds must be registered in mds.xml file, in order to be able to, for example: apply overlay for specifc player.
NOTE! After server restart, every mds does have different id. The id is the same on both sides. |
Syntax
int Mds.id(string name)
Required Arguments
- name: The mds file name.
Returns
- int: The mds id if the files is registered in mds.xml, otherwise -1.
Example
addEventHandler("onInit",function(pid)
{
local mdsId = Mds.id("HUMANS_1HST1.MDS"))
print(mdsId); // it will print id of HUMANS_1HST1.MDS file
};