View Single Post
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 11-21-2018 , 16:56   Re: [L4D] How to force mission lost
Reply With Quote #22

This is the function in the l4dstocks.inc by Mr.Zero
So, simply use:
Code:
ForceServerCommand("scenario_end");
Code:
stock ForceServerCommand(const String:command[]) {
	
	new iFlags = GetCommandFlags(command);
	SetCommandFlags(command, iFlags & ~(FCVAR_CHEAT|FCVAR_LAUNCHER));
	ServerCommand("%s", command);
	ServerExecute();
	SetCommandFlags(command, iFlags);
	SetCommandFlags(command, iFlags | FCVAR_CHEAT);
}
Skyy is offline