Giter Club home page Giter Club logo

cs2-practice-plugin's Introduction

CS2-Practice-Plugin

Open Source Plugin for Counterstrike 2 based on CounterStrikeSharp

Discord

Discord

Plugin Functions

If you have any ideas which features I shall add in the future, feel free to open an issue and we can talk about it.
Please read the wiki on how to use each of the modes.
Already useable modes:


Installation Guide

Installation Guide
Or see the wiki

Configuration

This plugin is somewhat customizeable.
Any Important steps are described here

Credits

For bot command implementation: https://github.com/shobhit-pathak/MatchZy/
Alot of ideas for match and pracitce mode:
https://github.com/splewis/get5
https://github.com/splewis/csgo-practice-mode
Coach Slot: https://github.com/marqdevx/mm-cs2-coach
Throwing Smokes: https://github.com/zwolof

Upgrade your practice

drawing
Refferal link, create a free account and support me.

cs2-practice-plugin's People

Contributors

chr15cs avatar ioexceptional avatar qchri avatar willjsaint 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

Watchers

 avatar  avatar  avatar  avatar  avatar

cs2-practice-plugin's Issues

Use CSS built in Admin System

CSSharp has for some time now a built in admin system which we should use,we have to take a closer look on how this should be used and implemented.

COACH DIES DELAYED

hi, can you perhaps fix, that coach dies delayed? now he could throw some insta smokes from spawn if someone gives him smoke.

Also, I dont know this exactly but, can you somehow make it so coaches spawn in air, or in non competitive spawns? with setpos or smth, pracc.com plugins have this.

In Practice Mode Let Players Spawn With Grenades

As a quality of life change you could let players spawn with grenades in practice mode, instead of having to buy them every time.
For this you can use following convars:
mp_ct_default_grenades "weapon_incgrenade weapon_hegrenade weapon_smokegrenade weapon_flashbang weapon_decoy"
mp_t_default_grenades "weapon_molotov weapon_hegrenade weapon_smokegrenade weapon_flashbang weapon_decoy"
No Idea if the decoy grenade is necessary, just wanted to include it here. Remove weapon_decoy to not let players spawn with decoys.

To revert this for scrims/pugs/live matches just add mp_ct_default_grenades "" and mp_t_default_grenades "" to undo_pracc.cfg or 5on5.cfg. I'm unsure if you have to set them to "" or 0 as Valve themselves use "" for similar convars in cfg/gamemode_competitive.cfg, but this reference uses 0, just to let you know.

You could also disable grenade dropping (mp_death_drop_grenade 0) with this change to keep the map a bit cleaner after many respawns as all players will spawn with grenades anyway

Request: Add a command to save last nade

I always found it a little unergonomic to always need to use .back to before saving a grenade. If there was something like .savelast then you could throw a grenade and save it without needing to go back to the lineup.

Retake Mode

Implementing Retake mode:

  • Weapon Kits (Pistol, Forcebuy, fullbuy)
  • Custom Spawnpoints
  • Custom or Random HP Kits
  • etc

Kleine Vorschläge

Hallo

das Plugin läuft bis jetzt super und finde es gut umgesetzt. Folgende Punkte würden wir gerne als Vorschläge mitteilen
die bei uns im Verein aufgefallen sind.

Im Match-Modus farbige Smoke ausschalten seitens Plugin oder automatisches abschalten sobald der Match-Modus gestartet wird. css_pracc_smokecolor_enabled 0 für die Konsole eine alternative aber übers Plugin schöner :-)

Über das Plugin vor Matchbeginn die Möglichkeit haben einzustellen ob volle 24 Runden ausgespielt werden oder Stdartmodus wenn ein Team die 13 Runde hat das spiel beendet wird.

Auch schön wäre die Option ein und ausschalten der klassichen Messerrunde für die Auswahl der Startseite.

Würde mich echt freuen ob die Punkte umgesetzt werden können. :-)

Server crashing when I type .mimic/.replays

Hi, Im not an IT guy just a dude that follow tutorial lol. So my dedicated server is crashing whenever Im typing .replays or .mimic. I get this error on the console server, do you have any sugestion ? I used the metamod dev build 1266 and the 1282 it does the same thing.
The message :

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:

at CounterStrikeSharp.API.Core.Helpers.InvokeNative(IntPtr)

at CounterStrikeSharp.API.Core.ScriptContext.InvokeNativeInternal()
at CounterStrikeSharp.API.Core.ScriptContext.Invoke()
at CounterStrikeSharp.API.Core.NativeAPI.FireEventToClient(IntPtr, Int32)
at CounterStrikeSharp.API.Modules.Events.GameEvent.FireEventToClient(CounterStrikeSharp.API.Core.CCSPlayerController)
at CounterStrikeSharp.API.Core.CCSPlayerController.PrintToCenterHtml(System.String, Int32)
at CSPracc.Managers.GuiManager.OnTick()
at DynamicClass.InvokeStub_OnTick.Invoke(System.Object, System.Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Delegate.DynamicInvokeImpl(System.Object[])
at CounterStrikeSharp.API.Core.BasePlugin+<>c__DisplayClass45_01[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=*****************]].<RegisterListener>b__2(CounterStrikeSharp.API.Core.ScriptContext) at DynamicClass.InvokeStub_Action1.Invoke(System.Object, System.Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Delegate.DynamicInvokeImpl(System.Object[])
at CounterStrikeSharp.API.Core.FunctionReference+<>c__DisplayClass3_0.<.ctor>b__0(CounterStrikeSharp.API.Core.fxScriptContext*)

Feature request

Can you add a save current location as that players spawn for all users. Then allow the users to start a 30 round 90 second match where after the end of the round you get a 5 second hold with a 20 second buy limit then the round starts. So you can keep repeating the same type of encounters over and over again..

Use Competitive Spawns Only

.spawn currently shows all spawns per map, but using only competitive spawns makes more sense for this plugin I believe (at least when gamemode is set to competitive)

Check this reddit post by Samwid for reference, but I am unsure if Valve made any changes to competitive spawn after that post

Crashing whenever using .nades or .replays

Whenever i try and use .nades or .replays etc server crashes with this error code:
---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Runtime.InteropServices.Marshal.ReadByte(IntPtr ptr, Int32 ofs) at CounterStrikeSharp.API.Core.ScriptContext.GetResult(Type type, Byte* ptr) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/ScriptContext.cs:line 451 at CounterStrikeSharp.API.Core.NativeAPI.GetSchemaValueByName[T](IntPtr instance, Int32 returntype, String classname, String propname) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/API.cs:line 1101 at CounterStrikeSharp.API.Core.CBasePlayerController.get_PlayerName() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Objects.g.cs:line 5103 at CSPracc.EventHandler.PracticeEventHandler.OnPlayerHurt(EventPlayerHurt event, GameEventInfo info) in D:\Development\repos\CS2 Practice Plugin\CS2-Practice-Plugin\CSPracc\Modes\PracticeMode\PracticeEventHandler.cs:line 63 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace ---

Match Mode - forcePause not possible

I was just checking out your plugin and I noticed a bug in the description and implementation of the match mode pause commands. Specifically, I couldn't find a way to force pause the match. In your documentation you also state to use "forceunpause" to pause and unpause the match which is not possible.

image

AdminManager improvment

In new versions of cssharp, the admin manager got changed and my implementation was based on v90, where I directly accessed the flags which I should not have done, because this can easily change in new version. Instead I should use AdminManager.PlayerHasPermission so it does all the work itself

Config options not being updated

Changing the CSPracc.json file doesn't change anything. I set AdminRequirements to false and when I try to test the commands on the server, I still receive "Only admins can execute this command"

Prefire mode

Add prefide mode with the following functions:

Basic functionality:

  • .routes (routename)-> if routename empty or not found, show menu to select route
  • .next -> goto next rout
  • .back -> go back to last route
  • .guns -> Gun Menu
  • timer to show time used
  • solo / duo mode

Edit mode:

  • .edit -> Switch to edit mode
  • .addroute (routename)
  • .deleteroute (routename)
  • .editroute (routename)
    • .addspawn
    • .deletespawn

[Request] Captain pick players

Hello, i just have a suggestion for the .match system.

I wounder if there is any chance to add a "pick-player" system, where we set 2 captains and they pick players until both team has 5 players.

[Bug]: test

What happened?

A bug happened!

Plugin Version

1.0.0.2 (Default)

Which metamod version are you using?

Can be checked with 'meta version'

Which css version are you using?

Can be checked with 'css version'

What server os do you use?

Linux

Relevant log output

No response

Plugins not running

Today there was a server update of Cs2. Unfortunately the plugin apparently no longer works. Does anyone have an idea how I can get the plugin to work again? I have Metamod mmsource-2.0.0-git1280-linux and counterstrikesharp-build-161-linux-b9ca63a.

Despite the current versions, the commands in the chat do not work.

Can anyone help me?

See same smokes as friend

Hi, when me and my friend throwing smoked/nades in pracc, when throwing alot we can see each others throws so my own skips out often, bad english but maybe you understand xD Any way to prevent this? is is it just the game

Match (Captain pick player)

Hello, i just have a suggestion for the .match system.

I wounder if there is any chance to add a "pick-player" system, where we set 2 captains and they pick players until both team has 5 players.

[Request] Custom Admins

Hi,

Is there a possibility to set up a custom SteamID64 admins permission (without using cssharp/admins.json), but in a separate file?

I want this option to be available.
Example: game/csgo/cfg/cspracc/admins.json

{
  "steamid64": ""
}

I'm running a specific setup where I don't have the option to grant permission through CSSharp due to shared files.

Erro Meta list

Hello, i install the pulgin on my server and i have this erro on meta list:
meta list
Listing 1 plugin:
[01]

i haver a
Windows Server 2022
can you help me

Backup wrong order

Another problem I saw was this: The order of the backup is wrong it came like this

[!1] 01
[!2] 03
[!3] 02
[!4] 04
[!5] 05

I dont know whats the original idea for the 01, 02, 03, but if you could do it like it shows the score or smth, like
[!2] 1-1 means second round score: 1-1, or smth like this

or just do .backup last and it would auto backup last round

https://gyazo.com/d3d5eb68afb0452a2d71a7d067738b96

Sorry for spamming with theese, just some issues came up after testing, haha

Use multiple tags to filter the nades

I don't think it's possible now (well, at least I couldn't figure it out). But it would be of great use at least to me. And with the menu showing only 3 nades at once being able to filter them more should be useful overall.
If you don't have the time I can try to look into it myself, however, my C# is very basic, so it would take me a lot of time, while the task itself doesn't sound too complicated :)

to clarify:
I would like to be able to sort through nades by using multiple tag ids. Something like .nades a, smoke, t

Retake mode enhancements

Todo:

  • Provide default spawns for the competitiv maps
  • Make sure bomb is being planted (or autoplant)
  • Load specific scenarios
  • More customizable scenarios
  • More weapon sets

DryRun Mode

  • change to mode with .dry .dryrun
  • custom config where you can specify a limited freezetime f.e.
  • always 16k money at round begin
  • easy weapon change with .ak .awp .m4
  • .refill to regain all utilities (smoke, flash, he, molotov)
  • .retry (?) to fast forward to next round
    list any ideas below.

Feature: list tags

Hi, I really appreciate your work on this plugin. Could you implement a command to list all available nade tags?

Add DryRun to .menu

Currently dry run mode is only available using .dryrun.
This is why Dry run mode shall be added to mode menu ".menu"

.spawn commands can not be bound to a key

the .spawn commands can not be bound to a key. When typing .spawn 1 in all chat, it works perfectly fine. When typing say .spawn 1 in game console, it give an error and does not work. When typing say ".spawn 1" in console it works perfectly find again. When binding say ".spawn 1" to a key, it give an error and does not work.

Example.of.say.command_small.mp4

cant have more admins

Hi

For some reason I cant set more then 1 admins for the plugin.
I tried a lot of options, but It just doesnt work. If I set myself for admin it works, but as soon as I add another admin, even I lose my admin permissions.

This is my current admins.json
{
"x": {
"identity": "76561198269522581",
"immunity": 100,
"flags": [
"@css/root",
"@CSPracc/admin"
],
"groups": [
"#css/admin"
],
"command_overrides": {
"css_plugins": true,
"css": false
}
},

"y": {
"identity": "76561198190149171",
"immunity": 100,
"flags": [
"@CSPracc/admin"
],
"groups": [
"#css/admin"
],
"command_overrides": {
"css_plugins": true,
"css": false
}
}
}

Bot spawn problems in different gamemodes (windows)

So when you start the server with "+game_mode 1" command (which is competitive gamemode) and let's imagine you are T side and you try to spawn a bot, the plugin will spawn 2 bots from another team (CT). The 1st one is gonna spawn at your exact position and the 2nd one is gonna spawn on CT spawn. Another problem here is if you try to kick them by using ".nobot" or ".clearbots" command, then the 1st bot (which was at your position) will just move to CT spawn so after that both of them are just gonna stay on CT spawn. I can only fix this problem by using "fake_rcon bot_kick".
And in casual gamemode (game_mode 0) when you spawn a bot at your position using ".bot" or ".cbot", it will spawn 1 bot from your team for some reason. There's two problems: you cannot kill your teammates in casual gamemode and they are moving from your current position for a bit when you are moving like inside of them. This problem can be fixed by using "mp_teammates_are_enemies 1".
I host my dedicated server on my windows pc. Is this a bug or am I just doing something wrong here?

From .warmup you cant do anything

If match is live and I want to go back to warmup phase I type .warmup, but from there I cant ready I cant do anything. I can only go .pracc and go back to .match from that to start match.

I think .warmup should have the function to start .match, like this I dont see any point in having that.

Also I think there should only be 1 warmup config in the files.

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.