There wasn't a lot of documentation available for the door_moving event so the following code will let you see the entity index of the door that's moving when the event is called and the door first begins its motion.
PHP Code:
#include <sourcemod>
#include <sdktools>
#define VERSION "1.0"
public Plugin:myinfo = {
name = "Door Move",
author = "databomb",
description = "temporary plugin for door moving event",
version = VERSION,
url = ""
};
public OnPluginStart()
{
CreateConVar("sm_doormove_version", VERSION, "Current version of this plugin", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
HookEvent("door_moving",Event_DoorMove);
}
public Action:Event_DoorMove(Handle:event, const String:name[], bool:dontBroadcast)
{
new entityidx = GetEventInt(event, "entindex");
LogMessage("door move ent idx %i", entityidx);
return Plugin_Continue;
}
You should also be able to grab the userid of the player who triggered the door move but I wasn't having any luck as they all returned as 0.
What I noticed was that doors that don't slide won't trigger this event, that is, normal doors in houses that pivot along a fixed point do not utilize this event. Anything that slides on a fixed axis seems to trigger the event such as a glass door or cell door.
This event could prove useful in jailbreak servers with rules that cell doors must be open by a certain time. Typically there's a master control button that will trigger multiple door_moving events all at one time so you can easily tell if the cell doors were opened by a certain time. If not you could certainly grab the entity indexes and trigger the events, which would be map-specific, but it's also feasible that triggering all doors on the level could work as well.
These comments probably aren't helpful to anyone right now but maybe someone in the future could use this info for a different plugin.