GithubHelp home page GithubHelp logo

k4ryuu / cs2_playtimetracker Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 0.0 1.92 MB

The Playtime Tracker plugin is a tool for tracking and displaying player statistics in your Counter-Strike 2 (CS2) server. This plugin allows the players to check their playtime, team-specific playtime, and death or alive playtime.

License: GNU General Public License v3.0

C# 100.00%
counter-strike-2 cs2 cssharp extension metamod plugin

cs2_playtimetracker's People

Contributors

k4ryuu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cs2_playtimetracker's Issues

[BUG] after use !time console throws exceptions

Describe the bug
After u type a command (!time or !mytime) you will get exceptions in console.

To Reproduce
OS: Ubuntu 22.04
CSSharp Version used: https://github.com/roflmuffin/CounterStrikeSharp/actions/runs/6772103962
Install plugin, restart server, edit database config JSON and restart server.

Typing !time / !mytime will throw this exceptions:

Console:

L 11/06/2023 - 22:50:05: MatchStatus: Team "TERRORIST" is unset.
23:50:08
L 11/06/2023 - 22:50:05: MatchStatus: Score: 0:0 on map "jb_improSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
at K4ryuuPlaytimePlugin.PlaytimePlugin.SaveClientTime(CCSPlayerController player) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 156
at K4ryuuPlaytimePlugin.PlaytimePlugin.OnCommandCheckPlaytime(CCSPlayerController player, CommandInfo command) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 42
at CounterStrikeSharp.API.Core.BasePlugin.<>c__DisplayClass31_0.<AddCommand>b__0(Int32 i, IntPtr ptr) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 166
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 ---
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 70
23:50:10
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
at K4ryuuPlaytimePlugin.PlaytimePlugin.SaveClientTime(CCSPlayerController player) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 156
at K4ryuuPlaytimePlugin.PlaytimePlugin.OnCommandCheckPlaytime(CCSPlayerController player, CommandInfo command) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 42
at CounterStrikeSharp.API.Core.BasePlugin.<>c__DisplayClass31_0.<AddCommand>b__0(Int32 i, IntPtr ptr) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 166
at InvokeStub_Action`2.Invoke(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 70
23:50:14
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 93
at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 70

Error with new version

The plugin stopped working after the update.

at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
SteamNetworkingSockets lock held for 5.7ms.  (Performance warning.)  ServiceThread
This is usually a symptom of a general performance problem such as thread starvation.
"MinnDe<0><[U:1:756741]><TERRORIST>" OnPreResetRound => CTMDBG, team 2  will switch 0 117.39
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 95
at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

[REQ] Metamod

woudnt it be better to use metamod for thi splugin and some other of ur plugins since most of us are using cs2fixes and counterstrikesharp doesnt work together with cs2fixes

[BUG] After using the command, it throws errors

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '238' was not present in the dictionary.
   at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientConnect(EventPlayerConnectFull event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 71
   at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '238' was not present in the dictionary.
   at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientTeam(EventPlayerTeam event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 117
   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 ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '238' was not present in the dictionary.
   at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 91
   at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '238' was not present in the dictionary.
   at K4ryuuPlaytimePlugin.PlaytimePlugin.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in /Users/sples/Documents/GitHub/CS2_PlaytimeTracker/src/K4ryuuPlaytimeTracker.cs:line 91
   at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81

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.