Raised This Month: $32 Target: $400
 8% 

[CSGO] Map doesn't change when server is empty


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Focus Nation
Member
Join Date: Nov 2020
Old 12-18-2020 , 09:37   [CSGO] Map doesn't change when server is empty
Reply With Quote #1

So when timelimit runs out and I'm on the server the map changes on it's own when I'm not on the server and it's empty it goes down to 0 and then says "this is the last round!!!" and doesn't change unless someone uses rtv, anyway to fix this?
__________________

Focus Nation is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 12-22-2020 , 20:24   Re: [CSGO] Map doesn't change when server is empty
Reply With Quote #2

Quote:
Originally Posted by Focus Nation View Post
So when timelimit runs out and I'm on the server the map changes on it's own when I'm not on the server and it's empty it goes down to 0 and then says "this is the last round!!!" and doesn't change unless someone uses rtv, anyway to fix this?
Ummmm u mean this plugin
This will Force end map

Code:
#include <sourcemod>
#include <cstrike>

new bool:g_bAllowRoundEnd = false;

public Plugin:myinfo = 
{
	name = "Force Map End",
	author = "Zipcore, 1NutWunDeR",
	description = "",
	version = "1.0",
	url = ""
}

public OnPluginStart()
{
	CreateTimer(1.0, CheckRemainingTime, INVALID_HANDLE, TIMER_REPEAT);
}

public Action:CheckRemainingTime(Handle:timer)
{
	new Handle:hTmp;	
	hTmp = FindConVar("mp_timelimit");
	new iTimeLimit = GetConVarInt(hTmp);			
	if (hTmp != INVALID_HANDLE)
		CloseHandle(hTmp);	
	if (iTimeLimit > 0)
	{
		new timeleft;
		GetMapTimeLeft(timeleft);
		
		switch(timeleft)
		{
			case 1800: PrintToChatAll("Time Remaining: 30 minutes");
			case 1200: PrintToChatAll("Time Remaining: 20 minutes");
			case 600: PrintToChatAll("Time Remaining: 10 minutes");
			case 300: PrintToChatAll("Time Remaining: 5 minutes");
			case 120: PrintToChatAll("Time Remaining: 2 minutes");
			case 60: PrintToChatAll("Time Remaining: 60 seconds");
			case 30: PrintToChatAll("Time Remaining: 30 seconds");
			case 15: PrintToChatAll("Time Remaining: 15 seconds");
			case -1: PrintToChatAll("3..");
			case -2: PrintToChatAll("2..");
			case -3: PrintToChatAll("1..");
		}
		
		if(timeleft < -3 && !g_bAllowRoundEnd)
		{
			g_bAllowRoundEnd = true;
			CS_TerminateRound(0.5, CSRoundEnd_TerroristWin, true);
		}
	}
}

public Action:CS_OnTerminateRound(&Float:delay, &CSRoundEndReason:reason)
{
	g_bAllowRoundEnd = false;
	return Plugin_Continue;
}
Attached Files
File Type: sp Get Plugin or Get Source (force_map_end.sp - 104 views - 1.5 KB)
File Type: smx force_map_end.smx (3.7 KB, 36 views)

Last edited by oqyh; 12-22-2020 at 20:25.
oqyh is offline
Focus Nation
Member
Join Date: Nov 2020
Old 12-23-2020 , 18:24   Re: [CSGO] Map doesn't change when server is empty
Reply With Quote #3

Already had this and it seems to work for a few maps and then all of the sudden it stops working :S
__________________

Focus Nation is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 12-24-2020 , 02:57   Re: [CSGO] Map doesn't change when server is empty
Reply With Quote #4

Quote:
Originally Posted by Focus Nation View Post
Already had this and it seems to work for a few maps and then all of the sudden it stops working :S
Type in Console
timeleft
and then look at chat you will see timeleft remaining to map change + some maps have there own cvar thats why type timeleft and check every map
oqyh is offline
Focus Nation
Member
Join Date: Nov 2020
Old 12-26-2020 , 08:48   Re: [CSGO] Map doesn't change when server is empty
Reply With Quote #5

Quote:
Originally Posted by oqyh View Post
Type in Console
timeleft
and then look at chat you will see timeleft remaining to map change + some maps have there own cvar thats why type timeleft and check every map
Ah yea you might be right, this only happens on some maps, whats your advice?
__________________

Focus Nation is offline
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

Forum Jump


All times are GMT -4. The time now is 01:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode