SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/01/2020, 07:38 PM   #1
ShiffeyTheGamer
Huge Clucker
 
ShiffeyTheGamer's Avatar
 
Join Date: May 2014
Posts: 246
Reputation: 25
Default Mapfiles not loading from scriptfiles

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.
ShiffeyTheGamer is offline   Reply With Quote
Old 23/01/2020, 12:06 PM   #2
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 133
Reputation: 59
Default Re: Mapfiles not loading from scriptfiles

How about you show us the script you made to load the mapfiles from ini files?
Markski is offline   Reply With Quote
Old 23/01/2020, 02:59 PM   #3
ShiffeyTheGamer
Huge Clucker
 
ShiffeyTheGamer's Avatar
 
Join Date: May 2014
Posts: 246
Reputation: 25
Default Re: Mapfiles not loading from scriptfiles

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;
}
ShiffeyTheGamer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Scriptfiles Canema PortuguÍs/Portuguese 7 03/08/2014 03:54 PM
[Help] Scriptfiles are not loading bathushan Server Support 2 26/09/2013 02:31 PM
Scriptfiles _Sami_ Help Archive 0 13/12/2009 01:59 PM
[help] Using Scriptfiles? Mowgli Help Archive 6 15/10/2009 03:05 PM


All times are GMT. The time now is 05:28 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.