Maps doesn't continue loading
#1

Hi!
today i saw weird think when i played everything was fine and i tested all 18 maps. Bat then i saw that these maps doesn't repeat loading like i stuck on one map. Its look like this

Played at maps
1( START),2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17, (18 END), so when i reach that 18maps and this map over then everything look like this
1,1,1,1,1,1,1,1,1, ∞

So whats wrong? I dont even know where i should look.
Reply
#2

Some more info on whats not re-loading would be helpful.

but judging from the brief description you've posted my best guess would that the script is not told to do anything after the 18th map is loaded.
Reply
#3

Exactly, so i need make it that this script repeat loading after the 18th maps. Bat where should i find these lines? Because i have no idea where i should look..
Reply
#4

Bump
Reply
#5

Common guys, i need your help.
Reply
#6

Nobody knows what you mean by "loading maps". What are maps? Gamemodes? And show code if you want help.
Reply
#7

Bump. Have same problem.
Reply
#8

Same like cs , timer end and then start loading next map.
Код:
stock GetMapCount()
{
	new mcount = 0, file[128];
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
        format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexist(file))
	    {
	        mcount ++;
	    }
	}
	return mcount;
}

stock GetFreeMapID()
{
    new file[32], id = 0;
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
        format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexists(file)) continue;
	    id = i;
	    break;
	}
	return id;
}

stock NoMapCheck()
{
	new tcount = 0, file[128];
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
	    format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexist(file))
	    {
	        tcount ++;
	    }
	}
	if(tcount == 0)
	{
	    print("_____________________________________________________________");
	    print("WARNING: The server has detected there are no map files!");
	    print("currently installed. The server has been set to");
	    print("automatically shut down in 25000/ MS. (25 Seconds)");
	    print("_____________________________________________________________");
	    SetTimer("No_Maps", 25000, false);
	    return 1;
	}
	return 1;
}

function No_Maps() return SendRconCommand("exit");

public load_Map_basic(Mapid, name[], value[])
{
	if(strcmp(name, "FSMapName", true) == 0)
	{
		strmid(Map[FSMapName], value, false, strlen(value), 128);
		LoadFilterScript(Map[FSMapName]);
	}

	/*printf("[Debug] Name: %s - Value: %s", name, value);  For Debug Purposes*/

	if(strcmp(name, "MapName", true) == 0)
	{
	    new mpname[50];
		strmid(Map[MapName], value, false, strlen(value), 128);
		format(mpname, sizeof(mpname), "mapname %s", Map[MapName]);
	    SendRconCommand(mpname);
	}

	if(strcmp(name, "HumanSpawnX", true) == 0) Map[HumanSpawnX] = floatstr(value);
	if(strcmp(name, "HumanSpawnY", true) == 0) Map[HumanSpawnY] = floatstr(value);
	if(strcmp(name, "HumanSpawnZ", true) == 0) Map[HumanSpawnZ] = floatstr(value);
	if(strcmp(name, "HumanSpawn2X", true) == 0) Map[HumanSpawn2X] = floatstr(value);
	if(strcmp(name, "HumanSpawn2Y", true) == 0) Map[HumanSpawn2Y] = floatstr(value);
	if(strcmp(name, "HumanSpawn2Z", true) == 0) Map[HumanSpawn2Z] = floatstr(value);
	if(strcmp(name, "ZombieSpawnX", true) == 0) Map[ZombieSpawnX] = floatstr(value);
	if(strcmp(name, "ZombieSpawnY", true) == 0) Map[ZombieSpawnY] = floatstr(value);
	if(strcmp(name, "ZombieSpawnZ", true) == 0) Map[ZombieSpawnZ] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2X", true) == 0) Map[ZombieSpawn2X] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2Y", true) == 0) Map[ZombieSpawn2Y] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2Z", true) == 0) Map[ZombieSpawn2Z] = floatstr(value);
	if(strcmp(name, "Interior", true) == 0) Map[Interior] = strval(value);
	if(strcmp(name, "GateX", true) == 0) Map[GateX] = floatstr(value);
	if(strcmp(name, "GateY", true) == 0) Map[GateY] = floatstr(value);
	if(strcmp(name, "GateZ", true) == 0) Map[GateZ] = floatstr(value);
	if(strcmp(name, "CPx", true) == 0) Map[CPx] = floatstr(value);
	if(strcmp(name, "CPy", true) == 0) Map[CPy] = floatstr(value);
	if(strcmp(name, "CPz", true) == 0) Map[CPz] = floatstr(value);
	if(strcmp(name, "GaterX", true) == 0) Map[GaterX] = floatstr(value);
	if(strcmp(name, "GaterY", true) == 0) Map[GaterY] = floatstr(value);
	if(strcmp(name, "GaterZ", true) == 0) Map[GaterZ] = floatstr(value);
    if(strcmp(name, "MoveGate", true) == 0) Map[MoveGate] = strval(value);
    if(strcmp(name, "GateID", true) == 0) Map[GateID] = strval(value);
	if(strcmp(name, "AllowWater", true) == 0) Map[AllowWater] = strval(value);
	if(strcmp(name, "EvacType", true) == 0) Map[EvacType] = strval(value);
	if(strcmp(name, "Weather", true) == 0)
	{
		Map[Weather] = strval(value);
		SetWeather(Map[Weather]);
	}

	if(strcmp(name, "Time", true) == 0)
	{
		Map[Time] = strval(value);
		SetWorldTime(Map[Time]);
 	 	printf("Map ID %d's Information Has Been Loaded.", Mapid);
	}
	return 1;
}

stock LoadMap(Mapid)
{
	new Map_file[64];
	format(Map_file, sizeof(Map_file), "/Maps/%d.ini", Mapid);
	if(fexist(Map_file))
	{
		printf("loading Map %s", Map_file);
	    INI_ParseFile(Map_file, "load_Map_%s", .bExtra = true, .extra = Mapid);
	    return 1;
	}
	return 0;
}

stock LoadNewMap()
{
    new file[64];
    mapid %= MAX_MAP_FILES;
    format(file, sizeof(file), "/Maps/%d.ini", mapid);
    if(!fexist(file)) return printf("[NOTICE] File Bugged.");
    LastMapStarted = mapid;
    mapid++;
    return mapid-1;
}

stock ClearObjects()
{
	for(new i; i<MAX_OBJECTS; i++)
	{
		if(IsValidObject(i)) DestroyObject(i);
	}
}

stock DestroyAllVehicle()
{
    for(new i=1;i<=MAX_VEHICLES;i++)
	{
    	DestroyVehicle(i);
	}
	return 1;
}

stock GetRandomMap()
{
    new file[64];
    new i = 0, count = 0, Maps[MAX_MAP_FILES], Mapid;
    for( ; i != MAX_MAP_FILES; ++i)
	{
	    if(LastMapStarted == i) continue;
	    format(file, sizeof(file), "/Maps/%d.ini", i);
		if(fexist(file))
		{
 			Maps[count] = i;
 			count++;
 		}
    }
    if(count == 0)
	{
	    return NoMapCheck();
    }
    Mapid = Maps[random(count)];

	format(file, sizeof(file), "/Maps/%d.ini", Mapid);
	if(fexist(file))
	{
	    LastMapStarted = Mapid;
	    return Mapid;
	}
	else return printf("[NOTICE] File Bugged.");
}
Reply
#9

Bump
Reply
#10

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)