GithubHelp home page GithubHelp logo

shobhit-pathak / matchzy Goto Github PK

View Code? Open in Web Editor NEW
228.0 10.0 62.0 1.07 MB

MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice/pugs/scrims/matches with easy configuration and Get5 (G5API/G5V) support as well!

Home Page: https://shobhit-pathak.github.io/MatchZy/

License: MIT License

C# 100.00%
counter-strike counter-strike-2 cs2 cssharp tournament counterstrikesharp match-plugin matchzy pug-setup metamod

matchzy's People

Contributors

amnesialemon avatar anshumanrohella avatar ar1a avatar crashzk avatar dying-ducks avatar flowingspdg avatar gekasd avatar iwhite67 avatar lanslide-team avatar merakw avatar nicedayzhu avatar renerebsdorf avatar sarim-hk avatar satttoshi avatar shobhit-pathak avatar sirnugg3ts avatar sniperpl avatar sphaxa avatar st1ng2 avatar the0mikkel 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  avatar  avatar  avatar  avatar  avatar

matchzy's Issues

Coach taking up "competitive spawns" on maps where there are only 5 "competitive spawns"

Coach is taking up "competitive spawns" on maps where there are only 5 "competitive spawns", pushing players to non-default spawns. A big deal on certain maps where there are instant smokes based off the five spawns (ancient t and ct, anubis ct, vertigo t and ct, inferno ct) pracc and refrag have managed to avoid this issue by somehow spawning the coaches above the players(maybe they just spawn normally and then manually check the positions of the coach/5 players, then teleport?). Love the plugin and all the great work you've been putting in aside from this!

[REQ] Auto unpause the match after its paused

Hello, I think there should have a time limit on each pause. Like .tac has 30 seconds time limit. Other type of pause like .pause or .tech should also have a time limit, when a pause time is run out, it should be automatically unpause. A countdown timer display in the hint message that shows the time left of this pause should be good.
It's better if the time limit can be configurable.

Thanks!

Some advices if you can add

Hello.

  1. Captains (if n players in server, select 2 random captains)
  2. If all players are ready we start mapvote (maplist can be provided in config)
  3. Saves teams, locks server (no new players who did not put !ready can join server), starts voted map
  4. If all players are ready, they are moved to spec and captains will start picking players ABBAABBA
  5. If not ready in 5 min or did not join back (kick and unlock server), unlocks server and starts from (3)

[BUG] Placing bot and spawn commands are not working

Hello

First, thank you for this amazing plugin. That's help a lot in our Community.

Following the Problems

first here the setup

Cs2 install over docker in pterodactyl management system
Docker Image: ghcr.io/1zc/steamrt3-pterodactyl:latest

Meta Version
Metamod:Source version 2.0.0-dev+1266
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: GameDLL (gameinfo.txt)
Compiled on: Nov 16 2023 05:35:43
Built from: alliedmodders/metamod-source@1489f33
Build ID: 1266:1489f33
http://www.metamodsource.net/

meta list
Listing 1 plugin:
[01] CounterStrikeSharp (0.1.0) by Roflmuffin

css_plugins list
List of all plugins currently loaded by CounterStrikeSharp: 1 plugins loaded.
[#1:LOADED]: "MatchZy" (0.6.0-alpha) by WD- (https://github.com/shobhit-pathak/)
A plugin for running and managing CS2 practice/pugs/scrims/matches!


The Problem

After we install MatchZy

  • want spawn bot in current position, but it's not working
  • I wanted to make a selected area appear with the command .spawn, but your program told me that the command is !tspawn 1, with an exclamation mark, which does not match the documentation. Additionally, it recognizes the command to move me, but does not take me to the spawn

if is possible that we can fix this.

you can look this my problem in this video https://www.youtube.com/watch?v=matCqKY_PVg

[BUG] Problems with the pause feature

The tactical, technical and admin pauses can conflict with each other.

Scenarios and bugs:

  • During a regular .pause, a player can still type .tac, to start a tactical timeout. That will override the regular pause and start a tactical one. And after about 30 seconds, the game resumes.
  • Players can even unpause a forced pause by typing .tac. That will override the admin pause and start a tactical one. And after about 30 seconds, the game resumes.
  • Payers can type .pause during a .tac pause, but it won't stop the tactical timeout.

In every scenario above, the plugin still thinks the game is paused, even after the tactical timeout finished and the game resumes. So you can't call another pause, unless booth team types .unpause, which is very confusing. And the chat keeps spamming the .unpause.

.spawn number doesn't work

what title says.. it game it says "moved to spawn x/x" but doesn't port you there
Edit 1: .bot doesn't work for me as well - just spawns bot to spawn, not my position.

More detailed error messages

If I'm not admin on the server, and try to type: !scrim or !prac, it doesn't say anything at all.

It would be good if it said something like "You must be admin in order to...."

[REQ] Map voting system

Would it be possible to implement some map voting system?

How would it work, when the competitive is ending, with 5 rounds left, let's say, a vote would open in the chat menu where players can vote to play on which map in the next competitive. A cvar would be interesting to control the number of maps missing to open the vote.

Or even a maplist system, where it will just follow the list of maps that we configure and simply switch to the next map after the competitive one is over.

I believe both options would be perfect if implemented.

Knife round winner suggestion

Currently, if both teams have the same number of players and the same HP at the end of a knife round, the winner is randomly chosen.

Rather than have a random winner, make the winner the first team that did damage to the enemy.

[REQ] Increase the time to send the message

It would be interesting to increase the time for sending the message informing whether the player was ready or not.

image

A good time would be every 72 seconds, let's say, or even a way to configure the time ourselves. This way we can avoid this message flood.

[INFO] simple question

I run just one plugin on CounterStrikeSharp to have a ranking system when server is set on FFA. Does MatchZy disable all plugins when PUG mod is launched?

Add Flash blind time

Hello, you could add flash blind time (for flash test's) it ez to add and nice to have.

RegisterEventHandler<EventPlayerBlind>((@event, info) =>
{
   if (isPractice && @event.Userid.SteamID != @event.Attacker.SteamID)
   {
      @event.Attacker.PrintToChat($"{chatPrefix} flashed {@event.Userid.PlayerName} blind time: {@event.BlindDuration}");
    }
    return HookResult.Continue;
});

[REQ] Support for `.surrender` command

If a team wants to give up the game, at least X players from the same team must use the command to give up the game.

If possible when a team uses the command open a voting menu for the team that used the command to decide whether they will surrender or not.

No mention of Windows-only release in matchzy-0.4.3-with-cssharp.zip

Hello,

Installed matchzy-0.4.3-with-cssharp.zip to my Linux server and got "meta list" --> NOFILE output.

Reason was the counterstrikesharp.vdf differences between Linux and Windows releases.

Plugin now runs after manually adjusting counterstrikesharp.vdf from

"Metamod Plugin"
{
	"alias"	"counterstrikesharp"
	"file"	"addons/counterstrikesharp/bin/win64/counterstrikesharp"
}

to

"Metamod Plugin"
{
	"alias"	"counterstrikesharp"
	"file"	"addons/counterstrikesharp/bin/linuxsteamrt64/counterstrikesharp"
}

Please add mention that this easy installation package only works with Windows server out-of-the-box.

[REQ] Improvements to the MatchZy configuration loading system

It would be interesting to have MatchZy create the gamemode_competitive_server.cfg file and use it as a basis for general server configuration.

In theory it would copy the gamemode_competitive.cfg settings from CS2 itself, the question of creating a gamemode_competitive_server.cfg file would be because this way we can better configure the server with our settings and in future CS2 updates the file is not replaced.

So in the knife.cfg, live.cfg, prac.cfg, warmup.cfg files we can only place the configurations that the plugin will execute when running these configurations.

I don't know if you understand more or less, but it would be something similar to the configuration system that WarMod [BFG] uses.

https://bitbucket.org/warmod/warmod.bitbucket.org/src/master/
https://forums.alliedmods.net/showthread.php?t=225474
https://warmod.bitbucket.io/scripting/include/warmod_configs.inc

Use Admin Framework from CounterStrikeSharp

CounterStrikeSharp has introduced an Admin Framework which supports admins and flags similar to SourceMod, removing the need to have an admin file for every plugin.

Could you please update your plugin to use this new system so we don't have to have an individual admin file for your plugin.

[REQ] Do we really need this welcome message?

player.PrintToChat($"{chatPrefix} Welcome to the server!");

I believe we can remove this feature, or improve it if we really need it.

Option to activate this welcome message, so in the future with support for translating messages we can customize it to our liking, etc.

[REQ] Improvements to the team name system

First I would like to state that I found the implemented team naming system interesting, thank you for that.

That said, I thought, would it be possible to have an option where I can configure on the server which of the team name modes we are going to use.

Because I thought it would be possible to implement a list of team names already configured in the plugin, for example, the name of CS2/CSGO teams that went to majors, etc., something similar to that in WarMod [BFG].

It would have already included all CSGO team names and if you activate it to leave random team names, it chooses a name from those teams for each team and configures it for the CT and TR teams.

It would be interesting if it was possible to implement this feature in MatchZy, having two options, using the name of the player we currently have, the option for us to choose the team names and the new random option which would be the names of the teams we configure.

In the future, we could even implement, along with this resource, a system of team logos and even their TAGS so that when the mix starts, it shows everything and such.

Note: I know that for hours there would be no way to customize custom files because CS2 disabled FastDL.

Bots are not added to the server

When entering a command into the chat, the ".bot" writes an error: Cannot add bots, the team is full! Use .nobots to remove the current bots.
Although the server is completely empty.

[Suggestion] Saved nades visible to everyone

For team training, it is helpful if you can retrieve stored grenades from someone else. Possibly also the possibility to save nades in categories.

Info. The .deletenades command doesn't seem to work.

[REQ] Add a force un/pause for admins and allow admins to unpause as a player

Add admin commands .forcepause (or .adminpause) and .forceunpause (or .adminunpause)

Admins currently have .pause and .unpause but these force the pause and unpause.
For admins, .pause and .unpause should work the same as for non-admins.

The problem is that if admins are playing in the match they have no way of unpausing and the match waiting for the other team to unpause. It will simply unpause the game and continue. Not a good experience for the other team.

[Suggestion] Rethrow last grenade .rethrow

Hey,

I really like this plugin. It has almost all features I wish for a practice Server. One thing I wish if it is possible would be to add a command to rethrow the last grenade like the sv_rethrow_last_grenade command in console. Maybe something like .rethrow.

And I have a little question is it possible to get damage info alongside the flashed time info?

Keep up the good work.

[REQ] Allow matches without .ready

Allow the .ready functionality to be ignored. No messages, no need to .ready etc

An admin can start the match when both teams say they are ready.

I sometimes find that players join a server type .ready then go to the toilet whilst others are joining. The match starts and it gets cancelled due to an AFK.
I've always disabled it for any plugins I've run. It's only useful for services like PopFlash where servers need to be automated IMO.

Options are always great :)

matchzy_minimum_ready_required -1 could be used to disable.

Demos are not loading

Hello. I've been trying this plugin lately on my dedicated server and everything works fine, i start a match by saying .start on all chat and it works perfectly and when the scrim ends i simply change the map because i have no idea how to stop the match(i changed the live.cfg settings for the command "mp_match_can_clinch" from true to false), and once i change the map the demo is stored in the default MatchZy folder but when i try to load the demo it won't load at all, it keeps loading for an eternity. I think the demo gets corrupted for some reason.

[REQ] Web/FTP demo upload system

I believe the feature of sending the demo to the web/ftp after the competition has ended would be interesting.

So I could provide a link for players to download. And why not improve even further and offer support for discord, with a webhook sending system to send a message in a channel with information about the finished game and the link to download the demo.

[REQ] Webhook API

Hello, thank you so much for developing awesome plugin!
I just looked into CounterStrikeSharp, so I'm sorry if somebody talked about it already.

I was developing multiple get5-integrated webpanel system before, I'd like to help developing webhook and/or webpanel with MatchZy!

Is there any schedule or plan to add this? if you have any specification or plan, I'd like to follow and help developing them accordingly!

Minimum ready required option from n from each team

Ideally matchzy_minimum_ready_required would be set to 1, meaning that 1 player from each team is required to be ready, that way one player can ready up for their team. Based off of

MatchZy/Utility.cs

Lines 465 to 467 in bc66f67

} else if (countOfReadyPlayers >= minimumReadyRequired) {
liveRequired = true;
}
it seems like with default config, two players from one team could ready and start the game without the other team having any input

[Suggestion] Pugsetup like demo name format

I used to use Pugsetup in CSGO, and liked the way that it enables custom format of the demo name

Pugsetup

I'm going to add it to my own fork, but if the feature has your interest we could discuss how it should work and I could make a PR

Rounds Played in Player Stats

Could you please add a rounds_played stat to the matchzy_player_stats table for each game? It was a feature of Get5 and allows us to manually calculate ADR and some other stats without having to join tables. Would be greatly appreciated, thank you <3

[REQ] Kicker players NotReady

It would be possible to implement automatic kick for players who do not type .ready, which are marked as NotReady in this case.

There would be some rules for them to be kicked, having a minimum number of players on the server to start kicking notready players.

Activate / Deactivate Option

As I understand it the plugin is always active for now and we have the options to be in "match mode" or in "practice mode".

It would be nice to have the option to choose neither.
So that neither is active on startup, and we can use the server for retake or whatever and then to have the ability to activate the "match mode" if we want to scrim, activate the "practice mode" if we want to practice.
And then again send the plugin in “sleep mode” to use the server otherwise.

[Suggestion & Issue] More Bot Commands and Bind Problems

I would like to have commands like .crouch and .boost for bots crouching and spawning bots where i'm instantly on top of. Aswell I think it would be helpful to have a command like .nobot to delete single bots when you are looking at them while using the command.

I had Problems with binds as "bind "kp_1" "say ".spawn 1"" which i use for fast Spawn teleports. The bind just doesnt work and the plugin outputs some weird message in the chat like "use !spawn ". Where as when i use the bind "kp_1" "say ".clear"" does work. I dont know what could be the Problem just wanted to show it.

Hope I could help a bit with fixing and improving the plugin.

Greetings
Flo "tAZED"

[Bug] spawn + bot commands not working

Hello,

the day before yesterday I was practicing instant smokes on Ancient, where the .spawn command and its derivatives (.tspawn / .ctspawn) come in handy.
Today, I noticed this feature does not seem to work anymore. Also .bot commands (e.g. .bot, .crouchbot, .boost) do not work properly anymore, as the bot gets added, but does maintain its spawn point. For .crouchbot, it does crouch on spawn, but does not change position.

I have tested a fresh install with the newest current version of 0.5.1-alpha with the included CSSharp.
Additionally, I have tested with an old metamod version (2.0.0+1225) and the latest (2.0.0+1275).

I do believe this is a bug, but the possibility that this is a problem on my end exists.
If you cannot reproduce this issue, I would be happy to receive some tips :)
Thanks in advance!

For debug purposes I have included a snippet of the chat log on my server:

[MatchZy] [EventPlayerChat] UserId(Index): 1 playerUserId: 0 Message: .spawn 1
[All Chat][kevka^ (172587987)]: .spawn 1
[MatchZy] [EventPlayerChat] UserId(Index): 1 playerUserId: 0 Message: .spawn 2
[All Chat][kevka^ (172587987)]: .spawn 2
[MatchZy] [EventPlayerChat] UserId(Index): 1 playerUserId: 0 Message: .bot
[All Chat][kevka^ (172587987)]: .bot
ClientPutInServer create new player controller [Lieutenant]
"Lieutenant<4>" ChangeTeam() CTMDBG , team 0, req team 3 willSwitch 0, 518.77
[MatchZy] [TemporarilyDisableCollisions] Disabling kevka^ Lieutenant
[MatchZy] [EventPlayerChat] UserId(Index): 1 playerUserId: 0 Message: .crouchbot
[All Chat][kevka^ (172587987)]: .crouchbot
ClientPutInServer create new player controller [Goggles]
"Goggles<5>" ChangeTeam() CTMDBG , team 0, req team 3 willSwitch 0, 613.27
[MatchZy] [TemporarilyDisableCollisions] Disabling kevka^ Goggles

A full implementation of CSSharp's permission system

Thanks for adding basic CSSharp admin, however, as I said in the original Issue Request you should bite the bullet and add proper granular support for admin commands as supported by CSSharp.
Delaying it and doing the fudge fix you've implemented will cause way more work in the longer term. I'm looking to the future for this plugin and can see where it can go and how it can not only support teams but also community servers (I know that's not currently a focus)

As you'll already know the CSSharp admin permission system does all the work for you. You just need to specify the admin level needed for a command and it will allow or block access as needed. No need for adding extra code inside every admin command you add.

Here's a suggestion for a full and proper fix that's extremely powerful (inspired by @crashzk in the original Issue request).

Each admin command is grouped into the standard levels CSSharp provides.

eg .map and .prac are grouped into @css/changemap so more junior members of a team can practice.
Match commands eg .start and .reloadadmins should be reserved for more senior admins.

Each command also has an additional admin setting based on its name.eg @custom/prac

[RequiresPermissionsOr("@css/map", "@custom/prac")]
public void OnPracCommand(CCSPlayerController? player, CommandInfo? command)

An admin could now be given access to just the practice command without the ability to change the map (it's an example only - you probably wouldn't do this)

This gives complete control in assigning actions to admins. Users that need basic functionality have it, but also provides extremely powerful control for minimal coding effort. You could even add @custom/generic to each admin command and keep the same admin system you have now where every admin has access to everything (I don't think this is a good idea personally). @css/generic shouldn't be used as CCSharp should use this as enabling other admin levels.

You will of course need to rip out the current admin checks in commands - looking at the code most are simply removing a couple of lines in about a dozen commands. pause and unpause require the biggest changes.
It's alpha and people should be prepared for changes.

I'm happy to help in anyway I can. Even if it's just grouping commands.

[REQ] Auto-Cancel Match if Players Don't Join Within Specified Time

Feature Description

This feature request is for the addition of an auto-cancel functionality in MatchZy that automatically cancels a match if players do not join within a predetermined time frame.

Suggested Implementation

  • Configurable Time Limit: Allow server admins to set a custom time limit for how long the server should wait for players to join before cancelling the match.
  • Notification System: Implement a notification system to inform players about the remaining time before the match is cancelled.
  • Percentage/Number Based Cancellation: Option to set the cancellation criteria based on either the percentage of players needed or a fixed number of players required to start the match.

I believe this feature would be a valuable addition to MatchZy and greatly enhance the experience for both players and server administrators.

Looking forward to hearing your thoughts on this.

Some functional suggestions

Based on my previous experience using Pug, may I ask if it is possible to add features such as

1.Vote for maps before starting the competition (very important)
2.Administrators can set whether to disrupt the team (very important)
3.Add a prompt box below the warm-up time prompt
4.Add [Ready] to the player name prefix on the scoreboard
5.Whether to enable edge selection in blade games when adding players to cast screens (convenient for me to copy this function to add other votes)

This is an important option for the competition function in the first part
I have many ideas about improving the completeness of functions, based on my long-term experience

Also, can we achieve registration setting Commands like sm_setting are much more convenient for administrators to control on the console

Thanks a lot !

Pls when the player locks in the team is finished, I write it like this and they don't know why it's always a mess to take effect

RegisterEventHandler((@event, info) =>
{
string currentDirectory = Directory.GetCurrentDirectory();
int UID = (int)@event.Userid.UserId;
int team = (int)@event.Team;
var team3Players = team1Players;
var team4Players = team2Players;
if (Number_rounds == 13 || Number_rounds == 26 || (Number_rounds > 26 && Number_rounds % 6 == 0))
{
team3Players = team1Players;
team4Players = team2Players;
}else{ team3Players = team2Players;team4Players = team1Players;}
int t = 0;
if (team3Players.TryGetProperty(@event.Userid.SteamID.ToString(), out _))
{
t = 3;
}
else if (team4Players.TryGetProperty(@event.Userid.SteamID.ToString(), out _))
{
t = 2;
}

            _PlayerController = Utilities.GetPlayerFromUserid(UID);
            Server.NextFrame(() =>
            {
                if (t != 0 && team != t)
                {
                    _PlayerController.SwitchTeam((CounterStrikeSharp.API.Modules.Utils.CsTeam)(int)t);
                    _PlayerController.PlayerPawn.Value.CommitSuicide(true, true);
                }
                else
                {
                    if (t == 0)
                    {
                        t = 1;
                        _PlayerController.SwitchTeam((CounterStrikeSharp.API.Modules.Utils.CsTeam)(int)t);
                        _PlayerController.PlayerPawn.Value.CommitSuicide(true, true);
                    }

                }
                Log($"T= {t}");
            });

            return HookResult.Continue;
        });

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.