PHP Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required
#define PLUGIN_VERSION "1.0"
public void OnMapStart()
{
int entity = -1;
char sMap[32];
GetCurrentMap(sMap, sizeof(sMap));
while ((entity = FindEntityByClassname(entity, "prop_door_rotating_checkpoint")) != INVALID_ENT_REFERENCE)
{
if (strcmp(sMap, "c1m4_atrium") == 0 && GetEntProp(entity, Prop_Data, "m_iHammerID") == 171930)
{
HookSingleEntityOutput(entity, "OnOpen", OnSaferoomOpened);
break;
}
}
}
public void OnSaferoomOpened(const char[] output, int caller, int activator, float delay)
{
PrintToChatAll("Hello World");
}
Worked For Me
__________________