Mapfiles not loading from scriptfiles
#1

So most of my interiors are inside my scriptfiles inside that is a folder called RMRP and it holds a lot of mappings. My server logs say its loading but it's not. I go in-game and try to enter a interior and nothing loads.

Code:
[08:22:26] Loaded Mapfile: block-gates.ini - 0 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: pdgates.ini - 16 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: mapfix.ini - 6 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: hospital.ini - 1492 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: lspd.ini - 881 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: app2.ini - 267 Objects - WorldID: -1.
[08:22:26] Loaded Mapfile: app3.ini - 257 Objects - WorldID: -1.
[08:22:26] Loaded Mapfile: pdtr1.ini - 485 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: pdtr2.ini - 163 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: cityhall.ini - 295 Objects - WorldID: 1.
[08:22:26] Loaded Mapfile: bank.ini - 125 Objects - WorldID: 1.
[08:22:26] Loaded Mapfile: radio.ini - 322 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: news.ini - 235 Objects - WorldID: 1.
[08:22:26] Loaded Mapfile: sanext.ini - 9 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: idlefix.ini - 42 Objects - WorldID: 0.
[08:22:26] Loaded Mapfile: eastbeach.ini - 15 Objects - WorldID: -1.
[08:22:27] Loaded Mapfile: viceint.ini - 446 Objects - WorldID: -1.
[08:22:27] Loaded Mapfile: viceext.ini - 53 Objects - WorldID: 0.
[08:22:27] Loaded Mapfile: church.ini - 289 Objects - WorldID: 1.
[08:22:27] Loaded Mapfile: houseints.ini - 119 Objects - WorldID: -1.
Reply
#2

How about you show us the script you made to load the mapfiles from ini files?
Reply
#3

Code:
stock LoadMaps()
{
    new arrCoords[2][128], strFromFile2[128], output;
	new File: file = fopen("RMRP/mapping/list.ini", io_read);


stock LoadMapFile(filename[], worldid)
{
    new arrCoords[11][128], strFromFile2[256], str[128], output;
    format(str, 128, "RMRP/mapping/%s.ini", filename);
	new File: file = fopen(str, io_read), obj;
	if (file)
	{
		new found = 0;
        while (output < 5000)
        {
            fread(file, strFromFile2);
			split(strFromFile2, arrCoords, ',');
			if(strval(arrCoords[0]) >= 1)
			{
			    obj = CreateDynamicObjectFix(strval(arrCoords[0]), floatstr(arrCoords[1]), floatstr(arrCoords[2]), floatstr(arrCoords[3]), floatstr(arrCoords[4]), floatstr(arrCoords[5]), floatstr(arrCoords[6]), worldid);
			    if(strval(arrCoords[8]) > 0)
			    {
			        SetDynamicObjectMaterial(obj,  strval(arrCoords[7]), strval(arrCoords[8]), arrCoords[9], arrCoords[10], 0xFFFFFFFF);
			    }
				//if(worldid == 0) CreateDynamicObject(strval(arrCoords[0]), floatstr(arrCoords[1]), floatstr(arrCoords[2]), floatstr(arrCoords[3]), floatstr(arrCoords[4]), floatstr(arrCoords[5]), floatstr(arrCoords[6]), -1);
				found++;
            }
            output++;
		}
		format(str, 128, "Loaded Mapfile: %s.ini - %d Objects - WorldID: %d.", filename, found, worldid);
		printf(str);
	}
	fclose(file);
	return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)