chr15cs / cs2-practice-plugin Goto Github PK
View Code? Open in Web Editor NEWOpen Source Plugin for Counterstrike 2 based on CounterStrikeSharp
License: GNU General Public License v3.0
Open Source Plugin for Counterstrike 2 based on CounterStrikeSharp
License: GNU General Public License v3.0
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 ---
Make .help command to show all commands for the currently selected mode.
If it isnt too much trouble, could you add the .replay commands as they were in the csgo plugin?
they were really handy, and i miss them:/
https://github.com/splewis/csgo-practice-mode#bot-replay-commands
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.
when i type meta list there appears:
No plugins loaded.
v232
Metamod:Source Version Information
Metamod:Source version 2.0.0-dev+1289
Plugin interface version: 16:14
SourceHook version: 5:5
unknown command "css"
Linux
No response
Can you maybe make a way to disable the colored smokes in prac mode?
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.
Currently dry run mode is only available using .dryrun.
This is why Dry run mode shall be added to mode menu ".menu"
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.
Bugfix found
Todo:
Implementing Retake mode:
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.
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..
A .delete command to remove the last loaded nade would be useful.
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?
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.
Add prefide mode with the following functions:
Basic functionality:
Edit mode:
Hello!
Thank you for creating this plugin, really great to get started with!
I was wondering of there is a way to remove a recorded replay from a replay set?
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
If possible the addition of prefire mode would be greatly appreciated due to no yprac maps yet available. Something similar to this https://www.youtube.com/watch?v=wRnFTs0PK9E. Where you could add your own bots and save it.
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
Coaching slot currently does not work
dumb question, How do I make myself admin to use this?
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?
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
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.
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.
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 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
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
}
}
}
A bug happened!
1.0.0.2 (Default)
Can be checked with 'meta version'
Can be checked with 'css version'
Linux
No response
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
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.
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"
when installing the plugin the cfg/CSPRACC folder appeares to be written linke this: CSPracc
This results in this error message:
To fix this problem you need to change the folder to all uppercases
v1.0.0.3
Only tested Linux version
...
...
Linux
No response
Hi, I really appreciate your work on this plugin. Could you implement a command to list all available nade tags?
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
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 :
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_Action
1.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*)
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. :-)
Bots created with .crouchbot or .crouchboost may seem to be crouching but if you want to jump ontop of it, then the hitbox is still of a standing player.
.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
For example, if I enter !pracc at the bottom of the chat it says that the config is being loaded, but it is not loaded. Even if I enter !menu and try to load something else, the message appears but nothing happens
v1.0.0.3
Metamod:Source Version Information
Metamod:Source version 2.0.0-dev+1291
Plugin interface version: 16:14
SourceHook version: 5:5
v232
Linux
No response
While we wait for all players to log in to play, have a simple ffa deathmatch mode ".dm"
Yes, and I've also seen it in a modded version that they created for CS2. https://github.com/kus/cs2-modded-server
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.