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;
}
}