Giter Club home page Giter Club logo

cs2fixes's Introduction

CS2Fixes

CS2Fixes is a Metamod plugin with fixes and features aimed but not limited to zombie escape. This project also serves as a good example and help for source2mod and other developers.

Installation

  • Install Metamod
  • Download the latest release package for your OS
  • Extract the package contents into game/csgo on your server
  • Configure the plugin cvars as desired in cfg/cs2fixes/cs2fixes.cfg, many features are disabled by default
  • OPTIONAL: If you want to setup admins, rename admins.cfg.example to admins.cfg which can be found in addons/cs2fixes/configs and follow the instructions within to add admins

Fixes and Features

You can find the documentation of the fixes and features here.

Why is this all one plugin? Why "CS2Fixes"?

Reimplementing all these features as standalone plugins would duplicate quite a lot of code between each. Metamod is not much more than a loader & hook manager, so many common modding features need a fair bit of boilerplate to work with. And since our primary goal is developing CS2Fixes for all zombie escape servers, there is not necessarily a drawback to distributing our work in this form at the moment.

The CS2Fixes name comes from the CSSFixes and CSGOFixes projects, which were primarily aimed at low-level bug fixes and improvements for their respective games. Long term, we see this plugin slimming down and becoming more similar to them. Since as the CS2 modding scene matures, common things like an admin system and RTV become more feasible in source2mod or a similar modding platform.

Compilation

git clone https://github.com/Source2ZE/CS2Fixes/ && cd CS2Fixes
git submodule update --init --recursive

Docker (easiest)

Requires Docker to be installed. Produces Linux builds only.

docker compose up

Copy the contents of dockerbuild/package/ to your server's game/csgo/ directory.

Manual

Requirements

Linux

export MMSOURCE112=/path/to/metamod
export HL2SDKCS2=/path/to/sdk/submodule

mkdir build && cd build
python3 ../configure.py --enable-optimize --symbol-files --sdks cs2
ambuild

Windows

Make sure to run in "x64 Native Tools Command Prompt for VS"

set MMSOURCE112=\path\to\metamod
set HL2SDKCS2=\path\to\sdk\submodule

mkdir build && cd build
py ../configure.py --enable-optimize --symbol-files --sdks cs2
ambuild

Copy the contents of build/package/ to your server's game/csgo/ directory.

cs2fixes's People

Contributors

e-n-v-i avatar easterlee avatar faketuna avatar faramour avatar frozen-h2o avatar hichatu avatar icedrocket avatar idk1703 avatar komashchenko avatar kxnrl avatar m-arcuri avatar maxime1907 avatar notkoen avatar poggicek avatar stefanx111 avatar stone-gpy avatar tilgep avatar vauff avatar xen-000 avatar yarukon avatar zeisenx avatar zer0k-z 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  avatar  avatar  avatar  avatar  avatar

cs2fixes's Issues

setteam command problem.

You can't set player team to 1 ( SPECTATOR ) even this team id is valid.

"CCSPlayerPawnBase::SwitchTeam( 1 ) - invalid team index."

bug to fix?

on retake server, when the player choose the loadout with defuser, the defuser is not given to player, idk maybe you guys can fix it.

AntiTeamFlash

Not an issue since cs2fixes doesnt even have it but maybe yall can find a way to make it happen in cs2fixes

Question: Map specific configs

Hey, great work in a such a stort time! (e.g. rcon support is amazing)

Just a small question:

  • is it currently possible to execute / override map specific configs?

Here is a short snippet that shows what is executed in an order when map is started:

[CS2Fixes] Hook_StartupServer: Running map config for aim_redline_cs2
[CS2Fixes] OnLevelInit(aim_redline_cs2)
exec: couldn't exec '{*}cfg/skill1.cfg', unable to read file
execing server_default.cfg
execing server.cfg
execing gamemode_custom.cfg
exec: couldn't exec '{*}cfg/gamemode_custom_server.cfg', unable to read file
execing maps/aim_redline_cs2.cfg
execing maps/aim_redline_cs2

So basically if the aim_redline_cs2 map has configured bot_quota 5, I would love to be able to override that and execute map specific config that contains bot_quota 10.

Latest gamedata does not load

[CS2Fixes] Loading addons/cs2fixes/gamedata/cs2fixes.games.txt for game: csgo
[CS2Fixes] Initialized module engine2 base: 0x0x7f5c5b5f1000 | size: 4538368
[CS2Fixes] Initialized module tier0 base: 0x0x7f5c5cf01000 | size: 3084288
[CS2Fixes] Initialized module server base: 0x0x7f5c2f46b000 | size: 14336000
[CS2Fixes] Initialized module schemasystem base: 0x0x7f5c59e19000 | size: 303104
[CS2Fixes] Initialized module vscript base: 0x0x7f5c33f0f000 | size: 741376
[CS2Fixes] Found NetworkStateChanged at 0x0x7f5c300f3890
[CS2Fixes] Found StateChanged at 0x0x7f5c2f532360
[CS2Fixes] Found UTIL_ClientPrintAll at 0x0x7f5c2fe64780
[CS2Fixes] Found ClientPrint at 0x0x7f5c2fc2bf90
[CS2Fixes] Found SetGroundEntity at 0x0x7f5c2fd91a40
[CS2Fixes] Found CCSPlayerController_SwitchTeam at 0x0x7f5c2fafd350
[CS2Fixes] Found UTIL_Remove at 0x0x7f5c2fba1930
[CS2Fixes] Found CEntitySystem_AddEntityIOEvent at 0x0x7f5c300ebfa0
[CS2Fixes] Found CEntityInstance_AcceptInput at 0x0x7f5c300d3f50
[CS2Fixes] Found CGameEntitySystem_FindEntityByClassName at 0x0x7f5c2fba0010
[CS2Fixes] Found CGameEntitySystem_FindEntityByName at 0x0x7f5c2fba0080
[CS2Fixes] Found interface GameResourceServiceServerV001 in engine2
[CS2Fixes] Found interface VEngineCvar007 in tier0
[CS2Fixes] Found interface Source2GameEntities001 in server
[CS2Fixes] Found interface SchemaSystem_001 in schemasystem
[CS2Fixes] Failed to find address for ServerMovementUnlock
[CS2Fixes] Failed to find address for VScriptEnable
[CS2Fixes] Failed to find address for CheckJumpButtonWater
[CS2Fixes] Failed to find address for CategorizeUnderwater
[CS2Fixes] Failed to find address for WaterLevelGravity
[CS2Fixes] Detoured Msg at 0x0x7f5c5cf40500
[CS2Fixes] Detoured ConDMsg at 0x0x7f5c5cf411a0
[CS2Fixes] Detoured DevMsg at 0x0x7f5c5cf40b30
[CS2Fixes] Detoured Warning at 0x0x7f5c5cf40610
[CS2Fixes] Detoured DevWarning at 0x0x7f5c5cf40c50
[CS2Fixes] Detoured LoggingSystem_Log at 0x0x7f5c5cfbb8c0
[CS2Fixes] Detoured LoggingSystem_LogDirect at 0x0x7f5c5cfbc0a0
[CS2Fixes] Detoured LoggingSystem_LogAssert at 0x0x7f5c5cfbc450
[CS2Fixes] Failed to find address for UTIL_SayTextFilter
funchook_install error for UTIL_SayTextFilter: 2
[CS2Fixes] Failed to find address for UTIL_SayText2Filter
funchook_install error for UTIL_SayText2Filter: 2
[CS2Fixes] Failed to find address for Host_Say
funchook_install error for Host_Say: 2
[CS2Fixes] Failed to find address for IsHearingClient
funchook_install error for IsHearingClient: 2
[CS2Fixes] Failed to find address for CSoundEmitterSystem_EmitSound
funchook_install error for CSoundEmitterSystem_EmitSound: 2
[CS2Fixes] Failed to find address for CCSWeaponBase_Spawn
funchook_install error for CCSWeaponBase_Spawn: 2
[CS2Fixes] Failed to find address for TriggerPush_Touch
funchook_install error for TriggerPush_Touch: 2
[CS2Fixes] Failed to find address for CGameRules_Constructor
funchook_install error for CGameRules_Constructor: 2
[CS2Fixes] Failed to find address for CBaseEntity_TakeDamageOld
funchook_install error for CBaseEntity_TakeDamageOld: 2
Failed to load plugin addons/cs2fixes/bin/linuxsteamrt64/cs2fixes.so ().

Running on Debian GNU/Linux 12

Ran compiled builds

[question] silenced sounds

I really like the CS2 fixes plugin, but someone keeps coming into my server and making every gun sound like a silencer. How do I prevent this and still use the plugin?
I dont see a cvar?

Players Stay like ghost players even when they leave

When players joins and if he leave player number doesnt go down and in servers console says Nickname STEAM:ID:PENDING
https://imgur.com/a/TsTioDl
here u can see players online are 5vs4 but scoreboard number says there are 6 vs 5 this happens and if there are 10vs10 if other players have joined before and left it would be like 15vs16 on the scoreboard... i hope u understand what im saying

Is this a crash waiting to happen?

What if rand() % spawns.Count() + 1 = spawns.Count()?

CS2Fixes/src/commands.cpp

Lines 278 to 280 in bc2701f

//Pick and get position of random spawnpoint
int randomindex = rand() % spawns.Count()+1;
Vector spawnpos = spawns[randomindex]->GetAbsOrigin();

Shouldn't it just be rand() % spawns.Count()?

[REQ] Admin Hidden in Spec

Probabbly this feature won't benefit so much to ZE Admins, but I know it would help all of us Admins on Community servers that run Casual/Competitive/Retake and such mods (I know that alot of them use cs2fixes), there are so many cheaters to catch and being hidden while in spectators would help a lot !!!

THANKS

Admin Menu Support

Would it be possible to implement a menu option for admin commands?

Example, kick, ban, slay, etc., open a menu showing the players' nicknames, something like what you already have for SourceMod.

Metamod Install Directory [BUILD ERROR]

Heyo, I've downloaded Metamod as per usual, and configured the env var as following:

export MMSOURCE112=/home/myuser/workspace/CS2Fixes/build/addons/metamod

Yet I get the following error when it tries to build:

  File "/home/alerad/.local/lib/python3.10/site-packages/ambuild2/frontend/v2_2/prep.py", line 156, in Configure
    if not cm.generate(options.generator):
  File "/home/alerad/.local/lib/python3.10/site-packages/ambuild2/frontend/context_manager.py", line 93, in generate
    self.parseBuildScripts()
  File "/home/alerad/.local/lib/python3.10/site-packages/ambuild2/frontend/v2_2/context_manager.py", line 50, in parseBuildScripts
    self.execContext(cx)
  File "/home/alerad/.local/lib/python3.10/site-packages/ambuild2/frontend/v2_2/context_manager.py", line 148, in execContext
    exec(code, scriptGlobals)
  File "/home/alerad/workspace/CS2Fixes/AMBuildScript", line 523, in <module>
    MMSPlugin.detectSDKs()
  File "/home/alerad/workspace/CS2Fixes/AMBuildScript", line 203, in detectSDKs
    raise Exception('Could not find a source copy of Metamod:Source')
Exception: Could not find a source copy of Metamod:Source
Configure failed: Could not find a source copy of Metamod:Source```

[Build Failure] Failed to compile

apologies if this isn't the place to put it. but didn't see anywhere else i could report or seek help. i'm having trouble compiling. looks like i'm having issue getting the standard library.

I am familiar with software development and although i'm not new to installing mods on source/source2 engine games i am a noob with developing mods in the ecosystem and this ambuild tool so it could be that i'm not using it correctly.

I used the sdk that came with the repo the HL2SDKCS2 environment variable and then i used the latest metmod source git commit on the master branch of this repo https://github.com/alliedmodders/metamod-source

looks like it's not able to find the standard library of the uint types based on what i could tell.

MMSOURCE112=/home/steam/projects/github/metamod-source
HL2SDKCS2=/home/steam/projects/github/CS2Fixes/sdk

Spawned worker (pid: 922650)
Spawned worker (pid: 922651)
Spawned worker (pid: 922652)
Spawned worker (pid: 922653)
Spawned worker (pid: 922654)
Spawned worker (pid: 922655)
Spawned worker (pid: 922656)
Spawned worker (pid: 922657)
Spawned worker (pid: 922658)
Spawned worker (pid: 922659)
Spawned worker (pid: 922660)
Spawned worker (pid: 922661)
[922652] g++ -m64 -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -msse -fPIC -fvisibility=hidden -mfpmath=sse -fno-omit-frame-pointer --std=c++2a -Wno-error -fvisibility-inlines-hidden -fno-exceptions -fno-threadsafe-statics -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-delete-non-virtual-dtor -std=c++2a --std=c++17 -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -DHAVE_STDINT_H -DGNUC -D_LINUX -DPOSIX -D_FILE_OFFSET_BITS=64 -DSE_EPISODEONE=1 -DSE_ORANGEBOX=3 -DSE_CSS=6 -DSE_HL2DM=7 -DSE_DODS=8 -DSE_SDK2013=9 -DSE_TF2=12 -DSE_LEFT4DEAD=13 -DSE_NUCLEARDAWN=14 -DSE_LEFT4DEAD2=16 -DSE_DARKMESSIAH=2 -DSE_ALIENSWARM=17 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_MCV=22 -DSE_CSGO=23 -DSE_PORTAL2=18 -DSE_BLADE=19 -DSE_INSURGENCY=20 -DSE_DOI=21 -DSE_CONTAGION=15 -DSE_BMS=11 -DSE_MOCK=999 -DSE_PVKII=10 -DSE_DOTA=24 -DSE_CS2=25 -DSOURCE_ENGINE=25 -DCOMPILER_GCC -DX64BITS -DPLATFORM_64BITS -DMETA_IS_SOURCE2 -I /home/steam/projects/github/metamod-source/core -I /home/steam/projects/github/metamod-source/core/sourcehook -I /home/steam/projects/github/CS2Fixes -I /home/steam/projects/github/CS2Fixes/sdk/public -I /home/steam/projects/github/CS2Fixes/sdk/public/engine -I /home/steam/projects/github/CS2Fixes/sdk/public/mathlib -I /home/steam/projects/github/CS2Fixes/sdk/public/vstdlib -I /home/steam/projects/github/CS2Fixes/sdk/public/tier0 -I /home/steam/projects/github/CS2Fixes/sdk/public/tier1 -I /home/steam/projects/github/CS2Fixes/sdk/public/game/server -I /home/steam/projects/github/CS2Fixes/sdk/game/shared -I /home/steam/projects/github/CS2Fixes/sdk/common -I /home/steam/projects/github/CS2Fixes/sdk/public/entity2 -I /home/steam/projects/github/CS2Fixes/sdk/game/server -I /home/steam/projects/github/CS2Fixes/src/cs2_sdk -I /home/steam/projects/github/CS2Fixes/src/utils -I /home/steam/projects/github/CS2Fixes/vendor/subhook -I /home/steam/projects/github/CS2Fixes/vendor/funchook/include -I /home/steam/projects/github/CS2Fixes/vendor/protobuf-3.21.8/src -MD -MF src_cs2_sdk_interfaces_cs2_interfaces.d -c /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.cpp -o src_cs2_sdk_interfaces_cs2_interfaces.o
In file included from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/../../utils/module.h:25,
                 from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.cpp:26:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/../../utils/plat.h:28: warning: "FASTCALL" redefined
   28 | #define FASTCALL __attribute__((fastcall))
      |
In file included from /home/steam/projects/github/CS2Fixes/sdk/public/tier0/interface.h:11,
                 from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.cpp:20:
/home/steam/projects/github/CS2Fixes/sdk/public/tier0/platform.h:467: note: this is the location of the previous definition
  467 |         #define  FASTCALL
      |
In file included from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cgameresourceserviceserver.h:23,
                 from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.h:22,
                 from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.cpp:21:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/../../gameconfig.h:28:65: error: ‘uint8_t’ has not been declared
   28 |         static int HexStringToUint8Array(const char* hexString, uint8_t* byteArray, size_t maxBytes);
      |                                                                 ^~~~~~~
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cgameresourceserviceserver.h: In member function ‘CGameEntitySystem* CGameResourceService::GetGameEntitySystem()’:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cgameresourceserviceserver.h:35:65: error: ‘uintptr_t’ was not declared in this scope
   35 |                 return *reinterpret_cast<CGameEntitySystem **>((uintptr_t)(this) + offset);
      |                                                                 ^~~~~~~~~
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cgameresourceserviceserver.h:24:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   23 | #include "../../gameconfig.h"
  +++ |+#include <cstdint>
   24 |
In file included from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.h:23:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cschemasystem.h: At global scope:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cschemasystem.h:29:22: error: ‘uintptr_t’ in namespace ‘std’ does not name a type
   29 |                 std::uintptr_t m_p_value;
      |                      ^~~~~~~~~
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cschemasystem.h:22:1: note: ‘std::uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   21 | #include "../../utils/virtual.h"
  +++ |+#include <cstdint>
   22 | #include <platform.h>
In file included from /home/steam/projects/github/CS2Fixes/src/cs2_sdk/interfaces/cs2_interfaces.cpp:27:
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:49:93: warning: ‘fastcall’ attribute ignored [-Wattributes]
   49 |         inline void(FASTCALL *NetworkStateChanged)(int64 chainEntity, int64 offset, int64 a3);
      |                                                                                             ^
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:50:131: warning: ‘fastcall’ attribute ignored [-Wattributes]
   50 |         inline void(FASTCALL *StateChanged)(void *networkTransmitComponent, CEntityInstance *ent, int64 offset, int16 a4, int16 a5);
      |                                                                                                                                   ^
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:51:166: warning: ‘fastcall’ attribute ignored [-Wattributes]
   51 |         inline void(FASTCALL *UTIL_ClientPrintAll)(int msg_dest, const char *msg_name, const char *param1, const char *param2, const char *param3, const char *param4);
      |                                                                                                                                                                      ^
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:52:189: warning: ‘fastcall’ attribute ignored [-Wattributes]
   52 |         inline void(FASTCALL *ClientPrint)(CBasePlayerController *player, int msg_dest, const char *msg_name, const char *param1, const char *param2, const char *param3, const char *param4);
      |                                                                                                                                                                                             ^
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:53:89: warning: ‘fastcall’ attribute ignored [-Wattributes]
   53 |         inline void(FASTCALL *SetGroundEntity)(Z_CBaseEntity *ent, Z_CBaseEntity *ground);
      |                                                                                         ^
/home/steam/projects/github/CS2Fixes/src/cs2_sdk/../addresses.h:54:108: warning: ‘fastcall’ attribute ignored [-Wattributes]
   54 |         inline void(FASTCALL *CCSPlayerController_SwitchTeam)(CCSPlayerController *pController, uint32 team);
      |                                                                                                            ^
Build failed: cs2fixes/linux-x86_64/src_cs2_sdk_interfaces_cs2_interfaces.o

Communication between administrators

I wanted to see the possibility of adding the system to talk between admins with the say_team @ and message.
(this message is only visible to admins).
This is really quite useful

Crash

i found a new issue. i have two cs2 servers on my dedicated running.

both servers are the same. i start the first server with metamod and cs2fixes and all is good

i start the second server while the first server is still running, it instantly crashes after this last console message "
GC Connection established for server version 2000171, instance idx 1"

so if i remove cs2fixes from second server, the server starts fine and does not crash.

i still have an old version of cs2fixes ( from October 18 i guess) and it does not crash my second server, when i start it while the first server is running. something must be wrong after adding last stuff to cs2fixes.

edit: if i remove sv_hibernate_when_empty false from second servers server.cfg, it works fine. there is a conflict between cs2fixes and sv_hibernate i guess.

Error when entering

I compiled the plugin, and when I try to login to the server it doesn't even start. It shows me all the messages that the plugin was successfully started but it won't let players in. Any solution?`[CS2Fixes] Found Source2GameEntities001 in server!

[CS2Fixes] Found SchemaSystem_001 in schemasystem!
[CS2Fixes] Removed hidden flags from 1357 convars
[CS2Fixes] Removed hidden flags from 331 commands
[CS2Fixes] Successfully patched ServerMovementUnlock at 00007FFB5D8022F4
[CS2Fixes] Successfully patched VScriptEnable at 00007FFB8C65163A
[CS2Fixes] Successfully initialized detour for Msg!
[CS2Fixes] Successfully initialized detour for ConDMsg!
[CS2Fixes] Successfully initialized detour for DevMsg!
[CS2Fixes] Successfully initialized detour for Warning!
[CS2Fixes] Successfully initialized detour for DevWarning!
[CS2Fixes] Successfully initialized detour for LoggingSystem_Log!
[CS2Fixes] Successfully initialized detour for LoggingSystem_LogDirect!
[CS2Fixes] Successfully initialized detour for LoggingSystem_LogAssert!
[CS2Fixes] Successfully initialized detour for UTIL_SayTextFilter!
[CS2Fixes] Successfully initialized detour for UTIL_SayText2Filter!
[CS2Fixes] Successfully initialized detour for Host_Say!
[CS2Fixes] Successfully initialized detour for IsHearingClient!
[CS2Fixes] Successfully initialized detour for CSoundEmitterSystem_EmitSound!
[CS2Fixes] Successfully initialized detour for CCSWeaponBase_Spawn!
[CS2Fixes] Successfully initialized detour for TriggerPush_Touch!
Loaded admin MasterWindowS

  • Steam ID 500725694
  • Flags z
    Failed to load addons/cs2fixes/data/infractions.txt
    [CS2Fixes] g_gameEventManager - 00007FFB5E40D4E0
    ResetBreakpadAppId: Universe is 0 (k_EUniverseInvalid)
    ResetBreakpadAppId: Setting dedicated server app id: 2347773

InitSteamLogin_Internal: Initializing breakpad.
Steam Universe is invalid, possibly asking before Steam was successfully initialized.
ResetBreakpadAppId: Universe is 0 (k_EUniverseInvalid)
ResetBreakpadAppId: Setting dedicated server app id: 2347773
Visibility enabled.
USRLOCAL path not found!
Trying to set dxlevel (111) which is higher than the card can support (110)!

Path ID: File Path:
ADDONS "game\csgo_addons"
CONTENT "content\csgo\addons\metamod"
CONTENT "content\csgo"
CONTENT "content\csgo_imported"
CONTENT "content\csgo_core"
CONTENT "content\core"
CONTENTADDONS "content\csgo_addons"
CONTENTROOT "content"
DEFAULT_WRITE_PATH "game\csgo\addons\metamod"
EXECUTABLE_PATH "game\bin\win64"
EXECUTABLE_PATH "game\bin"
GAME "game\csgo\pak01.vpk" (vpk) game\csgo\pak01.vpk
GAME "game\csgo_imported\pak01.vpk" (vpk) game\csgo_imported\pak01.vpk
GAME "game\csgo_core\pak01.vpk" (vpk) game\csgo_core\pak01.vpk
GAME "game\core\pak01.vpk" (vpk) game\core\pak01.vpk
GAME "game\csgo\shaders_pc.vpk" (vpk) game\csgo\shaders_pc.vpk
GAME "game\csgo_core\shaders_pc.vpk" (vpk) game\csgo_core\shaders_pc.vpk
GAME "game\core\shaders_pc.vpk" (vpk) game\core\shaders_pc.vpk
GAME "game\csgo\addons\metamod"
GAME "game\csgo"
GAME "game\csgo_imported"
GAME "game\csgo_core"
GAME "game\core"
GAMEBIN "game\csgo\addons\metamod\bin\win64"
GAMEBIN "game\csgo\addons\metamod\bin"
GAMEBIN "game\csgo\bin\win64"
GAMEBIN "game\csgo\bin"
GAMEBIN "game\csgo_imported\bin\win64"
GAMEBIN "game\csgo_imported\bin"
GAMEBIN "game\csgo_core\bin\win64"
GAMEBIN "game\csgo_core\bin"
GAMEBIN "game\core\bin\win64"
GAMEBIN "game\core\bin"
GAMEROOT "game"
MOD "game\csgo\pak01.vpk" (vpk) game\csgo\pak01.vpk
MOD "game\csgo_imported\pak01.vpk" (vpk) game\csgo_imported\pak01.vpk
MOD "game\csgo_core\pak01.vpk" (vpk) game\csgo_core\pak01.vpk
MOD "game\csgo"
MOD "game\csgo_imported"
MOD "game\csgo_core"
PLATFORM "game\core\pak01.vpk" (vpk) game\core\pak01.vpk
PLATFORM "game\core"
SHADER_SOURCE "src\shaders\csgo\addons\metamod"
SHADER_SOURCE "src\shaders\csgo"
SHADER_SOURCE "src\shaders\csgo_imported"
SHADER_SOURCE "src\shaders\csgo_core"
SHADER_SOURCE "src\shaders\core"
SHADER_SOURCE_MOD "src\shaders\csgo\addons\metamod"
SHADER_SOURCE_ROOT "src\shaders"`

player collisions

is there a way to enable this function in code? players can't jump on other players head.

Edit: i guess i found it.

events.cpp

!goto issue

using the !goto command in chat crashes the server instantly.

plugin not loading after newest update

Updated to latest version of the game server, clean install. Installed latest metamod, which loads just fine. But cs2fixes does not load, instead here is what's listed when I run meta list:

meta list
Listing 1 plugin:
  [01] <FAILED>

Screenshot 2023-11-03 035800

Compiled on Windows, metamod-source and hl2sdk (cs2 branch) on latest versions as of 11/3/23 03:00GMT.

Banned Steamid format?

Hi,

"infractions"
{
"0"
{
"steamid" "0x0110XXXXX1DAF2E9"
"endtime" "1697279454"
"type" "0"
}
}

what type of steam id is this? i dont know which player this is.

cant hear weapons correctly

all weapons from the enemies pov sound like usp... for example enemy is shooting with an m4 and i hear it as if it is a usp

Database support for infractions and admins

Kia ora, I thought I would post this hear instead of pinging the main contributors on Discord so we have a centralized discussion point.

In line with previous SourceMod admin systems, I think it would be a good idea to integrate saving infractions and admin privileges to a database. An obvious pro would be that infraction and admin data would be shared across servers. I've been doing some experimentation with integrating the MySQL 5.7 C API into a MM plugin with some successful results.

I'd love to hear other peoples opinions. I know the project is still heavily WIP and completely subject to change so perhaps adding a system like this may not be the best choice right now.

/map command problem.

If you type for example /map de_InFerno instead of /map de_inferno, the server will crash or remain stuck.

And maybe a quick temporary fix will be something like this.

for (int i = 0; szMapName[i]; i++)
szMapName[i] = tolower(szMapName[i]);

I don't know if it's supposed to be like this or not.

crashing server

if an admin logs out of the server and logs back in, the server crashes

bind key problem

after added u@ bind key not work anymore only if save bind command with !/
how to solve this?

Kick issue

did not happen to me, but happens to some of my admins. he tries to kick an afk player and two times the wrong players have been kicked.

L 10/19/2023 - 21:42:28: "ADMIN<1><[U:1:XXX]>" say "!kick ♥Panda☯Baby ♥"
L 10/19/2023 - 21:42:28: "󠁳⁧⁧ WRONGPLAYER<2><[U:1:XXX]>" disconnected (reason "NETWORK_DISCONNECT_KICKED")

L 10/19/2023 - 21:43:00: "ADMIN<1><[U:1:XXX]>" say "!kick ♥Panda☯Baby ♥"
L 10/19/2023 - 21:43:00: "WRONGPLAYER2<5><[U:1XXX]>" disconnected (reason "NETWORK_DISCONNECT_KICKED")

'metamod_oslink.h' file not found [BUILD ERROR]

I see that plat.h has

#include "metamod_oslink.h"

Yet I can't see the file anywhere, is this issue related to a wrong env var for the metamod path or something else?

I'm importing metamod like this:

export MMSOURCE112=/home/myuser/workspace/CS2Fixes/build/metamod

Where metamod contains /addons/etc

Thanks!

Full error:

In file included from /home/myuser/workspace/CS2Fixes/src/utils/plat_unix.cpp:21:
/home/myuser/workspace/CS2Fixes/src/utils/plat.h:22:10: fatal error: 'metamod_oslink.h' file not found
#include "metamod_oslink.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
Build failed: cs2fixes/linux-x86_64/src_utils_plat_unix.o

Ban / crash

if i ban someone and he attempt to rejoin 2-3 times, the server crashes.

Sigscanning breaks on string containing null bytes

The commonly used makesig script in IDA can create strings with null bytes inside of it. This is a problem because V_strlen will stop at the first null byte it sees, therefore cutting the real signature short.
My solution to this problem involves using this struct to generates the length, but I figure there might be smarter way for this as well:

// Actual credit to Szwagi
struct Signature {
	const char *data = nullptr;
	size_t length = 0;

	template<size_t N>
	Signature(const char(&str)[N]) {
		data = str;
		length = N - 1;
	}
};

Crash last cs2fixes / casual server crash on team select, competitive instantly crash "memory access error", deathmatch works!!! dunno why.

i compiled last cs2fixes with last metamod without any errors and now my server crashes on connect, can't select team or join spectators.

edit: last release only works for me in cs2 deathmatch game mode. when i try casual, server crashes on team select, when i try competitive it crashes and gives error in console "Memory access error."

server is vanilla only with metamod & cs2fixes.

here is a video: https://streamable.com/29vwgb

load problem

meta load /game/csgo/addons/cs2fixes/bin/linuxsteamrt64/cs2fixes.so

metamod version : 1247

[CS2Fixes] Starting plugin.
All hooks started!
[CS2Fixes] Loading addons/cs2fixes/gamedata/cs2fixes.games.txt for game: csgo
[CS2Fixes] Initialized module engine2 base: 0x7fdd88bf2000 | size: 4534272
[CS2Fixes] Initialized module tier0 base: 0x7fdd8a4f6000 | size: 3084288
[CS2Fixes] Initialized module server base: 0x7fdd5e67e000 | size: 14286848
[CS2Fixes] Initialized module schemasystem base: 0x7fdd7699b000 | size: 303104
[CS2Fixes] Initialized module vscript base: 0x7fdd66be1000 | size: 741376
[CS2Fixes] Failed to find address for UTIL_Remove
[CS2Fixes] Found GameResourceServiceServerV001 in engine2!
[CS2Fixes] Found VEngineCvar007 in tier0!
[CS2Fixes] Found Source2GameEntities001 in server!
[CS2Fixes] Found SchemaSystem_001 in schemasystem!
[CS2Fixes] All hooks started!
[CS2Fixes] Removed hidden flags from 0 convars
[CS2Fixes] Removed hidden flags from 8 commands
[CS2Fixes] Failed to find address for ServerMovementUnlock
[CS2Fixes] Failed to find address for VScriptEnable
[CS2Fixes] Failed to find address for CategorizeUnderwater
[CS2Fixes] Failed to find address for WaterLevelGravity
[CS2Fixes] Successfully initialized detour for Msg!
[CS2Fixes] Successfully initialized detour for ConDMsg!
[CS2Fixes] Successfully initialized detour for DevMsg!
[CS2Fixes] Successfully initialized detour for Warning!
[CS2Fixes] Successfully initialized detour for DevWarning!
[CS2Fixes] Successfully initialized detour for LoggingSystem_Log!
[CS2Fixes] Successfully initialized detour for LoggingSystem_LogDirect!
[CS2Fixes] Successfully initialized detour for LoggingSystem_LogAssert!
[CS2Fixes] Failed to find address for UTIL_SayTextFilter
funchook_install error for UTIL_SayTextFilter: 2
[CS2Fixes] Failed to find address for UTIL_SayText2Filter
funchook_install error for UTIL_SayText2Filter: 2
[CS2Fixes] Failed to find address for Host_Say
funchook_install error for Host_Say: 2
[CS2Fixes] Failed to find address for IsHearingClient
funchook_install error for IsHearingClient: 2
[CS2Fixes] Failed to find address for CSoundEmitterSystem_EmitSound
funchook_install error for CSoundEmitterSystem_EmitSound: 2
[CS2Fixes] Failed to find address for CCSWeaponBase_Spawn
funchook_install error for CCSWeaponBase_Spawn: 2
[CS2Fixes] Failed to find address for TriggerPush_Touch
funchook_install error for TriggerPush_Touch: 2

Server crash when using Linux build

Nov 17 19:10:32:  No .vcds loaded or no scenes/scenes.vrman
Nov 17 19:10:32:  GameTypes: missing mapgroupsSP entry for game type/mode (custom/custom).
Nov 17 19:10:32:  GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/cooperative).
Nov 17 19:10:32:  GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/coopmission).
Nov 17 19:10:32:  [CS2Fixes] Starting plugin.
Nov 17 19:10:32:  All hooks started!
Nov 17 19:10:32:  [CS2Fixes] Loading addons/cs2fixes/gamedata/cs2fixes.games.txt for game: csgo
Nov 17 19:10:32:  [CS2Fixes] Initialized module engine2 base: 0x0x7fba911ea000 | size: 4542464
Nov 17 19:10:32:  [CS2Fixes] Initialized module tier0 base: 0x0x7fba92aea000 | size: 3084288
Nov 17 19:10:32:  [CS2Fixes] Initialized module server base: 0x0x7fba49497000 | size: 14356480
Nov 17 19:10:32:  [CS2Fixes] Initialized module schemasystem base: 0x0x7fba8d01a000 | size: 303104
Nov 17 19:10:32:  [CS2Fixes] Initialized module vscript base: 0x0x7fba558fb000 | size: 741376
Nov 17 19:10:32:  [CS2Fixes] Found NetworkStateChanged at 0x0x7fba4a124c50
Nov 17 19:10:32:  [CS2Fixes] Found StateChanged at 0x0x7fba4955eb30
Nov 17 19:10:32:  [CS2Fixes] Found UTIL_ClientPrintAll at 0x0x7fba49e93ff0
Nov 17 19:10:32:  [CS2Fixes] Found ClientPrint at 0x0x7fba49c5ab10
Nov 17 19:10:32:  [CS2Fixes] Found SetGroundEntity at 0x0x7fba49dc15b0
Nov 17 19:10:32:  [CS2Fixes] Found CCSPlayerController_SwitchTeam at 0x0x7fba49b2daf0
Nov 17 19:10:32:  [CS2Fixes] Found UTIL_Remove at 0x0x7fba49bd2180
Nov 17 19:10:32:  [CS2Fixes] Found CEntitySystem_AddEntityIOEvent at 0x0x7fba4a11d360
Nov 17 19:10:32:  [CS2Fixes] Found CEntityInstance_AcceptInput at 0x0x7fba4a105310
Nov 17 19:10:32:  [CS2Fixes] Found CGameEntitySystem_FindEntityByClassName at 0x0x7fba49bd0860
Nov 17 19:10:32:  [CS2Fixes] Found CGameEntitySystem_FindEntityByName at 0x0x7fba49bd08d0
Nov 17 19:10:32:  [CS2Fixes] Patched ServerMovementUnlock at 0x7fba49b11839
Nov 17 19:10:32:  [CS2Fixes] Patched VScriptEnable at 0x7fba55900a5d
Nov 17 19:10:32:  [CS2Fixes] Patched FixWaterFloorJump at 0x7fba49b20a58
Nov 17 19:10:32:  [CS2Fixes] Patched CategorizeUnderwater at 0x7fba49b0d81c
Nov 17 19:10:32:  [CS2Fixes] Patched WaterLevelGravity at 0x7fba49b082be
Nov 17 19:10:32:  [CS2Fixes] Detoured Msg at 0x0x7fba92b29500
Nov 17 19:10:32:  [CS2Fixes] Detoured ConDMsg at 0x0x7fba92b2a1a0
Nov 17 19:10:32:  [CS2Fixes] Detoured DevMsg at 0x0x7fba92b29b30
Nov 17 19:10:32:  [CS2Fixes] Detoured Warning at 0x0x7fba92b29610
Nov 17 19:10:32:  [CS2Fixes] Detoured DevWarning at 0x0x7fba92b29c50
Nov 17 19:10:32:  [CS2Fixes] Detoured LoggingSystem_Log at 0x0x7fba92ba48c0
Nov 17 19:10:32:  [CS2Fixes] Detoured LoggingSystem_LogDirect at 0x0x7fba92ba50a0
Nov 17 19:10:32:  [CS2Fixes] Detoured LoggingSystem_LogAssert at 0x0x7fba92ba5450
Nov 17 19:10:32:  [CS2Fixes] Detoured UTIL_SayTextFilter at 0x0x7fba49e94140
Nov 17 19:10:32:  [CS2Fixes] Detoured UTIL_SayText2Filter at 0x0x7fba49e94360
Nov 17 19:10:32:  [CS2Fixes] Detoured IsHearingClient at 0x0x7fba913d9450
Nov 17 19:10:32:  [CS2Fixes] Detoured CSoundEmitterSystem_EmitSound at 0x0x7fba49e32250
Nov 17 19:10:32:  [CS2Fixes] Detoured CCSWeaponBase_Spawn at 0x0x7fba49aa7110
Nov 17 19:10:32:  [CS2Fixes] Detoured TriggerPush_Touch at 0x0x7fba49e8ce20
Nov 17 19:10:32:  [CS2Fixes] Detoured CGameRules_Constructor at 0x0x7fba49d41840
Nov 17 19:10:32:  [CS2Fixes] Detoured CBaseEntity_TakeDamageOld at 0x0x7fba496c33e0
Nov 17 19:10:32:  [CS2Fixes] All hooks started!
Nov 17 19:10:32:  [CS2Fixes] Removed hidden flags from 1351 convars
Nov 17 19:10:32:  [CS2Fixes] Removed hidden flags from 327 commands
Nov 17 19:10:32:  Failed to load addons/cs2fixes/data/infractions.txt
Nov 17 19:10:32:  Segmentation fault
Nov 17 19:10:32:  --- SERVER EXITED ---

After removing the stock cs2Fixes downloaded from the release, server boots without a prob

Not compiled for windows

Not compiled for windows:

cl: ��������� ��ப� warning D9025: ��८�।������ "/Zi" �� "/Z7"
Build failed: cs2fixes\windows-x86_64\commands.obj

PlayerPawns still present in the game after disconnect and max team size locked to 5

Hello

I'm using this plugin primarily for the trigger push fix for my surf server and I noticed that playerpawns are still left in the game when they disconnect which is a bit weird. I didn't find any variable from the cfg to edit that.

Also I noticed that using your plugin I'm having a weird issue with team size being maximum 5. I used mp_teamautobalance 0 and mp_limitteams 0 yet it still doesn't let me have more than 5 players per team. I don't know if other commands of my configs could have any conflicts with the mod.

After expire gag, mute, some players can't write/speak

After expire gag or mute some players can't speak or write in chat .If try ungag, say not gaged, also can't write in chat, only if player retry to server. If ungag first to expire infraction ungag work good to all players. Tested in 1-2 minutes

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.