Giter Site home page Giter Site logo

marqdevx / mm-cs2-scrim Goto Github PK

View Code? Open in Web Editor NEW
68.0 3.0 17.0 142.25 MB

Metamod addon to be used in Counter Strike 2. Bringing the needed features for competitive team practice

License: GNU General Public License v3.0

Python 10.02% Shell 0.48% C++ 89.46% C 0.04%
counter-strike-2 cs2-addon metamod server-addon cs2-plugin cs2-server-addon metamod-addon mm-addon esports

mm-cs2-scrim's Introduction

Build pass
GitHub downloads

IMPORTANT

This repository is based on https://github.com/Source2ZE/CS2Fixes/ Removing "unnecessary" features from the original addon. Thanks for the work!

DISCLAIMER: *not* responsible for any issues or breakages caused by the plugin. 

Fix server crashes

In case you have non-expected server crashes, it might be due the addons\cs2scrim\gamedata\cs2fixes.games.txt is not up-to-date. I might not update that text until a next "official" release of the addon, so in order to fix that file: Copy the content of the file https://github.com/marqdevx/mm-cs2-scrim/blob/main/gamedata/cs2fixes.games.txt onto your addons\cs2scrim\gamedata\cs2fixes.games.txt

Addon information

This plugin adds the minimum requirements for competitive teams that need a more handy way of managing a few commands from the server side, like config management or replay recording.

The plugin has been developed with these ideas in mind:

  1. Minimum impact on the server performance
  2. Built for competitive teams to practice (not for tournaments)

Available Commands

  • Config and server management (Admin only)
    .pracc: launch the practice config
    .scrim: start the competitive match
    .map <map>: change the map (example: .map ancient)
    .rcon <command>: workaround to be used as the old rcon, execute commands from server side. Usage on the console c_rcon <comnand>

  • Scrim commands
    .pause: pauses the match
    .unpause: request the unpause

    • Coach
      .coach: switch to coach, also available .coach <ct/t>
      .uncoach: return as a player
    • Admin only
      .record: start the demo recording
      .stoprecord: finish the recording and save it under gotv/<date_time_map>.dem example: gotv/03March_20-08_de_anubis.dem
      .restore <round>: load the desired round's backup
      .forceunpause: force the unpause
  • Practice commands
    .spawn: move to the desired competitive spawn i.e .spawn 2 or .spawn 1 ct
    .last: teleports to your latest thrown grenade lineup
    .noflash: toggle flash effect
    .ct, .t, .spec, .side: switch team side

  • General commands
    .color : set your cl_color live, in case you have duplicated colors, usage: .color 2

  • Leveraged from CS2Fixes
    c_reload_admins: console command to reload admins.cfg
    .ban <player> <duration/0 (permanent)>: ban a player
    .unban <player>: remove ban of player
    .kick <player>: kick a player out of the server
    .gag <player> <duration>: forbids chat to player
    .ungag <player>: allow back a player that was gagged to chat
    .slay <player>: kills a player
    .noclip: toggles noclip to current player (practice mode)

Roadmap

  • Scrim
    • Pauses
    • Medic (round backup/restore)
    • Coach
    • gotv .record
      • include date and time
      • include map name
        • Automatically
    • Damage print on round-end
  • Practice
    • Maps
      • Map
      • Spawns
        • Only show competitive spawns
    • Utility (grenades)
      • Flashes
        • No flash effect
        • Flashed targets and time flashed
      • Remove smokes
      • Rethrow
      • Throw information (air-time, bounces...)
        • Flash target and time
      • Save throws and lineups
        • Last
    • Misc
      • Move to spec or team side
      • Noclip
      • Create a "menu" workaround, using shoot and reload feedback for example, to confirm or cancel
      • Damage information
    • BOTs management
      • Place
      • Boost
  • General
    • rcon

I'll try to documentate everything as better as possible, feel free to leave suggestions!

Installation instructions

Set up video
Set up video: https://www.youtube.com/watch?v=thk78MDsQnc

cs2scrim config

You can enable/disable the features of the plugin by changing the values at <server>/game/csgo/cfg/cs2scrim/cs2scrim.cfg

Compilation

Requirements

Credits

Authors from CS2Fixes

original repository

This people did the hard work, and keep doing it adding features to CS2Fixes, check them out (they also made the zombie reborn innit). I contacted Xen through discord before releasing this repository and he gave me some suggestions and approval to release it within their license, thanks!

Splewis

Almost all of the features are originally from the CS:GO plugin https://github.com/splewis/csgo-practice-mode, using it as reference. Thanks @splewis! (hope to see your work on CS2)

CKRAS Hosting

CKRAS Hosting Team They liked the addon, they contacted me and helped trying out the best way to create the coach, find bugs and give feedback.

Cierzo eSports team

My teammates are being supportive by bringing feedback, ideas and testing, I mean, server crashes, toooo many server crashes ♥

mm-cs2-scrim's People

Contributors

marqdevx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mm-cs2-scrim's Issues

Wildcard for all players on the server

Hey,

first of all, thats a very nice project! I installed it on my server and it works smoothly.

I got one question though, regarding to the rights player can have on the Server, which are configurated under admin.cfg:

Is it possible to give all players on the server specific rights, like a wildcard to use the .pracc and .scrim command?`

admin.cfg:

{
    "name" 
    {
        "ip" "!0.0.0.0"         // All users from this IP
        "flags" "abcdefg"  // permission flags, same as sourcemod with z being everything
    }
}

Spawns missing / not working and admins.cfg mistake

Hi

Thanks for the great plugin.
The .spawns on mirage are not working properly / are missing.
On T Side 3-4-5 are working, with the rest it doesn't work at all.
example:

.spawn 2
"[CS2Scrim] You have been teleported to spawn. 2/10 priority:0"

But i won't get teleported. Probably outdated spawns?
I might try to update them myself.

And when i tried to add admins to "admins.cfg" it had "steamid" instead of "steam"
which would prevent it from actually load the admins.

best regards

edit:

Versions

[01] CS2Scrim (1.1.0-beta) by marqdevx (ρλd)

meta version
Metamod:Source Version Information
Metamod:Source version 2.0.0-dev+1282
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: GameDLL (gameinfo.txt)
Compiled on: Feb 7 2024 19:09:08
Built from: alliedmodders/metamod-source@3740821
Build ID: 1282:3740821
http://www.metamodsource.net/

Question? !bot commands

Hello! Want to ask about !bot, !boost, !crouchboost commands.
Will it implemented in your mod? Because only one commands I need to use on practice server and now I can't find any plugins to use it except only PRACC dedicated server which I have to pay 20 bucks every month.
Maybe I can buy onetime this dedicated server from PRACC and you can try to get this !bot features from their practice server if I will pay for this server? Or something else

'metamod_oslink.h': No such file or directory (Windows)

Hey
I would like to contribute to the project, but I'm having issues building the plugin on Windows

Here's the powershell script I'm using :

git clone https://github.com/marqdevx/mm-cs2-scrim
cd mm-cs2-scrim
git submodule update --init --recursive
$env:MMSOURCE112="C:\Users\amougenet\Documents\mmsource-2.0.0-git1256-windows\addons\metamod"
$env:HL2SDKCS2="C:\Users\amougenet\Documents\mm-cs2-scrim\sdk"
mkdir build
cd build
python ../configure.py -s cs2
ambuild

And end up with this error after the ambuild command :

C:\Users\amougenet\Documents\mm-cs2-scrim\src\utils\plat.h(22): fatal error C1083: Impossible d'ouvrir le fichier include�: 'metamod_oslink.h'�: No such file or directory

Any idea what I'm doing wrong ?
I can't find any metamod_oslink.h in mm-cs2-script, the sdk submodule, and the metamod:source build 1256

Coach support

Amazing plugin. Coach support would be wonderful, how's the progress with that?

Grenade trajectories aren't drawn in practice mode

It seems like sv_grenade_trajectory and sv_grenade_trajectory_time aren't valid commands anymore in CS2, but they seem to have been replaced by sv_grenade_trajectory_prac_trailtime. Setting that to something other than zero temporarily highlights thrown grenade paths again:

sv_grenade_trajectory_prac_trailtime 8

image

(The value is clamped between 0 and 8.)

Coach takes player spawns

In scrim mode the coach spawns in normally, so they take up a spawn that would normally could be allocated to one of the 5 players, blocking them from having it. This effects the spawn randomisation making it different to a normal match.

A solution is to spawn the coach on a newly created spawn up in the air somewhere.

exec scrim - server crash

Tested with MetaMod Source Version: 2.0-1256 & 2.0-1227

Executing scrim will make the server crash.

"Specialist<0><BOT><TERRORIST>" OnPreResetRound => CTMDBG, team 2  will switch 0 50.25 
"Aspirant<1><BOT><CT>" OnPreResetRound => CTMDBG, team 3  will switch 0 50.25 
./game/cs2.sh: line 118:    53 Segmentation fault      (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

My Scrim Config: Scrim.cfg

Round Knife Support

Can we expect support for Round Knife before competitive starts?

We start the competitive, the knife round takes place and the winning team can choose the team they want to play, CT or TR.

Choose your team via chat command, !stay or !swap.

Gotv won't record

Hey there, eventough I have gotv folder verygames/csgo/gotv
, i cannot see my records in it. (of course i typed the command)

Rethrow command

I have a suggestion for you to enable, .rethrow once the .pracc command is executed.

The functionality is already there, using sv_rethrow_last_grenade, however, it only works to execute in the server console as in-game RCON is disabled by Valve. Might be something cool to prioritize next.

[Suggestion] Add aim mode

Hello !

I don't know if you're still working on this plugin.
Just a suggestion for you :

It is possible to add an aim map mode ?
if no -> Can I do it for my server with your plugin and how (I mean what's your suggestions to make it work) ?

thank for the plugin, it's really cool and easy to install thanks to your youtube video !

Chat commands aren't working

Hi! Just installed this on my dathost server. None of my chat commands are working, but the log is saying the plugins is loaded

Nov 13 13:10:49:  meta version
Nov 13 13:10:49:   Metamod:Source Version Information
Nov 13 13:10:49:      Metamod:Source version 2.0.0-dev+1258
Nov 13 13:10:49:      Plugin interface version: 16:14
Nov 13 13:10:49:      SourceHook version: 5:5
Nov 13 13:10:49:      Loaded As: GameDLL (gameinfo.txt)
Nov 13 13:10:49:      Compiled on: Nov 12 2023 09:43:41
Nov 13 13:10:49:      Built from: https://github.com/alliedmodders/metamod-source/commit/eb4fcf2
Nov 13 13:10:49:      Build ID: 1258:eb4fcf2
Nov 13 13:10:49:      http://www.metamodsource.net/
Nov 13 13:10:50:  meta list
Nov 13 13:10:50:  Listing 1 plugin:
Nov 13 13:10:50:    [01] cs2scrim (1.0.2.0) by marqdevx tweak over xen & poggu

When connecting:

Nov 13 13:09:45:  SV:  "ariashark lft<3><[U:1:238796941]><>" STEAM USERID validated
Nov 13 13:09:45:  L 11/13/2023 - 13:09:45: "ariashark lft<3><[U:1:238796941]><>" STEAM USERID validated
Nov 13 13:09:45:  [CS2Scrim] 76561198199062669 authenticated 3
Nov 13 13:09:45:  [CS2Scrim] 76561198199062669 authenticated as an admin
Nov 13 13:09:48:  Client 3 'ariashark lft' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL
Nov 13 13:09:48:  [CS2Scrim] Hook_ClientPutInServer(3, "ariashark lft", 0, 238796941, 139684642160896)
Nov 13 13:09:48:  L 11/13/2023 - 13:09:48: "ariashark lft<3><[U:1:238796941]><>" entered the game
Nov 13 13:09:48:  [CS2Scrim] Hook_ClientActive(3, 0, "ariashark lft", 76561198199062669)
Nov 13 13:09:49:  SV:  Sending full update to client ariashark lft (reason:  initial update)
Nov 13 13:09:49:  ariashark lf    144.6.130.75:62060[1]:  NetChan Setting Timeout to 20.00 seconds
Nov 13 13:09:51:  "ariashark lft<3><[U:1:238796941]><Unassigned>" ChangeTeam() CTMDBG , team 0, req team 2 willSwitch 0, 14.84 
Nov 13 13:09:51:  L 11/13/2023 - 13:09:51: "ariashark lft<3><[U:1:238796941]>" switched from team <Unassigned> to <TERRORIST>
Nov 13 13:09:51:  Rezan kicked by Console (NETWORK_DISCONNECT_KICKED)
Nov 13 13:09:51:  L 11/13/2023 - 13:09:51: "Rezan<1><BOT><TERRORIST>" disconnected (reason "NETWORK_DISCONNECT_KICKED")
Nov 13 13:09:51:  [CS2Scrim] Hook_ClientDisconnect(1, 39, "Rezan", 0, "BOT")
Nov 13 13:09:51:  [CS2Scrim] 1 disconnected
Nov 13 13:09:53:  [All Chat][ariashark lft (238796941)]: .pracc
Nov 13 13:09:53:  L 11/13/2023 - 13:09:53: "ariashark lft<3><[U:1:238796941]><TERRORIST>" say ".pracc"
Nov 13 13:09:55:  [All Chat][ariashark lft (238796941)]: .pause
Nov 13 13:09:55:  L 11/13/2023 - 13:09:55: "ariashark lft<3><[U:1:238796941]><TERRORIST>" say ".pause"
Nov 13 13:09:56:  [All Chat][ariashark lft (238796941)]: .pause
Nov 13 13:09:56:  L 11/13/2023 - 13:09:56: "ariashark lft<3><[U:1:238796941]><TERRORIST>" say ".pause"

Commands do not work.

Interestingly enough, ingame if i run c_pause in console, the command goes through. But if I use admin-protected ones like c_map it says I don't have permission (yet, in the console the plugin registers me as an admin [CS2Scrim] 76561198199062669 authenticated as an admin

I'm using the up to date gamedata as mentioned in 9eb51ac

Configuration Issue in Building Project: SDK Support and Compiler Errors

Issue Description

I'd like to start by mentioning that your Metamod addon works perfectly fine ❤️, which is greatly appreciated 👍. However, I've encountered an issue when attempting to build my own version of the addon. My primary goal is to make changes to some source files and compile the .so file for personal use.

During this process, I'm facing challenges due to the necessity of managing multiple SDKs and some difficulties with the available compilers on my system. These issues seem to be blocking the build process.

I'm facing an issue with the configuration process when trying to build a project using ambuild2. The process is halted due to an error related to SDK path configurations and compiler failures.

Environment

  • Operating System: Ubuntu 20.04.6 LTS (Focal)
  • Python Version: 3.8.10
  • GCC Version: 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)

Steps to Reproduce

  1. Installed ambuild2 via Python's pip.
  2. Cloned the ambuild repository from GitHub.
  3. Installed build-essential.
  4. Initially encountered error: Configure failed: Could not find a valid path for HL2SDKCSGO.
  5. Executed git submodule init and git submodule update.
  6. Set environment variable: export HL2SDKCSGO=/home/dennis/mm-cs2-scrim/hl2sdk.
  7. Cloned hl2sdk from GitHub, checked out different branches (blade, etc.), and repeated similar steps for HL2SDKDOTA and HL2SDKCS2.
  8. Encountered a recurring error when running python3 configure.py:
dennis@mail:~/mm-cs2-scrim$ python3 configure.py
Warning: build is being configured in the source tree.
Re-using build folder: objdir
Checking CC compiler (vendor test gcc)... ['clang', '-m32', 'test.c', '-o', 'test-c']
Compiler clang for CC failed: [Errno 2] No such file or directory: 'clang'
Checking CC compiler (vendor test gcc)... ['gcc', '-m32', 'test.c', '-o', 'test-c']
Compiler gcc for CC failed: Compiler failed with return code 1
Checking CC compiler (vendor test gcc)... ['icc', '-m32', 'test.c', '-o', 'test-c']
Compiler icc for CC failed: [Errno 2] No such file or directory: 'icc'
Skipping target x86: Unable to find a suitable C/C++ compiler
Checking CC compiler (vendor test gcc)... ['clang', '-m64', 'test.c', '-o', 'test-c']
Compiler clang for CC failed: [Errno 2] No such file or directory: 'clang'
Checking CC compiler (vendor test gcc)... ['gcc', '-m64', 'test.c', '-o', 'test-c']
found gcc version 9.4, x86_64
Checking CXX compiler (vendor test gcc)... ['g++', '-m64', 'test.cpp', '-o', 'test-cxx']
found gcc version 9.4, x86_64
Traceback (most recent call last):
  File "/home/dennis/.local/lib/python3.8/site-packages/ambuild2/frontend/v2_2/prep.py", line 156, in Configure
    if not cm.generate(options.generator):
  File "/home/dennis/.local/lib/python3.8/site-packages/ambuild2/frontend/context_manager.py", line 93, in generate
    self.parseBuildScripts()
  File "/home/dennis/.local/lib/python3.8/site-packages/ambuild2/frontend/v2_2/context_manager.py", line 50, in parseBuildScripts
    self.execContext(cx)
  File "/home/dennis/.local/lib/python3.8/site-packages/ambuild2/frontend/v2_2/context_manager.py", line 148, in execContext
    exec(code, scriptGlobals)
  File "/home/dennis/mm-cs2-scrim/AMBuildScript", line 521, in <module>
    MMSPlugin.detectSDKs()
  File "/home/dennis/mm-cs2-scrim/AMBuildScript", line 186, in detectSDKs
    raise Exception('Only one sdk at a time is supported, for multi-sdk approach use loader based solution.')
Exception: Only one sdk at a time is supported, for multi-sdk approach use loader based solution.
Configure failed: Only one sdk at a time is supported, for multi-sdk approach use loader based solution.

Expected Behavior

I expected a seamless configuration process, allowing me to proceed with the build.

Actual Behavior

The configuration fails, indicating issues with handling multiple SDKs and compiler failures.

Additional Context

  • The build process seems to be impeded by the necessity of handling multiple SDKs and issues with the available compilers on my system.
  • My primary objective is to change certain source files and compile the .so file for my own use.

Would really appreciate any help with this. Thanks! :octocat:

`c_reload_admins` crashes the server

OS: Debian 11

When used without players on the server the command works fine.
After I join and reload the admins, the server crashes.

  • I've updated to the newest cs2fixes.games.txt.
  • I've got it to work once.

admins.cfg:

Admins
{
    "Jake" // can be anything
    {
        "steam" "<my-steam-id>" // steamid64
        "flags" "z" // permission flags, same as sourcemod with z being everything
    }
}

The issue might be related to the following line changed in CS2Fixes: https://github.com/Source2ZE/CS2Fixes/blob/main/src/adminsystem.cpp#L73

Add .help command

Could you please add a .help command that gives a list of all usable commands? Would be really helpful. I know them, but my teammates don't because they don't deal with the scripts etc.

Thank you.

Record not working.

Record not saving the demo file.

image
When I go to the gotv folder, nothing is there.

Any idea?
Thanks!

Q: Map change is delayed 5 seconds and printed globally

Where can I adjust this timer setting. I get the idea of a delay, but 5 seconds is very long. The print happens instantly, but the 5 seconds makes it seem like it's not working correctly, even though it is.

Furthermore, workshops maps are now able to be hosted on Linux servers, which I have through VeryGames. To test workshop maps i use the command host_workshop_map , so I want to actually be able to change the 5 seconds somewhere to something else. Preferrably 0.

Demo not saving in gotv in FTP folder

The demo doesn't get saved in the gotv map on the verygames FTP server. I tried .record and 15 seconds after .stoprecord.

/edit: The .record and .stoprecord commands do work and I see the feedback in the game chat.

Anything I am doing wrong?

Admin not loading

I edited the file /csgo/game/csgo/addons/cs2scrim/configs admin.cfg but i still have no access as admin

Plugin doesn't work because of new update?

Hello,

I installed the plugin. It worked normaly until the update, Are there issues with the new update?

Here is the console command answer when I type "meta list"

09.02 19:07:26 [Server] INFO meta list
09.02 19:07:26 [Server] INFO Listing 1 plugin:
09.02 19:07:26 [Server] INFO [01]

Regards
Puma

.coach doesn't always seem to work

Hi,

The .coach option doesn't always seem to work. When our 6th presses .coach, how does it know what side we're on? Could you elaborate on this?

We can see "Coaching:" in front of his name, but he spawns with us and can shoot etc. Maybe it's on my end.

Thanks.

Error while opening.

image

Any assistance is much appreciated.

"cs2.exe - Entry Point Not Found
The procedure entry point ?EnterScope@CVProfile@@QEAAXPEBDH0_N@Z could not be located in the dynamic link library C:\Program Files (x86)\Steam\steamapps\common\CS2_DEV\game\csgo\addons\cs2scrim\bin\win64\cs2scrim.dll.
"

when I run meta list:

meta list
Listing 2 plugins:
[01] CounterStrikeSharp (v0 @ 11e5e99) by Roflmuffin
[02]

MM Details Windows:

meta version
Metamod:Source Version Information
Metamod:Source version 2.0.0-dev+1290
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: GameDLL (gameinfo.txt)
Compiled on: Apr 30 2024 16:20:47
Built from: alliedmodders/metamod-source@3d466fd
Build ID: 1290:3d466fd
http://www.metamodsource.net/

this is also happening within my lynux environment which is running:

Metamod:Source Version Information Metamod:Source version 2.0.0-dev+1291 Plugin interface version: 16:14 SourceHook version: 5:5 Loaded As: GameDLL (gameinfo.txt) Compiled on: Apr 30 2024 16:22:46 Built from: alliedmodders/metamod-source@607301a Build ID: 1291:607301a http://www.metamodsource.net/

Some suggestions

Hello, thanks for the good work on the plugin and the idea.

I have some suggestions that you may like or the people may like:

  1. Add a nice knife round with stay/change teams command.
  2. Separate the admin pause and player unpause command to admin only.
  3. Kick/Ban commands to kick unwanted spectators or players for example.
  4. Map command should change map only when it's warmup state?
  5. A whitelist for certain (steamids) with cvar to enable/disable can be good for scrims or private servers?
  6. A nice admin menu with some commands in it?
  7. A teams score and damage done in chat at the end of the round is not really needed, but you may like the idea.

Thanks for your attention and the time spent on this issue and the plugin.

Plugin can't loaded

I've followed all the steps but when this is happen

meta list
Listing 1 plugin:
[01]

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.