View Single Post
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 10-19-2020 , 23:07   Re: Trigger a button like func_door?
Reply With Quote #2

Code:
public void OnPluginStart()
{
	HookEntityOutput("func_door", "OnFullyOpen", OnDoorOpened);
}

public void OnDoorOpened(const char[] output, int caller, int activator, float delay)
{
	if (activator > 0 && activator <= MaxClients && GetClientTeam(activator) == 3)
		PrintToChatAll("%N has opened the door.", activator);
}
Something like this if it's a door and it's fully opened. There's a lot of things you can change with this to get it how you want.
Drixevel is offline