Quote:
Originally Posted by Kashinoda
Your English is good enough
It seems the server_spawn event is too late when multiple people are on the server, it sends 'retry' to some clients after 'round_start' which is no good. I didn't experience this when testing with two clients but with more than that the results were bad.
Here's another version, from my testing it will disconnect earlier. This all happens very quickly so it's hard to see how it works on a larger server (I only have a small clan server).
PHP Code:
#include <sourcemod>
#pragma semicolon 1
#pragma tabsize 0
#pragma newdecls required
public Plugin myinfo =
{
name = "",
author = "Kashinoda",
description = "",
version = "1",
url = "http://alliedmods.net/"
};
public void OnPluginStart()
{
AddCommandListener(MapChange, "changelevel");
AddCommandListener(MapChange, "map");
}
public Action MapChange (int client, const char[] cmd, int argc)
{
LogMessage("Map changing, sending 'retry' to clients");
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientConnected(i) && !IsFakeClient(i))
{
ClientCommand(i, "retry");
LogMessage("Sending retry to %N", i);
}
}
}
Here's the terminal output using this:
Code:
map aim_office
L 03/30/2019 - 14:39:05: [test.smx] Map changing, sending 'retry' to clients
L 03/30/2019 - 14:39:05: [test.smx] Sending retry to Kashinoda
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" disconnected (reason "Disconnect")
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" [256 704 544] committed suicide with "world"
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx>" switched from team <TERRORIST> to <Unassigned>
Dropped Kashinoda from server: Disconnect
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
---- Host_Changelevel ----
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
*** Map Load: workshop/260679898/aim_office: Map Group funL 03/30/2019 - 14:39:05: Log file closed
Server logging data to file logs/L164_132_203_029_27015_201903301439_000.log
L 03/30/2019 - 14:39:05: Log file started (file "logs/L164_132_203_029_27015_201903301439_000.log") (game "/home/csgosv/serverfiles/csgo") (version "7436")
L 03/30/2019 - 14:39:05: Loading map "workshop/260679898/aim_office"
L 03/30/2019 - 14:39:05: server cvars start
|
good idea ! , when i test , change 7 map with "sm_map" , is not crash , map 8 ez crash
, bicause i think retry for event "sm_map" is so quickly ! and changelevel is not work , maybe bicause timer calculation changelevel is not easy .
i think you see this code :
Code:
public Action OnLogAction(Handle source, Identity ident,int client,int target, const char[] message)
{
if( StrContains( message , "changed map to" ) != -1)
{
CreateTimer( 2.9 , Timer_RetryPlayers , _ , TIMER_FLAG_NO_MAPCHANGE );
}
}
when is use , i never see any crash for me and players my server (25 player is not crash)
if we can get the name map (Voted) on default vote map , and insert to logaction , we don't see crash for ever .
but i think default vote map , is don't have API for we developer , valve don't like fix this problem , We all know this we can not fix the problem from the base , but we try