Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamedata update for CS2 v1.40.0.5 #7

Closed
walia6 opened this issue Apr 27, 2024 · 6 comments
Closed

Gamedata update for CS2 v1.40.0.5 #7

walia6 opened this issue Apr 27, 2024 · 6 comments

Comments

@walia6
Copy link

walia6 commented Apr 27, 2024

In latest CS2 update, GiveNamedItem Linux signature has changed. While CS# doesn't update it, you can do it by updating counterstrikesharp/gamedata/gamedata.json:

  "GiveNamedItem": {
    "signatures": {
      "library": "server",
      "windows": "\\x48\\x89\\x5C\\x24\\x2A\\x48\\x89\\x74\\x24\\x2A\\x55\\x57\\x41\\x2A\\x41\\x2A\\x41\\x2A\\x48\\x2A\\x2A\\x2A\\x2A\\x48\\x2A\\x2A\\x2A\\x2A\\x2A\\x2A\\x4D\\x2A\\x2A\\x48",
      "linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x49\\x89\\xD6\\x41\\x55\\x49\\x89\\xFD\\x41\\x54\\x48"
    }
  },

I am running the following:

Ubuntu 22.04.4
mmsource-2.0.0-git1289-linux
counterstrikesharp-with-runtime-build-215-linux-7cae4be
InventorySimulator-v1.0.0-beta.22

The server boots, throwing a "Failed to load plugin error"

When running css_plugins list, it shows InventorySimulator as LOADING.
I have a separate plugin, CS2Rcon, which shows as LOADED.

The gloves I set are working, while weapon skins and knife skins are not.

Here is the excerpt from the log I believe is relevant:

02:22:55 [INFO] (cssharp:PluginContext) Loading plugin InventorySimulator
02:22:55 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/ubuntu/cs2/game/csgo/addons/counterstrikesharp/plugins/InventorySimulator/InventorySimulator.dll
CounterStrikeSharp.API.Core.NativeException: Invalid function pointer
   at CounterStrikeSharp.API.Core.ScriptContext.CheckErrors() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/ScriptContext.cs:line 176
   at CounterStrikeSharp.API.Core.NativeAPI.HookFunction(IntPtr function, InputArgument hook, Boolean post) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/API.cs:line 1033
   at CounterStrikeSharp.API.Modules.Memory.DynamicFunctions.BaseMemoryFunction.Hook(Func`2 handler, HookMode mode) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Memory/DynamicFunctions/BaseMemoryFunction.cs:line 62
   at InventorySimulator.InventorySimulator.Load(Boolean hotReload) in C:\Users\ianlu\Projects\cs2-inventory-simulator-plugin\source\InventorySimulator\InventorySimulator.cs:line 50
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 218
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93```
@ianlucas
Copy link
Owner

I'd recommend you to reinstall everything. The error points to line 50 which is the hook for giving a named item to a player - so it appears to be an issue with CS#. I've personally tested in latest Windows and Linux, so I'm pretty sure it's some misconfiguration on your end.

Make sure gamedata is correct and FollowCS2ServerGuidelines is false.

@ianlucas ianlucas closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
@ianlucas
Copy link
Owner

Btw looks like CS# had a new update specifically for this issue. You may try that as well.

@ianlucas ianlucas reopened this Apr 27, 2024
@ianlucas
Copy link
Owner

Okay looks like it's broken. I wasn't aware Valve released another update. I'll look into it.

@ianlucas ianlucas changed the title "Failed to load plugin" error in newest CS2 (4/26). Gloves are loading, other things are not. Gamedata update for CS2 v1.40.0.5 Apr 27, 2024
@ianlucas
Copy link
Owner

ianlucas commented Apr 27, 2024

Currently CounterStrikeSharp's GiveNamedItem is outdated. Until it is updated, update your server gamedata.

@walia6
Copy link
Author

walia6 commented Apr 27, 2024

Worked for me 👍

Thanks

@ianlucas
Copy link
Owner

@ianlucas ianlucas closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants