View Single Post
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-19-2018 , 00:43   [L4D] How to force mission lost
Reply With Quote #1

Hi,
how to force mission lost without having killing all team?

I tried:
Code:
	int oldFlags = GetCommandFlags("scenario_end");
	SetCommandFlags("scenario_end", oldFlags & ~(FCVAR_CHEAT | FCVAR_LAUNCHER));
	ServerCommand("scenario_end");
	ServerExecute();
	SetCommandFlags("scenario_end", oldFlags);
(the code from No Death Check Until Dead plugin.)
But calling it just in arbitrary place has no effect.

Also:
Code:
	Event hEvent = CreateEvent("mission_lost");
	if (hEvent != null)
	{
		hEvent.Fire(true);
	}
with no luck. Of course, it's just post-event, but I had to try it.

Ideas? Thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 10-23-2018 at 11:08.
Dragokas is offline