Raised This Month: $ Target: $400

Just Capture the Flag (CTF) v1.32c (26 jun 2012)

Post New Thread Reply   
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Arkshine (91)
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2010 , 01:59   Just Capture the Flag (CTF) v1.32c (26 jun 2012)
Reply With Quote #1

Just Capture the Flag
Mod version: 1.32c


Thread contents:

Gameplay is simple, two teams, RED (Terrorists) and BLUE (CTs), each having a flag near their base.
The goal of each team is to capture the enemy flag while defending their own because in order to capture the enemy flag, you must bring it to your base and your flag must be there.
Enemy flags are stolen and team flags are returned by a simple touch.

Typical CTF gameplay... HOWEVER, it's got alot of features to enhance and balance the gameplay.

Highlighted features:
- Respawn, spawn protection and a team balance system
- Adrenaline points that give players temporary benefits when adrenaline reaches 100.
- Rewards (frags, adrenaline, money) for getting, capturing, killing carrier and returning flags.
- Assist rewards for assisting teammates on flag capturing and returning.
- Custom buy menu which allows all players to buy all weapons, including C4 (plantable anywhere, kills everything in range).
- Free ammo ! You get full free ammo whenever you buy a gun or you press the buy ammo keys.
- Killed enemies drop bonus items like medkits, adrenaline shots and ammo boxes.
- Mod has an API, see the API section for more details.
- You can disable individual features!
- And more, discover them yourself!

Follow these instructions carefully:

  1. Download and extract orpheu_base.zip into your amxmodx folder (Orpheu module thread)
  2. Download and extract jctf_resources.zip in your server's cstrike folder.
  3. Download jctf.txt and place it in your amxmodx/data/lang folder.
  4. Download jctf.sma and place it in your amxmodx/scripting folder then compile it (How to compile)
  5. Install plugin (move it from compiled to plugins) and write it's name in your plugins.ini file.
  6. Read the sections below on how to manage the mod.

NOTE: If you *really* can't get orpheu modeule to work, you can just disable it's usage: edit jctf.sma, change FEATURE_ORPHEU to false and recompile... howver, infinite round and flag capture round end will not work!


NOTE: Reset cvars need to be set on map-based configs (amxmodx/configs/maps/<mapname>.cfg) in order to be changed!

Mod cvars:
ctf_respawntime (reset to 10) - players respawn time
ctf_protection (reset to 5) - players spawn protection time
ctf_weaponstay (default 30) - how long do weapons and items stay on ground
ctf_spawnmoney (default 1000) - money bonus when spawning (unless it's a suicide)
ctf_infiniteround (default 1) - round doesn't end if all players form one team die (requires FEATURE_ORPHEU) changing this restarts game!
ctf_flagheal (default 1) - toggles if flag bases heal teammates
ctf_flagreturn (default 120) - flag auto-return time
ctf_flagendround (default 0) - if a flag is captured, round is ended (requires FEATURE_ORPHEU)
ctf_flagcaptureslay (default 0) - if a flag is captured, loosing team is slain (requires ctf_flagendround 1 OR FEATURE_ORPHEU false)
ctf_itempercent (default 30) - chance that items spawn when a player is killed, 0-100
ctf_nospam_flash (default 20) - delay of rebuying two flashbangs in a life
ctf_nospam_he (default 20) - delay of rebuying a HE grenade in a life
ctf_nospam_smoke (default 20) - delay of rebuying a smoke grenade in a life
ctf_spawn_prim (reset to "m3") - player's primary spawn weapon - use "" to disable (see list of weapon names in sma)
ctf_spawn_sec (reset to "glock") - player's secondary spawn weapon - use "" to disable (see list of weapon names in sma)
ctf_spawn_knife (reset to 1) - toggles if player receives a knife or not upon spawn
ctf_sound_taken (default 1) - toggles if the "flag taken" sounds can be heard
ctf_sound_dropped (default 1) - toggles if the "flag dropped" sounds can be heard
ctf_sound_returned (default 1) - toggles if the "flag returned" sounds can be heard
ctf_sound_score (default 1) - toggles if the "X team scores" sounds can be heard
ctf_dynamiclights (default 1) - set the default dynamic lights setting, players will still be able to toggle individually using /lights
ctf_glows (default 1) - set if entities can glow, like when players have flag or an adrenaline combo, weapons start to fade, etc.

Game cvars used by this mod:
mp_c4timer (recommended 20) - time before the C4 devices explode
mp_winlimit - when a team reaches this number of flag captures the map ends
mp_timelimit - map time limit (displayed as round timer)
mp_startmoney (recommended 3000) - starting money AND minimunm amount of money a player can have (unless it's a suicide)
mp_forcecamera - (0/1 - spectate enemies or not) mod fades to black if this is on and player is in free look (no teammates alive)
mp_forcechasecam - (0/1/2 - force chase cammera all/team/firstperson) same as above
mp_autoteambalance - enable/disable plugin's simple auto-team balance (checks at every player death)

Advanced configuration
You can customize the mod even more, you can find settings that I didn't made as CVars inside the source file (jctf.sma), there you can edit serval stuff, like disabling individual features, changing default settings for reset cvars, tweaking costs and rewards and many more.

Remember to re-compile and replace the compiled plugin in your plugins folder after you make any modifications to the jctf.sma file.


Admin commands
ctf_return red/blue - return the specified flag if it was dropped for at least 15 seconds (configurable)

Player commands
Can be used in: s = say, t = teamsay, c = console (note, console commands don't have the / in front!)

(s) /lights - enables/disables dynamic flag lights for that player
(s) /sounds 1-10 or test - sets the announcer volume, scale from 1 to 10, or plays an announcer sound for testing the volume (the test param)
(s,t) /help - shows the help text in console - includes server's mod settings of cvars and features
(s,t) /buy - shows the buy menu (not required, just use the normal buy key, default B)
(s,t) /spawn - buy an instant spawn for 50 adrenaline (configurable)
(s,t,c) /dropflag - drops the flag if you have it (WARNING: you will lose all rewards got for getting the flag!)
(s,t,c) /adrenaline - adrenaline combo pick menu once you got 100 adrenaline.

Flag placement
Once you load a map, both flags will spawn at the first player's spawn point.
As an RCON access admin you can move the flag bases to more suitable and ballanced places, you can do that using these commands in-game:

ctf_moveflag red/blue - move flag's base to your position, works even if you're dead or spectating
ctf_save - saves the flag base positions (as cstrike/maps/<mapname>.ctf)

Optionally, you can also download the jctf_mapflags.zip for some flag positions made by me, extract in server's cstrike/maps folder.

Recomandations and Issues:
Known issues:
  • (Fixed) The "ED_Alloc: no free edicts" problem may occur when too many items (entities) exist at once in the map, to fix this, you could:
    - Add "-num_edicts 4096" to server's run parameters
    - Decrease "ctf_itempercent" and "ctf_weaponstay" cvars, the less items on ground, the better.
  • (Fixed) Players using VGUI menus won't be able to buy weapons that aren't listed there (like C4 and enemy weapons) and the mod can't disable VGUI on players without altering their config, therefore they're notified when spawning that they must use /buy or disable VGUI menu themseleves.

  • Base-vs-base maps work best with this mod, most GunGame maps are like that.
  • Do not use plugins related to buying, buy menu or C4 events.




Translate this plugin to your language!

Servers running jCTF

Get addon plugins:
Some addon plugins made by other members that uses jCTF:
To install any of these plugins, you must first download jctf_api.zip, extract it into your amxmodx folder, also add the include required for the other mod (if any) and compile !

Send me a PM if you made some addon plugins if you want me to add them here.
You can also request addon plugins.

Making addon plugins (API):

Since v1.2, this mod has an API that can be used from other plugins to get or control stuff on this plugin.
To use it, you need to download the jctf_api.zip and include it in your addon-plugin.

In the archive you'll find the required include, jctf.inc and an example plugin, jctf_addon_example.sma.

You can request more forwards or natives to be added to the API for further control of this mod.

Thanks to:
  • The players that participated on my boring testing sessions
  • Arkshine for his Infinite Round and Round Terminator plugins, because I don't know anything about Orpheu
  • Some plugin developers from which I got a few ideeas/codes... but I don't remember who exacly :/
  • And the people that made good suggestions :}


    * Changed files: jctf.sma
    - Added ctf_dynamiclights cvar to enable server operators to disable dynamic lights by default, players can still re-enable them individually using /lights
    - Added ctf_glows cvar to enable server operators to disable glows on entities for performance, however it will degrade gameplay due to lack of visual information

    * Changed files: jctf.sma
    - Fixed rewards beeing default to 0 for steal and capturing flags (my bad).

    * Changes files: jctf.sma
    - Removed forcing of CVars - if you depended on that, use amxx.cfg to store default values of cvars.
    - Added posibility to disable respawn using ctf_respawntime 0.
    - Added posibility to disable spawn protection using ctf_protection 0.
    - Added posibility to disable dropped weapons fading out using ctf_weaponstay 0.
    - Added posibility to disable flag auto-return using ctf_flagreturn 0.
    - Fixed GameName printing CS 1.6 for CZ too, now it detects game name, if's unknown it doesn't write anything.
    - Fixed player rewards still printing if all rewards are 0.
    - Fixed MP3 files printing WAV error messages due to incorrect precaching method.

    * Changed files: jctf.sma, jctf_resources.zip
    - Fixed issue where plugin wouldn't trigger "Round_End" on ctf_flagendround 1 that caused issues with other plugins.
    - Added new orpheu signatures: functions/EndRoundMessage and functions/CHalfLifeMultiplay/UpdateTeamScores.
    - Changed "TeamScore" message to emessage, that way it can be hooked by other plugins.
    - Added updating team scores internally too.
    - Some other minor changes.

    * Changed files: jctf.sma, lang/jctf.txt, jctf_resources.zip
    - Added CVars: ctf_flagendround, ctf_flagcaptureslay and ctf_infiniteround (see thread for descriptions)
    - Changed /help command, it now prints most mod settings and features (which are enabled/disabled)
    - Added new orpheu signatures: functions/InstallGameRules and memory/CGameRulesOffsets (they're in jctf_resources.zip)
    - Changed feature define FEATURE_INFROUND to FEATURE_ORPHEU because it also disables flag capture ending round
    - Changed contents of lang keys: JOIN_NOFEATURES
    - Renamed lang keys: HELP_3_* to HELP_4_* and DEAH_NOFREELOOK to DEATH_NOFREELOOK
    - Added so that on new round, flags are returned to base (no matter what the reason of new round)

    * Changed files: jctf.sma
    - Fixed if you reload map with the plugin disabled the rounds will end normally.

    * Changed files: jctf.sma
    - Fixed a compile error when switching FEATURE_ADRENALINE to false.

    * Changed files: jctf.sma, jctf.txt
    - Fixed buying VGUI issues, plugin now closes buy VGUI and opens custom buy menu without client changes.
    - Removed VGUI related ML keys from jctf.txt.

    * Changed files: jctf.sma, jctf.txt
    - Added FEATURE disabling, you can now toggle individual features from the sma file.
    - Added ctf_flagheal cvar which toggles if flag bases heal teammates.
    - Changed HUD message to Director HUD messages, nicer and have no channel limit
    - Increased char limit for "Freelook mode blocked" ML text from 32 to 48 chars.
    - Rearranged sma configuration variables, you can find them easier on top of the file.
    - Added hints and adrenaline menu to the ML support.
    - Decreased chance that flag gets stuck in a wall (dramatically decreased collision box and added proximity check for pickup)
    - Decreased C4's price from $15000 to $12000 and adrenaline cost from 100 to 80
    - Some minor optimizations

    * Changed files: jctf.sma, jctf.inc(jctf_api.zip), lang/jctf.txt
    - Fixed "ED_Alloc: No free edicts" crashes (hopefully).
    - Added Multilingual support, natives support it too.
    - Added printing of admin commands in chat that obey amx_show_activity.
    - Added a check of players spawning HP and Armor so Booster and flags know how much to heal.
    - Added configurable extra HP the booster heals.
    - Changed armor regeneration from Booster so it no longer sets armor to kevlar+helm if you have kevlar only.
    - Added option to ignore bots from taking flags, default OFF
    - Added checking of player's team range when touching flag in case it's a spawned spectator.
    - Fixed bots not buying weapons, but be warned, they buy at default prices and without adrenaline.
    - Changed default mp_buytime from 0 to 99999999 so bots can always buy, this doesn't affect players.
    - Added API natives: jctf_get_flagcarrier(id) and jctf_get_team(id)
    - Added FLAG_ADMINRETURN for the jctf_flag() forward, it triggers when an admin returns the flag using command
    - Fixed ctf_moveflag command not showing Y axis in the log

    - Changed ctf_moveflag to support red and blue inputs.
    - Fade to black no longer affects spectators
    - Added "ctf_returnflag <red/blue>" admin command that returns the specified flag if it was dropped for at least 15 seconds (configurable)
    - Optimized some minor stuff

    - Changed ctf_weaponstay's default value from 30 to 15 (seconds)
    - Changed ctf_itempercent's default value from 30 to 25 (percent)
    - Added Scout and G3SG1 as special weapons.
    - Added the "configurable" flag in the source for weapon money and adrenaline costs
    - Added configurable weapon and zoom-in running speeds
    - Added cvars for controling sounds: ctf_sound_taken/dropped/returned/score
    - Added how much money/adrenaline you need in the "Not enough money/adrenaline" message

    - plugin no longer disables VGUI menu automatically but it notifies VGUI menu users upon spawn
    - added new in-source configuration: CHAT_SHOW_COMMANDS

    - fixed a bug where you'd get twice the adrenaline when using the jctf_add_adrenaline() native while using a reason
    - fixed adrenaline HUD not updating when using jctf_add_adrenaline()

    - added FLAG_MANUALDROP for jctf_flag() events
    - fixed some example issues in jctf_addon_example.sma
    - updated version check to 1.21 since jctf.inc was altered
    - added a console print upon plugin load with plugin name and version
    - forced to reset jctf_version to the current version if mod is updated while server is running

    - added forwards and natives that other plugins could use
    - added configurable spawning weapons using CVars, they're also forced to reset to prevent unwanted usage between maps
    - minor adjustments in the code to fit the latest modifications

    - fixed some issues with the autoteambalance
    - fixed spawn protection countdown not stop when prematurely disabling protection
    - fixed game name displaying version as number instead of string
    - added mod version in quick help and help console message
    - added checking of mp_forcechasecam too for the fade to black feature
    - fixed the possiblity of not beeing blinded while in freelook after a respawn

    - fixed a bug where transfered people (autoteambalance) would actually block the team they left from beeing joined, the "there are too many CTs/Ts" thing.
    - added fade to black when mp_fadetoblack is disabled and mp_forcecamera is enabled while player is on free view (no teammates alive)

    - fixed a rare bug where players won't respawn after beeing killed
    - some optimizations in code

    - removed previous round-end blocking and added new round blocking method via Orpheu module
    - fixed various possible crashes caused by previous round-end blocking methods

    - changed buy menu text so that items you can't afford are in red text
    - fixed various speed issues with player zooming, shield and flag taking
    - re-done player rendering system and altered some colors and values
    - unforced most mod cvars, only two cvars remain forced

    - fixed round-blocking player deaths's animations
    - changed the sounds of medkit and adrenaline item pickup
    - and of course, other small adjustments

    - other small adjustments here and there
    - removed the spectating bots, now players' deaths are blocked if they'll trigger round end, they wouldn't even notice
    - altered C4 plant radio message to a be compatible with client modifications and other hooks

    - added /help
    - minor adjustments and code moved around

    - fixed items not fading out
    - fixed the simple auto-team balance
    - fixed various possible errors

    - minor fixes of typos and checks
You don't need all files from below, so don't just download them all, read the installation instructions !

NOTE: "Get plugin" does not work for this plugin, follow the instructions !
Attached Files
File Type: zip jctf_mapflags.zip (1.3 KB, 13944 views)
File Type: zip jctf_api.zip (2.3 KB, 14141 views)
File Type: sma Get Plugin or Get Source (jctf_sh_getxp.sma - 17013 views - 3.2 KB)
File Type: sma Get Plugin or Get Source (jctf_sh_buyxp.sma - 14233 views - 1.0 KB)
File Type: zip jctf_resources.zip (214.3 KB, 20570 views)
File Type: txt jctf.txt (66.5 KB, 13292 views)
File Type: sma Get Plugin or Get Source (jctf.sma - 22990 views - 141.6 KB)

Last edited by Hunter-Digital; 06-28-2012 at 00:10.
Hunter-Digital is offline
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-12-2010 , 02:07   Re: Just Capture the Flag (CTF)
Reply With Quote #2

sounds cool

I think you should say clients to bind a button to adrenaline instead of doing it.
client_cmd(id, "bind v adrenaline")

Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 07-12-2010 at 02:11.
drekes is offline
Send a message via MSN to drekes
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2010 , 02:22   Re: Just Capture the Flag (CTF)
Reply With Quote #3

I actually did that in earlier versions while testing... nobody seem to "see" the message, they all typed /adrenaline in chat :\

I'll edit it if required, but V is not bound by default anyway and... well, I got no default already-bound action to override for that...

And the UT style adrenaline trigger doesn't really go well with people's CS stuff... I know that people just randomly press A & D while shooting, that could easily get your adrenaline regeneration starting by mistake :}

I *COULD* hook "cheer" wich is bound to "J" for HLTV usage, but I think people just unbound it because it doesn't work in regular gameplay.

So... I dunno

Added screenshots.
Hunter-Digital is offline
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-12-2010 , 02:23   Re: Just Capture the Flag (CTF)
Reply With Quote #4

Nice screenshots, but still the best way is to inform a player to bind the button, cause there are a lot of players who use v or j for something else.

Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-12-2010 , 02:31   Re: Just Capture the Flag (CTF)
Reply With Quote #5

Originally Posted by Hunter-Digital View Post
I'll edit it if required, but V is not bound by default anyway and... well, I got no default already-bound action to override for that...
Then edit it. Binding keys without the players permission is considered Slowhacking and is not tolerated here
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2010 , 02:40   Re: Just Capture the Flag (CTF)
Reply With Quote #6

Fine then, edited.

Still, about the VGUI menu, I can't do anything about that, it must be disabled or people can't buy... or worse, they buy weapons with old prices (like shield or awp)
Hunter-Digital is offline
Veteran Member
Join Date: Jun 2010
Old 07-12-2010 , 03:15   Re: Just Capture the Flag (CTF)
Reply With Quote #7

Looks nice
Vechta is offline
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 07-12-2010 , 05:38   Re: Just Capture the Flag (CTF)
Reply With Quote #8

http://forums.alliedmods.net/showthread.php?p=397473 (dod)

What makes urs better :p ?
I am out of order!
grimvh2 is offline
#8 SickneSS
Join Date: Sep 2008
Location: Here
Old 07-12-2010 , 07:28   Re: Just Capture the Flag (CTF)
Reply With Quote #9

Maybe you can add some features like speed and that things,example:

Buy Speed
cost 4 frags/adrenaline/money or something
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2010 , 13:16   Re: Just Capture the Flag (CTF)
Reply With Quote #10

Originally Posted by grimvh2 View Post
Read the "features", it has C4, adrenaline, assists, items, custom buy menu, etc

And no "buy speed" sickness, that's already in there and it's adrenaline based.

Originally Posted by Hunter-Digital
- Adrenaline combos are:
Speed: 140% movement speed of current weapon (configurable in SMA)
Berserk: 200% damage, 70% weapon shooting delay, 30% weapon secondary delay (configurable in SMA)
Regeneration: +1hp until you reach 150hp, after that you get +1ap until you get 100ap
Invisbility: barely visible
You can't just BUY things, money isn't everything

Last edited by Hunter-Digital; 07-12-2010 at 13:20.
Hunter-Digital 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 15:18.

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