diff --git a/simulate_ze_server/scripting/simulate_ze_server.sp b/simulate_ze_server/scripting/simulate_ze_server.sp index 25f054ee..b78f57a6 100644 --- a/simulate_ze_server/scripting/simulate_ze_server.sp +++ b/simulate_ze_server/scripting/simulate_ze_server.sp @@ -77,13 +77,20 @@ public Action read_info_over_txt(Handle timer, any data) } if (count == 0) //mapname { + //its prefered instead to just fake the mapname since the fakeclients wont have to be kicked on mapchange then. + /* char mapname[256]; GetCurrentMap(mapname, sizeof(mapname)); if (!StrEqual(mapname, lineBuffer)) { - ForceChangeLevel(lineBuffer, ""); + //ForceChangeLevel(lineBuffer, ""); break; } + */ + char cmd[256]; + Format(cmd, sizeof(cmd), "sv_mapname_override %s", lineBuffer); + ServerCommand(cmd); + ServerCommand("mp_timelimit 9000000"); //avoid map switches. also handled server hibernation with https://forums.alliedmods.net/showthread.php?t=331283 } else if (count == 1) //hostname { @@ -162,6 +169,8 @@ public Action read_info_over_txt(Handle timer, any data) CloseHandle(fileHandle); //kicking clients whos UserID is not connected on ze anymore. + + for (int i = 0; i <= MaxClients; i++) { if (IsValidClient(i) && !IsClientSourceTV(i))