GithubHelp home page GithubHelp logo

b3none / cs2-retakes Goto Github PK

View Code? Open in Web Editor NEW
176.0 5.0 34.0 563 KB

CS2 implementation of retakes. Based on the version for CS:GO by Splewis.

License: GNU General Public License v3.0

C# 100.00%
counterstrikesharp cs2 retakes cssharp counter-strike-2

cs2-retakes's Introduction

GitHub Downloads GitHub Actions Workflow Status

CS2 Retakes

CS2 implementation of retakes written in C# for CounterStrikeSharp. Based on the version for CS:GO by Splewis.

Share the love

If you appreciate the project then please take the time to star the repository ๐Ÿ™

Star us

Features / Roadmap

  • Bombsite selection
  • Per map configurations
  • Ability to add spawns
  • Spawn system
  • Temporary weapon allocation (hard coded)
  • Temporary grenade allocation (hard coded)
  • Equipment allocation
  • Queue manager (Queue system)
  • Team manager (with team switch calculations)
  • Retakes config file
  • Add translations
  • Improve bombsite announcement
  • Queue priority for VIPs
  • Add autoplant
  • Add a command to view the spawns for the current bombsite
  • Add a command to delete the nearest spawn
  • Implement better spawn management system
  • Add a release zip file without spawns too

Installation

  • Download the zip file from the latest release, and extract the contents into your counterstrikesharp/plugins directory.
  • Download the shared plugin zip file and put it into your counterstrikesharp/shared directory.

Recommendations

I also recommend installing these plugins for an improved player experience

Allocators

Although this plugin comes with it's own weapon allocation system, I would recommend using one of the following plugins for a better experience:

Configuration

When the plugin is first loaded it will create a retakes_config.json file in the plugin directory. This file contains all of the configuration options for the plugin:

Config Description Default Min Max
Version The retakes config version. This is used to automatically migrate the retakes config file for you. ignore this value. IGNORE IGNORE IGNORE
MaxPlayers The maximum number of players allowed in the game at any time. (If you want to increase the max capability you need to add more spawns) 9 2 10
TerroristRatio The percentage of the total players that should be Terrorists. 0.45 0 1
RoundsToScramble The number of rounds won in a row before the teams are scrambled. 5 -1 99999
IsScrambleEnabled Whether to scramble the teams once the RoundsToScramble value is met. true false true
EnableFallbackAllocation Whether to enable the fallback weapon allocation. You should set this value to false if you're using a standalone weapon allocator. true false true
EnableBombsiteAnnouncementVoices Whether to play the bombsite announcement voices. The volume for these values is client sided snd_toolvolume. true false true
EnableBombsiteAnnouncementCenter Whether to display the bombsite in the center announcement box. true false true
ShouldBreakBreakables Whether to break all breakable props on round start (People are noticing rare crashes when this is enabled). false false true
ShouldOpenDoors Whether to open doors on round start (People are noticing rare crashes when this is enabled). false false true
IsAutoPlantEnabled Whether to enable auto bomb planting at the start of the round or not. true false true
IsDebugMode Whether to enable debug output to the server console or not. false false true
ShouldForceEvenTeamsWhenPlayerCountIsMultipleOf10 Whether to force even teams when the active players is a multiple of 10 or not. (this means you will get 5v5 @ 10 players / 10v10 @ 20 players) true false true
EnableFallbackBombsiteAnnouncement Whether to enable the fallback bombsite announcement. true false true
ShouldRemoveSpectators When a player is moved to spectators, remove them from all retake queues. Ensures that AFK plugins work as expected. false false true

Commands

Command Arguments Description Permissions
!forcebombsite <A / B> Force the retakes to occur from a single bombsite. @css/root
!forcebombsitestop Clear the forced bombsite and return back to normal. @css/root
!showspawns <A / B> Show the spawns for the specified bombsite. @css/root
!addspawn <CT / T> <Y / N (can be planter)> Adds a retakes spawn point for the bombsite spawns currently shown. @css/root
!removespawn Removes the nearest spawn point for the bombsite currently shown. @css/root
!nearestspawn Teleports the player to the nearest spawn. @css/root
!hidespawns Exits the spawn editing mode. @css/root
!mapconfig Forces a specific map config file to load. @css/root
!mapconfigs Displays a list of available map configs. @css/root
!scramble Scrambles the teams next round. @css/admin
!voices Toggles whether or not to hear the bombsite voice announcements.
css_debugqueues SERVER ONLY Shows the current queue state in the server console.

Stay up to date

Subscribe to release notifications and stay up to date with the latest features and patches:

image

Credits

This was inspired by the CS:GO Retakes project written by splewis.

cs2-retakes's People

Contributors

asapverneri avatar b3none avatar brkvlr avatar casarica avatar crashzk avatar deondupreez avatar dependabot[bot] avatar dollannn avatar fabiosantoscode avatar ipsvn avatar killerroi avatar kraigher avatar nokkvireyr avatar nubston avatar ravid-a avatar royz-iwnl avatar rsklippy avatar spirtbbx avatar st1ng2 avatar yonilerner avatar zwolof 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  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  avatar  avatar

cs2-retakes's Issues

[REQ] Add MessagePrefix in translations

Would it be possible to add the MessagePrefix to the translations?

public static readonly string MessagePrefix = $"[{ChatColors.Green}Retakes{ChatColors.White}] ";

I ask because I would like to change the colour of the message, or do you have no intention of implementing this feature at the moment?

crash

I just installed this plugin, everything is as it should, it starts for the first time, but after restarting the server crashes. CSS 201 Meta 1282
or did I not download something?

Allocators issue - not working

hello guys i appreciate your hard work to build this plugins and my total respect for you ,so i tried the 3 allocators and nthg works :
1 - Ravid's Allocator : i started the sqlserver and created a db configured the config file where i changed the host to localhost , and the username to root without password and i gave it the name of the db and then i lanched the sv and i enter nthg displayed .

2 - NokkviReyr's Allocator : the only one that is half working , just there s a bug where the changes after selecting are not affected at all , nthg changes , and the database.json file that they are talking about doesn t even exist.

3 - Yoni's Allocator : this one is the most allocator that has stars , but it crashes the server idk why , after installing the plugin and launching the server ,it doesn't crash immediately but after i join to play i can't even pass the selection menu and the server is down.

The readme files are poorly documented in the plugins except the cs2-retakes plugin.
= > i hope there's a solution for one of this and i appreciate your help and support for the cs2 community server.
note: this s my first time starting a cs 2 server, i made it as a challenge for my self to learn ,so i m not fully informative about all the aspects ,i can be wrong or missing some configuration in them idk, i hosted the server on an Azure VM , using Windows base system , with WindowsGSM and cs2 plugin i managed to install the server and i configured it, then installed the metamod and counterstikesharp, after that i installed the plugins one by one as the guide in the readmefile, the retake plugin works fine except the weapons allocator, for example in NokkviReyr's Allocator, it says pistol round and the player still having rifle in his hands.

Compatibility with WeaponPaints

When using Retakes and WeaponPaints simultaneously, the retakes allocator overrides the knife given by WeaponPaints, could there possibly be a config setting to not allocate the knife at all?

Bombsite checking not working

Bombsite checking not working. Stand inside red lines, and it will not always make a bomb planter spawn, even tho it should.

[REQ] a simple map vote at the end

hello @B3none

Could we consider adding a simple map vote feature at the 2nd last round of the game? It adds a nice touch for player engagement and variety.

like if round = '28' then start vote

Thoughts?

Why is mp_roundtime_defuse 1.92 hardcoded?

Hi

On line 948 in the RetakesPlugin.cs you declare the CVAR to be 1.92. When disabling autoplant you have full 2 minutes to run to the other bombspot. Why do you define it in the code, when we already have the ability to declare it in the configfile?

private void HandleAutoPlant()
{
// Ensure the round time for defuse is always set to 1.92
Server.ExecuteCommand("mp_roundtime_defuse 1.92");

Linux OS Support

Hey,
I'm curious if there are plans for Linux OS support in the near future? :)

Unable to add spawns (Fixed, plugin got an update)

As you can see from the screenshot below, the command '!addspawn' works, and gives the required response.

But when I use it as normal '!addspawn t/ct' nothing happens. This never happened before the 27th April (roughly on that day), and it was working perfectly before this. I didn't change anything on the server or add anything to the config so im completely lost.

(also idk why the net graph is saying April 26th, I took this today ahhahah)

20240429120656_1

"Valve Retakes" + "cs2-retakes"

Hi. I am very grateful to your development, but I have a few questions and a problem...
Your plugin generates ยซ.../cfg/cs2-retakes/retakes.cfgยป config that contains the cvar ยซsv_skirmish_id 0ยป - what is the meaning of this cvar? After all, it only works with the value ยซsv_skirmish_id 12ยป? (I could be wrong)

I need a built-in plugin weapon allocator called by !guns was disabled and it was possible to use the weapon allocator included in the game, which works just only if the cvar ยซsv_skirmish_id 12ยป is used. (see the screenshots below)

11111
22222

To start this mode, you just need to write game_type 0; game_mode 0; sv_skirmish_id 12; map de_mirage in the console, or set these parameters at the start of the dedicated server.

I tried to satisfy my requirements by correcting ยซsv_skirmish_id 0ยป to ยซsv_skirmish_id 12ยป and changed ยซEnableFallbackAllocationยป to ยซfalseยป in the plugin config - the weapon allocator built into the game worked, but another problem arose: With this setting, as far as I understood correctly, the spawns are used as prescribed in ยซmap_configยป, and directly embedded in the game, from the ยซsv_skirmish_id 12ยป mode itself.

While we were testing this collaboration of the mode and the plugin with my friends, we came across the following several times:

  1. Sometimes, 2 players spawned in each other at the bomb plant spawn, which made it impossible to move until one of them died.
  2. Sometimes, when ยซRetake Aยป, one or more players spawned near point B and vice versa. (This is where the spawner built into the game was probably working out in this mode.)
  3. Sometimes the plugin announced ยซRetake Aยป in the chat, although in fact ยซRetake Bยป took place in the game and vice versa.

How do I set up the whole thing correctly so that:
-The Spawns work from the plugin
-The weapon allocator works from the built-in mode in the game?

Thx for you! <3

Add bot support

Currently when you add bots, round keeps restarting and bots don't spawn in Retake spawns

[BUG] Removing the knives from the players

Whenever the round starts, players are left without a knife, even if it is the default in CS2.

Players are only spawning with Primary and Secondary Weapons, knives never come to players.

Buy Menu Inside Server

So well, i tried to use all the 3 plugins u mentioned but i have some problems, the main problem is, i want be able to buy using buy menu which is more convinent, it would be great to disable the commands !gun !guns(have a command for that or just toggle)

or just use the buy menu so it wont interfier with !gun !guns (since it wont work as i want, i cant buy m4a4 if i have m4a1s selected for example, kelver and helmet t side isnt showing, u have to buy it, and sometimes u start the round without anything(gun, knife, everything), you gotta buy it before it starts

2024-01-24_23-23-20
which you can see here

this only happens if i have the b menu activated by using , if i disable mp_buy_anywhere it goes back to normal

mp_buy_anywhere 1
mp_buytime 10
mp_maxmoney 65535
mp_startmoney 65535
mp_afterroundmoney 65535

Map config data null error

Hello,
I think after updating counterstrikesharp to v201 this error started happening:
image

Map configs are generated, all other plugins doesnt have any errors.
meta version & css_plugins list output:
image

Our retake server is currently unplayable because the round keeps restarting
image

Not receiving weapons.

Players are not receiving weapons after last CS update. I tried without allocator and with 2 plugins that allocate weapons.

path to retakes_config.json

Hi!
What is the path to retakes_config.json?

I cant seem to find it, even tho the retake plugin works on my server

Vip queue seems like not working correctly

I have root flag, but can't join to the game

css_debugqueues shows this. No error in logs

[Retakes 1.3.10] ActivePlayers (BEFORE): OXYSKY, bum11, NaikoN, A, magic, SHram666, PYREX, โœชJuzeppe[M1GHTY], Jyzer
[Retakes 1.3.10] QueuePlayers (BEFORE): st1ng, Kyoto, habiๅ
[Retakes 1.3.10] _roundTerrorists (BEFORE): st1ng, magic, SHram666, PYREX, bum11
[Retakes 1.3.10] _roundCounterTerrorists (BEFORE): OXYSKY, Kyoto, NaikoN, โœชJuzeppe[M1GHTY], habiๅ, A, Jyzer

And sometimes player who joined first are moving to spec randomly, without putting vips to the game. There is no vips other than me

config

{
  "Version": 4,
  "MaxPlayers": 9,
  "TerroristRatio": 0.45,
  "RoundsToScramble": 4,
  "IsScrambleEnabled": true,
  "EnableFallbackAllocation": false,
  "EnableBombsiteAnnouncementVoices": false,
  "EnableBombsiteAnnouncementCenter": true,
  "ShouldBreakBreakables": true,
  "ShouldOpenDoors": false
}

New CSSharp version broke retakes.cfg

Hi,

After the new CSSharp version, v213, the retakes.cfg is being executed too early.

Apr 19 07:54:11:  execing cs2-retakes/retakes.cfg
Apr 19 07:54:11:  exec: couldn't exec '{*}cfg/skill1.cfg', unable to read file
Apr 19 07:54:11:  execing server_default.cfg
Apr 19 07:54:11:  execing server.cfg
Apr 19 07:54:11:  execing gamemode_casual.cfg

and is being overwritten by the default server configurations.

Just a heads up.

Plugin installs cfg in the wrong folder

private const string RetakesCfgDirectory = "/../../../../cfg/cs2-retakes";

From the code, it looks like it is trying to execute retakes.cfg from: '{*}cfg/cs2-retakes/retakes.cfg', unable to read file (game/csgo/cfg/cs2-retakes/retakes.cfg)

The plugin installs the cfg file in the wrong directory: game/csgo/addons/cfg/cs2-retakes/retakes.cfg

Is this normal?

Restrict weapon purchase

Make it so that when a weapon is removed from the "UsableWeapons" it can't be bought using the buy menu.

Process terminated

Still got this error after some time of play on the server:

Process terminated. A callback was made on a garbage collected delegate of type 'System.Private.CoreLib!System.Action::Invoke'.

Contribution Question - Plugin Improvements & Configurations

Hey there, really appreciate this project, thank you so much for doing it.

I'd like to make some contributions to the project, but before I start coding I'd like to get some feedback on the ideas and make sure they make sense for the project before I write a bunch of code.

I have some ideas for improvements I'd like to make, but also acknowledge that not everything in the current plugin - or any of the changes I'd like to make - are a fit for all uses. So in addition to the following improvements, I think a config system would make sense.

Improvements

  • Pistol/force buy rounds
  • Allow one or more AWPs per-side
  • Allow variable grenades

Configurations

In addition to making all of the above configurable, I also think things like these could be:

  • Whether to balance teams
  • Whether to scramble teams, and how long of a win streak should trigger a scramble

Im sure many more things could be configurable also, but these are just the ones off the top of my head after playing for an hour earlier today.

Anyway, let me know what you think. Thanks!

[REQ] Fast Defuse

Hello B3none,

I think your retake plugin is very well done. But there is one improvement I would like to see. If I want to detonate all CT's after a short time, i.e. when the 5 second music timer has not yet started, it would be nice if I could detonate the bomb directly and not have to wait 5 or 10 seconds. Would an implementation be possible?

Kind regards
Sh1su

RetakesPluginShared file not found

I'm currently running a server via Docker Desktop on Windows using the Docker image generated by https://github.com/joedwards32/CS2. This image is built off of the cm2network/steamcmd:root Docker image, which is running Debian.

I'm building multiple other docker images on my local, one is just to download the latest version of CS2 into the image for faster building times on subsequent images as I've been burned before by using Docker's cache so I run --no-cache on builds. I call this the "cs2-basic" image. There are no addons in here

The next image is built using the above-mentioned "cs2-basic" image as a base, but adds Metamod, Counterstrike-Sharp, and a bash script that modifies the gameinfo.gi file to allow Metamod to start up. I call this the "cs2-metamod-cssharp" image.
The versions of Metamod and counterstrikesharp I'm using in this build are the following currently:

  • Metamod: 1284
  • CounterStrikeSharp: 202 with runtime

The final image is my retakes image which is built off of the above-mentioned "cs2-metamod-cssharp" image. This image adds all of the plugins for CounterStrikeSharp into the image as well as some of the static config files.
The versions I'm currently using for the retakes plugins are the following:

  • cs2-retakes: 2.0.0
  • cs2-retakes-plugin-shared: 2.0.0
  • cs2-retakes-allocator: v2.0.0-alpha
  • cs2-instadefuse: 1.4.2

I'm using curl to download the zip files, then unzipping them into a temp directory, which I then use to copy all of the files into the correct directories. Thereafter I'm using the root user to set the ownership of all of the files in the temp directory recursively to the steam user as that's the user that will be running the CS2 server.

When I used previous versions of CS2-Retakes that didn't have a shared plugin this process worked 100%, but with the shared plugin I'm running into a FileNotFoundException while CounterStrikeSharp tries to load the RetakesPlugin. The exceptions are as follows:

2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/RetakesPlugin/RetakesPlugin.dll
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32    at System.Reflection.RuntimeAssembly.GetExportedTypes()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 128
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/RetakesPluginShared/RetakesPluginShared.dll
2024-03-27 13:57:32 System.Exception: Unable to find plugin in assembly
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 131
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/InstadefusePlugin/InstadefusePlugin.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/CS2Rcon/CS2Rcon.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'

I've tried setting ownership recursively again on the addons directory above the metamod and CounterStrikeSharp addons, but even that didn't work and I have confirmed that the file actually exists inside the image. I'm stumped and any guidance would be appreciated. I'm more than happy to upload my Dockerfiles here if you'd like to have a look at them.

Proof of the RetakesPluginShared.dll file being in the correct directory:
image

CS2 Crashes after reconnection

I just removed all my plugins and tested it only with cs2-retakes plugin.
If the round started and you disconnect and then reconnect the game crashes.

It only happens when you are in a round defending/attacking.
If its warmup it does not crash after reconnecting

I also tested it with my friend, it also happens to him :/

Client: Windows 11
Server: Linux

Separate hint and chat bombsite announce.

separate please hint & chat message because it will not get drawn in hint and breakdown since hints has html formatting
config:"retakes.bombsite.announcement": "Retake [GREEN]{0}[SILVER]: [RED]{1} Ts[SILVER] vs [BLUE]{2} CTs"
result:
obrazek
obrazek

Disable automatic team balance and fix disabling auto-scramble

I want to use your retake server to practice within my CS-team and we would like to choose our CT/T teams manually and not have the server switch people automatically.

I am a C#-developer so I could make PR for such a feature if you are interested instead of me making a private fork.

Proposal

activate/deactive plugin by convar

One feature I really liked in the retake plugin for CSGO from spelwis was the convar sm_retakes_enabled.

With this convar one could effectively activate and deactivate the plugin on the fly.

Want to play some retake? Set sm_retakes_enabled to 1.
Want to do learn some nades? Just set it to 0 and load your training set up.

It was super convenient that everybody could just stay on the server and one got total control.

Is it possible to add such a feature?
So that there is a convar and when its set to zero the plugin does absolutely nothing and just waits to be activated?

Pistol round

Any ways to add random pistol rounds as well? And capability to buy awp If someone wants? Ty!

When the game starts all weapons disappear and never come back

12:22:08 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> CounterStrikeSharp.API.Core.NativeException: Invalid function pointer
at CounterStrikeSharp.API.Core.ScriptContext.CheckErrors() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/ScriptContext.cs:line 176
at CounterStrikeSharp.API.Core.NativeAPI.ExecuteVirtualFunction[T](IntPtr function, Object[] arguments) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/API.cs:line 1059
at CounterStrikeSharp.API.Modules.Memory.DynamicFunctions.BaseMemoryFunction.InvokeInternal[T](Object[] args) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Memory/DynamicFunctions/BaseMemoryFunction.cs:line 72
at CounterStrikeSharp.API.Modules.Memory.DynamicFunctions.MemoryFunctionWithReturn`7.Invoke(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Memory/DynamicFunctions/MemoryFunctionWithReturn.cs:line 154
at CounterStrikeSharp.API.Core.CCSPlayerController.GiveNamedItem(String item) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Model/CCSPlayerController.cs:line 26
at CounterStrikeSharp.API.Core.CCSPlayerController.GiveNamedItem(CsItem item) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Model/CCSPlayerController.cs:line 37
at RetakesPlugin.Modules.Managers.AllocationManager.AllocateEquipment(CCSPlayerController player) in /home/runner/work/cs2-retakes/cs2-retakes/Modules/Managers/AllocationManager.cs:line 18
at RetakesPlugin.Modules.Managers.AllocationManager.Allocate(CCSPlayerController player) in /home/runner/work/cs2-retakes/cs2-retakes/Modules/Managers/AllocationManager.cs:line 11
at RetakesPlugin.RetakesPlugin.<>c__DisplayClass38_0.b__0() in /home/runner/work/cs2-retakes/cs2-retakes/RetakesPlugin.cs:line 670
at InvokeStub_Action.Invoke(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at CounterStrikeSharp.API.Core.FunctionReference.b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 120

Crash server

After installing the plugin, the server simply cannot turn on

2 players max

Can you please add an option in the config that if there is one person on the server the retake will not start and there will be an endless wurmap until someone enters. And as soon as there are 2 people the game starts

Queue problem

CHostStateMgr::QueueNewRequest( Changelevel (de_dust2), 3 )
SV:  CNetworkServerService::StartChangeLevel( (no landmark) )
"Jesse Pinkman<4><[U:1:1473332431]><CT>" ChangeTeam() CTMDBG , team 3, req team 0 willSwitch 0, 9766.52 
[Retakes 1.3.8] OnPlayerTeam event fired.
[Retakes 1.3.8] [Jesse Pinkman] CounterTerrorist -> None
[Retakes 1.3.8] ActivePlayers (BEFORE): 
[Retakes 1.3.8] QueuePlayers (BEFORE): Joseph-, Boundless
[Retakes 1.3.8] _roundTerrorists (BEFORE): Joseph-
[Retakes 1.3.8] _roundCounterTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] [Jesse Pinkman] PlayerTriedToJoinTeam called.
[Retakes 1.3.8] [Jesse Pinkman] Checking ActivePlayers.
[Retakes 1.3.8] [Jesse Pinkman] Checking QueuePlayers.
[Retakes 1.3.8] [Jesse Pinkman] Not found, adding to QueuePlayers.
[Retakes 1.3.8] [Jesse Pinkman] Changing to spectator.
"Jesse Pinkman<4><[U:1:1473332431]><CT>" ChangeTeam() CTMDBG , team 3, req team 1 willSwitch 0, 9766.52 
[Retakes 1.3.8] OnPlayerTeam event fired.
[Retakes 1.3.8] [Jesse Pinkman] CounterTerrorist -> Spectator
[Retakes 1.3.8] ActivePlayers (BEFORE): 
[Retakes 1.3.8] QueuePlayers (BEFORE): Joseph-, Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (BEFORE): Joseph-
[Retakes 1.3.8] _roundCounterTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] [Jesse Pinkman] PlayerTriedToJoinTeam called.
[Retakes 1.3.8] [Jesse Pinkman] Checking ActivePlayers.
[Retakes 1.3.8] [Jesse Pinkman] Checking QueuePlayers.
[Retakes 1.3.8] [Jesse Pinkman] Found in QueuePlayers, do nothing.
[Retakes 1.3.8] ActivePlayers (AFTER): 
[Retakes 1.3.8] QueuePlayers (AFTER): Joseph-, Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (AFTER): Joseph-
[Retakes 1.3.8] _roundCounterTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] [Jesse Pinkman] checking to ensure we have active players
[Retakes 1.3.8] ActivePlayers (AFTER): 
[Retakes 1.3.8] QueuePlayers (AFTER): Joseph-, Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (AFTER): Joseph-
[Retakes 1.3.8] _roundCounterTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] [Jesse Pinkman] checking to ensure we have active players
Client 260 'Jesse Pinkman' signon state SIGNONSTATE_FULL -> SIGNONSTATE_CHANGELEVEL
"Joseph-<5><[U:1:841754534]><Spectator>" ChangeTeam() CTMDBG , team 1, req team 0 willSwitch 0, 9766.52 
[Retakes 1.3.8] OnPlayerTeam event fired.
[Retakes 1.3.8] [Joseph-] Spectator -> None
[Retakes 1.3.8] ActivePlayers (BEFORE): 
[Retakes 1.3.8] QueuePlayers (BEFORE): Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] _roundCounterTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] [Joseph-] PlayerTriedToJoinTeam called.
[Retakes 1.3.8] [Joseph-] Checking ActivePlayers.
[Retakes 1.3.8] [Joseph-] Checking QueuePlayers.
[Retakes 1.3.8] [Joseph-] Not found, adding to QueuePlayers.
[Retakes 1.3.8] [Joseph-] Changing to spectator.
[Retakes 1.3.8] ActivePlayers (AFTER): 
[Retakes 1.3.8] QueuePlayers (AFTER): Joseph-, Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] _roundCounterTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] [Joseph-] checking to ensure we have active players
Client 261 'Joseph-' signon state SIGNONSTATE_FULL -> SIGNONSTATE_CHANGELEVEL
"Boundless<6><[U:1:246043192]><Spectator>" ChangeTeam() CTMDBG , team 1, req team 0 willSwitch 0, 9766.52 
[Retakes 1.3.8] OnPlayerTeam event fired.
[Retakes 1.3.8] [Boundless] Spectator -> None
[Retakes 1.3.8] ActivePlayers (BEFORE): 
[Retakes 1.3.8] QueuePlayers (BEFORE): Joseph-, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] _roundCounterTerrorists (BEFORE): No players in the queue.
[Retakes 1.3.8] [Boundless] PlayerTriedToJoinTeam called.
[Retakes 1.3.8] [Boundless] Checking ActivePlayers.
[Retakes 1.3.8] [Boundless] Checking QueuePlayers.
[Retakes 1.3.8] [Boundless] Not found, adding to QueuePlayers.
[Retakes 1.3.8] [Boundless] Changing to spectator.
[Retakes 1.3.8] ActivePlayers (AFTER): 
[Retakes 1.3.8] QueuePlayers (AFTER): Joseph-, Boundless, Jesse Pinkman
[Retakes 1.3.8] _roundTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] _roundCounterTerrorists (AFTER): No players in the queue.
[Retakes 1.3.8] [Boundless] checking to ensure we have active players
Client 262 'Boundless' signon state SIGNONSTATE_FULL -> SIGNONSTATE_CHANGELEVEL
HostStateRequest::Start(HSR_GAME):  loop(levelload) id(3) addons() desc(Changelevel (de_dust2))

I'm still having a problem with the queuing system. I added it as console.log txt if you want to review it.

Add bomb plant location

At the beginning of each round say for example "[Retakes] Bomb Planted for: Short" but only TRs see the message.

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.