Skip to content

About

GunGame 5.1 (EventScripts) running again on today's Counter-Strike: Source: drop-in cstrike/ folder, no SPE needed, deathmatch, elimination, turbo and all included addons tested

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CSS GunGame Remastered

GunGame 5.1 (EventScripts), running again on today's Counter-Strike: Source.

GunGame 5.1 was the most played EventScripts addon on Counter-Strike: Source: every kill moves you to the next weapon, the first player to get a kill with the last weapon wins the map. It needs EventScripts and SPE (Source Python Extensions), and both stopped working on the current engine years ago.

This repository is GunGame 5.1.630 (the last revision, April 2012) made to run on the current CS:S (2025 engine branch) on top of CSS EventScripts Remastered:

  • SPE is replaced by a small Python module, spe.py, that provides the nine SPE functions GunGame uses with EventScripts functions only. No binary, no memory signatures to maintain.
  • Two folders the addon writes into were missing from the source repository (git does not keep empty folders).
  • GunGame itself is unchanged. See CHANGES.md.

The legacy GunGame 3.4 script addon (gungame3, 2006), which was part of the same source repository, is kept as is (legacy: it runs, but its deathmatch needs the old ES Tools est_* commands, and it logs missing keys at its first start).

Status

Tested on a Linux CS:S dedicated server (32-bit srcds_linux, ServerVersion 11003710) with 10 bots, using the test addon test-addons/gg_verify, which follows real games and checks every 5 seconds that each alive player holds the weapon of their level:

Test Result
Classic GunGame (default weapon order, 23 levels) 418/418 checks, no exception
Deathmatch set: gg_deathmatch, gg_turbo, gg_multi_level, gg_multi_nade, gg_dead_strip, gg_random_spawn, gg_spawn_protect, gg_noblock, gg_warmup_round, gg_knife_pro, gg_earn_nade, gg_handicap, gg_dissolver, gg_reload, messages 15-minute endurance run with 3 map changes: 1029/1031 checks (2 during a map change), 5 winners, 240 respawns, respawn delay at most 2.5 s for gg_dm_respawn_delay 2, no crash
Elimination set: gg_elimination, gg_teamplay, gg_map_vote, gg_afk_punish, punishments, gg_nade_bonus, gg_prop_physics, gg_stats_logging, gg_welcome_msg 534/534 checks, no exception
Switching between both sets from a cfg, three times in a row no crash
GunGame 3.4 (es_load gungame3) loads and plays (levels, leader, bomb objectives)
Played by a human on the deathmatch set (menus, messages, sounds downloaded from the server) working

Requirements

  • A Linux CS:S dedicated server with CSS EventScripts Remastered installed, version with the es.spawnplayer fix (deathmatch and elimination respawns) and the event queue fix. Like EventScripts, this only runs on the 32-bit server binary.
  • Nothing else: no SPE, no Metamod:Source, no SourceMod.

Installation

  1. Install CSS EventScripts Remastered and check that it loads (plugin_print).

  2. Copy the cstrike/ folder of this repository over the cstrike/ folder of your server (merge the folders).

  3. Load GunGame at every start: add this line to cstrike/cfg/autoexec.cfg (create it if needed):

    es_load gungame51
    
  4. Restart the server. The console shows:

    [1/7] Initializing GunGame 5.1.630...
    ...
    [7/7] Load completed. Restarting game...
    

Configuration

At its first start GunGame writes its config files, with every setting explained, in cstrike/cfg/gungame51/:

File Content
gg_en_config.cfg main settings and the included addons (gg_deathmatch, gg_turbo, gg_elimination, ...)
gg_punishment_settings.cfg, gg_afk_settings.cfg, gg_objectives_settings.cfg punishments, AFK, bomb and hostage levels
weapon_orders/*.txt weapon orders (gg_weapon_order_file)
gg_server.cfg your own commands, run after the GunGame configs

Change a setting in these files and change the map. Setting gg_* variables from the console also works: GunGame loads and unloads its included addons when their variable changes. Deathmatch cannot run together with elimination or teamplay (GunGame refuses to load conflicting addons): turn one off before turning the other on.

The databases (winners, saved levels) are SQLite files in cstrike/cfg/gungame51/database/.

What is not included

  • gg_map_vote reads the map list from cstrike/mapcycle.txt. Current servers use cfg/mapcycle_default.txt instead: copy it to cstrike/mapcycle.txt (or create your own), otherwise the vote logs No such file or directory.

  • gg_convert converters for winners databases of older GunGame versions are included but untested.

  • gg_map_vote with a third-party vote (gg_map_vote 2) needs the external vote command it calls (by default Mani's ma_voterandom); GunGame's own vote (gg_map_vote 1) works on its own.

  • Sounds are the original ones; clients download them through your FastDL as before.

How the SPE replacement works

GunGame used these SPE functions; spe.py implements them with EventScripts. An "instance" is the entity index.

SPE function Replacement
getWeaponDict, ownsWeapon read the player's m_hMyWeapons handles
giveNamedItem es.give, then find the entity it created
dropWeapon free the player's weapon slot at once (so a weapon of the same kind can be given in the same frame)
removeEntityByIndex, removeEntityByInstance es.remove
getIndexOfEntity the instance is already the index
switchTeam set m_iTeamNum for an alive player (no death), es.changeteam otherwise
respawn es.spawnplayer, fixed in EventScripts Remastered to call the game's CCSPlayer::RoundRespawn

Tests

test-addons/gg_verify is not loaded by default. Copy it to addons/eventscripts/ and the two cfg files of its cfg/ folder to cstrike/cfg/, then:

exec gg_verify_dm          (or gg_verify_elimination)
es_load gg_verify
changelevel de_dust2
gg_verify reset
...
gg_verify                  -> {'ok': ..., 'bad': ..., 'win': ..., 'respawns': ...}
gg_verify state            -> team, level and weapons of every player

Credits

  • GunGame 5.1: the GunGame 5.1 team, XE_ManUp, cagemonkey, Warren Alpert, your-name-here, Monday, RideGuy and satoon101, contributor llamaelite, and its beta testers (see modules/info.py). Originally hosted at http://code.google.com/p/gungame51/ and http://forums.gungame.net/.
  • GunGame 3.4: cagemonkey and the people thanked in es_gungame3.txt.
  • EventScripts: Mattie Casper and the EventScripts team.
  • SPE (replaced here): the Source Python Extensions team.

License

GunGame 5.1 is released under the Artistic License, see GunGame 5.1 License.txt. This is a modified version: every change is listed in CHANGES.md.

About

GunGame 5.1 (EventScripts) running again on today's Counter-Strike: Source: drop-in cstrike/ folder, no SPE needed, deathmatch, elimination, turbo and all included addons tested

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages