View Single Post
Sreaper
髪を用心
Join Date: Nov 2009
Old 03-27-2022 , 17:25   Re: [TF2-specific] How would I write a plugin that runs commands on point capture?
Reply With Quote #3

For running a command on point capture you can do:

PHP Code:
public OnPluginStart()
{
    
HookEvent("teamplay_point_captured"TeamplayPointCaptured);
}

public 
TeamplayPointCaptured(Handle eventchar[] namebool dontBroadcast)
{    
    
ServerCommand("sm_addtime 600")

As far as limiting the command to only run once per point I'm not sure too sure. Please share if you end up finding the solution.

Last edited by Sreaper; 03-27-2022 at 17:27.
Sreaper is offline