Raised This Month: $12 Target: $400
 3% 

[TF2] [REQUEST] RoundEnd forcing (help need)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ExtraSpeeed
Member
Join Date: Mar 2015
Location: Russia, Moscow
Old 11-12-2015 , 12:57   [TF2] [REQUEST] RoundEnd forcing (help need)
Reply With Quote #1

Hi !
I want to have a round end plugin.
So, i add action in mine Jailbreak code :

Code:
public Action:ForceGameEnd(client, args)
{
	if (args != 0 && args != 1)
	{
		ReplyToCommand(client, "sm_roundendtest [Winning Team: Red/Blue/None]");
		return Plugin_Handled;
	}
	
	new iEnt = -1;
	iEnt = FindEntityByClassname(iEnt, "game_round_win");
	
	if (iEnt < 1)
	{
		iEnt = CreateEntityByName("game_round_win");
		if (IsValidEntity(iEnt))
			DispatchSpawn(iEnt);
		else
		{
			ReplyToCommand(client, "Unable to find or create a game_round_win entity!");
			return Plugin_Handled;
		}
	}
	
	new iWinningTeam = 0;
	if (client) 
		iWinningTeam = GetClientTeam(client);
	
	if (args == 1)
	{
		decl String:buffer[32];
		GetCmdArg(1, buffer, sizeof(buffer));
	
		if (StrEqual(buffer, "blue", false))
			iWinningTeam = 3;
		else if (StrEqual(buffer, "red", false))
			iWinningTeam = 2;
		else if (StrEqual(buffer, "none", false))
			iWinningTeam = 0;
	}
	
	if (iWinningTeam == 1)
		iWinningTeam --;
		
	SetVariantInt(iWinningTeam);
	AcceptEntityInput(iEnt, "SetTeam");
	DispatchKeyValue(iEnt, "force_map_reset", "true");
	AcceptEntityInput(iEnt, "RoundWin");
	ServerCommand("sm_jailreset");
	
	CPrintToChatAll("{yellow}[Jail] {olive}Администратор %N завершил раунд.", client);
	
	return Plugin_Handled;
}
But, how to reset the map ? It's saving =\

Code:
DispatchKeyValue(iEnt, "force_map_reset", "true");
- doesn't work.
__________________
ExtraSpeeed is offline
Send a message via Skype™ to ExtraSpeeed
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 11-12-2015 , 13:33   Re: [TF2] [REQUEST] RoundEnd forcing (help need)
Reply With Quote #2

The mp_restartgame/round cvar doesn't reset the map?
Potato Uno is offline
ExtraSpeeed
Member
Join Date: Mar 2015
Location: Russia, Moscow
Old 11-12-2015 , 13:53   Re: [TF2] [REQUEST] RoundEnd forcing (help need)
Reply With Quote #3

Quote:
Originally Posted by Potato Uno View Post
The mp_restartgame/round cvar doesn't reset the map?
Hmm.. i don't know this cvar. So i must use this cvar, that action will work ?
__________________
ExtraSpeeed is offline
Send a message via Skype™ to ExtraSpeeed
Reply



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 05:19.


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