View Single Post
q1085909155
Member
Join Date: Oct 2021
Old 07-04-2023 , 12:26   Re: [TF2] The Infection - Yet Another Zombie Survival Gamemode for TF2
Reply With Quote #15

I have some code that opens all the doors on the server that you might want to refer to
Code:
CreateTimer(0.1, Timer_Doors, TIMER_REPEAT);
	

public Action Timer_Doors(Handle timer)
{
	int doors=-1;
	while((doors=FindEntityByClassname(doors, "func_door"))!=-1)
    {
        AcceptEntityInput(doors, "Open");
    }
	
	KillTimerSafe(timer);
}

public void KillTimerSafe(Handle &hTimer)
{
	if(hTimer != INVALID_HANDLE)
	{
		KillTimer(hTimer);
		hTimer = INVALID_HANDLE;
	}
}
q1085909155 is offline