View Single Post
Nightfall_Neko
New Member
Join Date: Mar 2022
Location: NY, USA
Old 03-28-2022 , 21:14   Re: [TF2-specific] How would I write a plugin that runs commands on point capture?
Reply With Quote #5

aaaaa I can't compile what I'm made now >.>

PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

#define PLUGIN_VERSION "1.0"

public Plugin myinfo 
{
    
name "Cap and Command",
    
author "Nightfall",
    
description "Run commands on point capture",
    
version PLUGIN_VERSION,
    
url "notapplicable"
}
public 
OnPluginStart()
{
    
HookEvent("teamplay_point_captured"TeamplayPointCaptured);
}

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

With your help on how to hook onto the point being captured, I at least have more done than before. Compiler insists that I need a semicolon on that last line, or did I not need to include pragma?

So dang used to brackets that now that they're useless I feel like I wasted time in college on java courses ;_;


Ah, I answered my own question double checking my work. Now the compiler won't actually spit out the spx though. Complains it has no ability to write to (...sourcemod-1.10.0\compiled\<filename>)

Last edited by Nightfall_Neko; 03-28-2022 at 21:22. Reason: Answered my own question but a new one came up
Nightfall_Neko is offline