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

Solved [L4D]stripper:source How to call FinaleStart


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZBzibing
Senior Member
Join Date: Dec 2012
Old 05-15-2022 , 08:31   [L4D]stripper:source How to call FinaleStart
Reply With Quote #1

I found a problem in all rescue maps, enter the command director_force_panic_event, can not start the corpse tide
The FinaleStart that triggers the rescue is also not found in the stripper

How to trigger rescue event with stripper
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:

Last edited by ZBzibing; 07-17-2022 at 08:30.
ZBzibing is offline
ZBzibing
Senior Member
Join Date: Dec 2012
Old 07-17-2022 , 08:30   Re: [L4D]stripper:source How to call FinaleStart
Reply With Quote #2

因为电台需要触发两次,所以stripper需要写入两次触发.
我用插件方式来实现的.

Code:
//判断 - 最终地图
bool IsFinalMap()
{
	char sMap[64];
	GetCurrentMap(sMap, sizeof(sMap));
	if (StrEqual(sMap, "l4d_vs_hospital05_rooftop", false)
		 || StrEqual(sMap, "l4d_vs_smalltown05_houseboat", false)
		 || StrEqual(sMap, "l4d_vs_airport05_runway", false)
		 || StrEqual(sMap, "l4d_vs_farm05_cornfield", false)
		)
	{
		ButtonPress();
		return true;
	}
	else
	{
		return false;
	}
	//return Plugin_Continue;
}
/*--------------------ACTION游戏执行--------------------*/
//执行 - 地图机关按钮
void ButtonPress()
{
	int button = FindEntityByClassname(-1, "func_button");
	AcceptEntityInput(button, "Press");
}
//执行 - 地图营救电台触发
public Action FinaleStart(Handle Timer)
{
	UnflagAndExecuteCommand(TriggeringBot, "ent_fire", "trigger_finale", "");
	//return Plugin_Continue;
}
//调用执行指令
public Action UnflagAndExecuteCommand(client, String:command[], String:parameter1[], String:parameter2[])
{
	if (client == 0 || !IsClientConnected(client))
	{
		for (new i = 1; i <= MaxClients; i++)
		{
			if (IsClientConnected(i) && IsClientInGame(i))
			{
				client = i;
				break;
			}
		}
	}
	
	int userflags = GetUserFlagBits(client);
	SetUserFlagBits(client, ADMFLAG_ROOT);
	int flags = GetCommandFlags(command);
	SetCommandFlags(command, flags & ~FCVAR_CHEAT);
	FakeClientCommand(client, "%s %s %s", command, parameter1, parameter2);
	SetCommandFlags(command, flags);
	SetUserFlagBits(client, userflags);
}
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
ZBzibing is offline
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 10:26.


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