Raised This Month: $51 Target: $400

[CS:S] SM:CTF - Capture the flag (Version 1.1 Updated 2011-11-12)

Post New Thread Reply   
Thread Tools Display Modes
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
Plugin Version:
Plugin Category:
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Capture the flag gameplay modification. Capture the enemy flag and bring it to your own.
    Old 11-09-2011 , 18:14   [CS:S] SM:CTF - Capture the flag (Version 1.1 Updated 2011-11-12)
    Reply With Quote #1

    SM:CTF Capture the flag

    This is a capture the flag modification for Counter-Strike: Source. There are 2 flags on the map, one for each team. Players need to capture the enemy's flag and bring it back to their own one.

    This is based off and uses models from the eventscript SCTF by sn4k3. It wasn't updated after the orangebox update and it's too much of a fun mod to get lost.
    Thanks to sn4k3!

    Check out SM:Conquest either!

    Have a go at!

    The blue team plays against the red team. The aim is to carry the enemy's flag to the spawn of the own flag. The own flag needs to be at the spawn to score. So you have to conquer the opponent's flag and defend your own team's one at the same time. It's necassary for the whole team to work together tactically to win.

    There are several classes for the player to choose off. They differ in health, speed and weapons. If a player dies, he's automatically respawned with the next respawnwave. The respawnwaves are different for CT and T.

    The team which reaches x points first or which got more points after x minutes wins. If both teams have the same points after the time is up, it's a draw.

    Players currently carrying a flag are regonized by a colored beam following them and a big speechbubble above their head. You're only able to carry one flag at a time.
    The screen of the player itself is faded slightly into the color of the flag he's carrying.

    Beware! Enemys will see flag carriers on their radar as well!

    There is a small info panel, which shows information about the current status of both flags and the score of both teams. Possible statuses are the name of the flag carrier, the countdown until a dropped flag is returned to it's spawn or the flag just idleing at it's spawn. It's located in the middle bottom of the screen.

    There might be a spawnprotection on the flags. This is indicated by a green beam and the flag being black. You have to wait a few seconds until you're able to capture it.

    Player Commands
    • sm_class (class, !class, /class) - Opens the class menu.
    • sm_ctfstats (ctfstats, !ctfstats, /ctfstats) - Opens a panel with player stats

    There are own ctf statistics saved for each player. It's rather useless and i never expanded on it, but i'll leave it in here for the lol'z.

    Here's an older info page about the mod.



    1. Download the smctf_x.zip and upload the content to your gameserver.
    2. If you're using a fast download server, upload the materials, models and sounds on there either.
    3. Restart the server or change the map to load the plugin.
    4. Once loaded, edit the cfg/sourcemod/plugin.smctf.cfg to configure to your needs.
    5. Enjoy the game.
    Server admins are able to add as many classes as they like. There are some necassary and optional keys to be used in the sourcemod/configs/smctf_classes.cfg:
    • name: The name of the class shown in the chat and menu
    • description: A short description of the class
    • weapons: List of weapons (without the "weapon_" prefix) the class gets on spawn. Seperated by commas ",". Specfiy the backclip ammo or amount of nades with a ":number" added to the name like "ak47:200"
    • health: Set the health of the player
    • speed: Set the speed multiplicator of the player. 1.0 is default. 1.4 would be 40% faster.
    • model: The modelpath, relative to the models/ folder, to a model, the player should use. It's automatically precached, but not added to the downloadables..
        "cowboy" // this can be random
            "name" "Cowboy"
            "description" "Pistol Arts"
            "health" "80"
            "speed" "1.4"
            "weapons" "knife,elite:200,hegrenade,flashbang"
    Adding flags on maps
    There are already flags on all default maps. The coordinates are saved in configs/smctf_maps.cfg, but you shouldn't need to edit that file by hand.

    Just use the sm_setflag <red|blue> command ingame, to set the flag at your feet. Like typing "!setflag red" in chat to set the red flag at your position. The smctf_maps.cfg is automatically updated.

    Players are respawned in waves every x seconds. You're able to specify the wave length in seconds depending on the amount of players playing. This is, so playing a match with a small group of players doesn't require 20 seconds to respawn, if you die just after a wave. During that time, the enemy might have scored twice!
    At a full server with 20+ slots, a higher respawn time is better to balance the game.

    Open up the configs/smctf_respawnwaves.cfg to set the respawn time until x players are playing. Spectators are disregarded.

    Admin Commands
    • sm_setflag - Set's the position of a flag on a map at the origin of the player. Usage: sm_setflag <red|blue>
    • sm_dropflag - Forces the a player to drop the flag. Usage: sm_dropflag <#userid|steamid|name>
    • sm_resetctfstats - Resets a players ctf stats. Usage: sm_resetctfstats <#userid|steamid|name>
    Edit this convars in the autogenerated config file in cfg/sourcemod/plugin.smctf.cfg after you first ran the plugin.
    • smctf_scorelimit - When any team scores x flags game will end. (Default: 10)
    • smctf_flagtake - How many frags should a player win when capturing a flag? (Default: 1)
    • smctf_flagreturn - How many kills should a player win when returning his team's flag to his base? (Default: 1)
    • smctf_flagscore - How many kills should a player win when scoring? (Default: 2)
    • smctf_flagdrop - How many kills should a player lose when dropping a flag? (Default: 1)
    • smctf_dropreset - How many seconds after drop should we return the flag automatically? (Default: 15) This is obsolete if smctf_returnondrop is 1.
    • smctf_flagprotection - How long should the dropped/returned flag be protected from being picked up in seconds? (Default: 5)
    • smctf_spawnprotection - How long should a player resist any damage after spawn? (Default: 3)
    • smctf_unlimitedammo - Give players ammo back, if they got 0 in their 2nd clip? (Default: 1)
    • smctf_returnondrop - Instantly return the flag to it's spawn, when it's dropped? (Default: 0)
    • smctf_returnonownteam - Instantly return the dropped flag to it's spawn, if it gets picked up by a player of the same colored team? (Default: 0)
    • smctf_captureownflag - Are players allowed to capture their own dropped flag? Set this to 0 and the flag is only returned after the timeout. (Default: 1)
    • smctf_requireownflaghome - Should it only be possible to score, if the own flag is at it's spawn? (Default: 1)
    • smctf_statprune - Delete stats of players who haven't been on the server for x minutes. (Default: 230400 -> 160 days)
    • smctf_nadetrails - Add colored beam trails to grenades? (Default: 1)
    • smctf_resetscores - Reset both team's scores to 0 if there is no player on the server anymore? (Default: 1)
    There are several events logged for an advanced stats system (like HLX:CE) to pick up.
    Player Actions:

    • smctf_flag_captured - Fired when a player captures a flag.
    • smctf_flag_dropped - Fired when a player drops a flag.
    • smctf_flag_returned - Fired when a player returns his own team's flag to his base.
    • smctf_scored - Fired when a player carrys the enemy's flag to his own flag at his base.
    Team Actions:
    • smctf_team_win_ct - Fired when CTs win the map
    • smctf_team_lose_ct - Fired when CTs lose the map
    • smctf_team_win_t - Fired when Ts win the map
    • smctf_team_lose_t - Fired when Ts lose the map
    Thanks to these people:
    • sn4k3 - His initial eventscript SCTF, which gave the idea.
    • Venjax - Modifying the DODS flag models.
    • WCFAN Community - Endless patience on testing this mod earlier this year.
    • berni, Chanz - Creating smlib.
    • exvel - Sharing his colors library.
    • psychonic - Helping with the logging with his loghelper include.
    • psychonic, Tsunami - sdkhooks
    • teame06 - Catching the intermission
    • blodia - Sharing how to spawn brush entities
    • bobis - Testing and suggesting new great features

    I really hope i didn't forget anything here. I didn't touch the code for a while and it's a mess, so i'll plan to rewrite it cleanly.

    Version 1.1 - 2011-11-12
    01. * Added smctf_nadetrails convar to control grenade beam trails
    02. * Added countdown display to flag protection
    03. * Added smctf_captureownflag and smctf_requireownflaghome convars
    04. * Added smctf_resetscores convar to reset scores to 0 if there is no player on the server anymore
    05. * Added mp_restartgame handling to reset scores
    06. ! Fixed not always showing the correct team name when capturing a flag
    07. ! Fixed weapons not getting removed on death and disconnect.
    08. ! Fixed not removing all dropped weapons. Tried to avoid removal of currently held weapons.
    09. ! Fixed unlimited backclip ammo
    10. ! Fixed not being able to disable player spawn protection
    11. ? Now restarts the game by the time the 2nd player spawns
    12. ? Switched to SM1.4's new CS_OnCSWeaponDrop forward to avoid loss of ammo

    Version 1.0.4 - 2011-11-10
    Initial public release
    Total downloads prior update: 37

    This plugin won't compile on the forum, since it's using some custom includes.
    Attached Files
    File Type: zip smctf_1.1.zip (1.04 MB, 3698 views)

    Last edited by Peace-Maker; 11-24-2011 at 05:53. Reason: Updated to 1.1
    Peace-Maker is offline
    Senior Member
    Join Date: Apr 2011
    Old 11-09-2011 , 18:54   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #2


    log error
    Attached Files
    File Type: log errors_20111110.log (471 Bytes, 860 views)
    angel635 is offline
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 11-09-2011 , 18:59   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #3

    Originally Posted by angel635 View Post

    log error

    redownload. Mh.. sdkhooks 2.1 and its safety checks >..<
    Peace-Maker is offline
    Senior Member
    Join Date: Apr 2011
    Old 11-09-2011 , 19:23   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #4

    Tout a été effectuer ^^

    Every effort has been made ​​^ ^
    angel635 is offline
    Senior Member
    Join Date: Jun 2010
    Location: Athens, Greece
    Old 11-09-2011 , 19:57   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #5

    Yeeeeeeeeeeeeeeeeeeeeeees , CSS CTF Finallyyyyyyyyyyyy

    Time to take the duals and show them the real COWBOY!!!

    Last edited by bobis; 11-09-2011 at 19:57.
    bobis is offline
    Senior Member
    Join Date: Sep 2009
    Old 11-09-2011 , 20:35   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #6

    Nice Pluing good
    I expect another css fun mod

    Last edited by jungjunghoo; 11-09-2011 at 20:36.
    jungjunghoo is offline
    Join Date: Dec 2010
    Old 11-09-2011 , 22:52   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #7

    You forgot to add the other requirements for this plugin...

    In the smctf_classes.sp and smctf_flag.sp make sure you put
    #include <colors>
    EDIT: I'm getting these errors when compiling:

    Last edited by Logifl3x; 11-09-2011 at 23:05.
    Logifl3x is offline
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 11-10-2011 , 05:02   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #8

    Its in the credits section and you only need to compile the smctf.sp. The smctf_*.sp aren't own plugins, but only seperated source to keep the overview. They are included in the smctf.sp.

    No need to add includes in these again.
    Peace-Maker is offline
    Join Date: Dec 2010
    Old 11-10-2011 , 06:04   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #9

    So when compiling, as long as the smctf.sp compiles then it's all sweet?
    Logifl3x is offline
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 11-10-2011 , 06:25   Re: [CS:S] SM:CTF - Capture the flag (Version 1.0.4)
    Reply With Quote #10

    Yes, you only need to compile the smctf.sp.
    Peace-Maker is offline

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump

    All times are GMT -4. The time now is 08:01.

    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode