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

BUG #5

Open
chycken opened this issue Dec 5, 2023 · 12 comments
Open

BUG #5

chycken opened this issue Dec 5, 2023 · 12 comments

Comments

@chycken
Copy link

chycken commented Dec 5, 2023

Hello, using cssharp 107, and got this error:

22:40:26 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary2.FindValue(TKey key) at System.Collections.Generic.Dictionary2.TryGetValue(TKey key, TValue& value)
at CounterStrikeSharp.API.Modules.Admin.AdminManager.PlayerHasPermissions(CCSPlayerController player, String[] flags) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Admin/AdminPermissions.cs:line 105
at Weapon_Restrict.WeaponRestrict.IsAdmin(CCSPlayerController player) in E:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\game\csgo\addons\counterstrikesharp\plugins\Weapon_Restrict\Weapon_Restrict.cs:line 438
at Weapon_Restrict.WeaponRestrict.OnEventItemPickupPost(EventItemPickup event, GameEventInfo info) in E:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\game\csgo\addons\counterstrikesharp\plugins\Weapon_Restrict\Weapon_Restrict.cs:line 89
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 /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 82

Plugin working well, maybe you should update it for newest cssharp?

@Quake1011
Copy link
Owner

Hello, using cssharp 107, and got this error:

22:40:26 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'key') at System.Collections.Generic.Dictionary2.FindValue(TKey key) at System.Collections.Generic.Dictionary2.TryGetValue(TKey key, TValue& value) at CounterStrikeSharp.API.Modules.Admin.AdminManager.PlayerHasPermissions(CCSPlayerController player, String[] flags) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Admin/AdminPermissions.cs:line 105 at Weapon_Restrict.WeaponRestrict.IsAdmin(CCSPlayerController player) in E:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\game\csgo\addons\counterstrikesharp\plugins\Weapon_Restrict\Weapon_Restrict.cs:line 438 at Weapon_Restrict.WeaponRestrict.OnEventItemPickupPost(EventItemPickup event, GameEventInfo info) in E:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\game\csgo\addons\counterstrikesharp\plugins\Weapon_Restrict\Weapon_Restrict.cs:line 89 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 /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 82

Plugin working well, maybe you should update it for newest cssharp?

try latest and let me know about existing issue

@chycken
Copy link
Author

chycken commented Dec 6, 2023

its not working. Plugin is running, cant see any error, but i can buy for example awp in 2v2.. this is my restrict config:
[
{
"Weapon": "weapon_awp",
"PlayersInTeamQuota": {
"CT": [
{
"3": 1,
"6": 2,
"8": 3
}
],
"T": [
{
"3": 1,
"6": 2,
"8": 3
}
]
},
"PlayersAllQuota": {
"3": 1,
"6": 2,
"8": 3
}
},
{
"Weapon": "weapon_scar20",
"PlayersInTeamQuota": {
"CT": [
{
"4": 0,
"8": 0,
"16": 0
}
],
"T": [
{
"4": 0,
"8": 0,
"16": 0
}
]
},
"PlayersAllQuota": {
"4": 0,
"8": 0,
"16": 0
}
},
{
"Weapon": "weapon_m249",
"PlayersInTeamQuota": {
"CT": [
{
"5": 1,
"8": 2,
"10": 2
}
],
"T": [
{
"5": 1,
"8": 2,
"10": 2
}
]
},
"PlayersAllQuota": {
"4": 0,
"6": 0,
"8": 0
}
},
{
"Weapon": "weapon_negev",
"PlayersInTeamQuota": {
"CT": [
{
"5": 1,
"8": 2,
"10": 2
}
],
"T": [
{
"5": 1,
"8": 2,
"10": 2
}
]
},
"PlayersAllQuota": {
"5": 1,
"8": 2,
"10": 2
}
}
]

@chycken
Copy link
Author

chycken commented Dec 6, 2023

and a tip: can u do the plugin a way that config files will be generated in addons/cssharp/configs/plugins folder?

@Quake1011
Copy link
Owner

Quake1011 commented Dec 6, 2023

and a tip: can u do the plugin a way that config files will be generated in addons/cssharp/configs/plugins folder?

It was implemented in new version of plugin(now I waiting for CSS update for release this version)

its not working. Plugin is running, cant see any error, but i can buy for example awp in 2v2.. this is my restrict config: [ { "Weapon": "weapon_awp", "PlayersInTeamQuota": { "CT": [ { "3": 1, "6": 2, "8": 3 } ], "T": [ { "3": 1, "6": 2, "8": 3 } ] }, "PlayersAllQuota": { "3": 1, "6": 2, "8": 3 } }, { "Weapon": "weapon_scar20", "PlayersInTeamQuota": { "CT": [ { "4": 0, "8": 0, "16": 0 } ], "T": [ { "4": 0, "8": 0, "16": 0 } ] }, "PlayersAllQuota": { "4": 0, "8": 0, "16": 0 } }, { "Weapon": "weapon_m249", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ], "T": [ { "5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "4": 0, "6": 0, "8": 0 } }, { "Weapon": "weapon_negev", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ], "T": [ { "5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "5": 1, "8": 2, "10": 2 } } ]

What a config settings u've?

@ezekutor
Copy link

ezekutor commented Dec 6, 2023

это не работает. Плагин запущен, ошибок не видно, но я могу купить, например, awp в режиме 2v2.. это моя конфигурация ограничения: [ { "Weapon": "weapon_awp", "PlayersInTeamQuota": { "CT": [ { "3" : 1, "6": 2, "8": 3 } ], "T": [ { "3": 1, "6": 2, "8": 3 } ] }, "PlayersAllQuota": { " 3": 1, "6": 2, "8": 3 } }, { "Weapon": "weapon_scar20", "PlayersInTeamQuota": { "CT": [ { "4": 0, "8": 0 , "16": 0 } ], "T": [ { "4": 0, "8": 0, "16": 0 } ] }, "PlayersAllQuota": { "4": 0, "8" : 0, "16": 0 } }, { "Weapon": "weapon_m249", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ] , "T": [ { "5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "4": 0, "6": 0, "8": 0 } }, { "Weapon": "weapon_negev", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ], "T": [ { " 5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "5": 1, "8": 2, "10": 2 } } ]

"AdminImmunityFlag": ""

@Quake1011
Copy link
Owner

это не работает. Плагин запущен, ошибок не видно, но я могу купить, например, awp в режиме 2v2.. это моя конфигурация ограничения: [ { "Weapon": "weapon_awp", "PlayersInTeamQuota": { "CT": [ { "3" : 1, "6": 2, "8": 3 } ], "T": [ { "3": 1, "6": 2, "8": 3 } ] }, "PlayersAllQuota": { " 3": 1, "6": 2, "8": 3 } }, { "Weapon": "weapon_scar20", "PlayersInTeamQuota": { "CT": [ { "4": 0, "8": 0 , "16": 0 } ], "T": [ { "4": 0, "8": 0, "16": 0 } ] }, "PlayersAllQuota": { "4": 0, "8" : 0, "16": 0 } }, { "Weapon": "weapon_m249", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ] , "T": [ { "5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "4": 0, "6": 0, "8": 0 } }, { "Weapon": "weapon_negev", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ], "T": [ { " 5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "5": 1, "8": 2, "10": 2 } } ]

"AdminImmunityFlag": ""

Опишите всю проблему, мне не ясно, что вы хотите

@chycken
Copy link
Author

chycken commented Dec 6, 2023

English please

@chycken
Copy link
Author

chycken commented Dec 6, 2023

my config settings:

{
"Tag": "{GOLD}[bombateamServer] ",
"DestinationTypeRestrictMessage": 1,
"DestinationTypeRefundMessage": 1,
"RestrictMessageText": "",
"RestrictMessageStatus": true,
"RefundMessage": "
*",
"RefundMessageStatus": true,
"RestrictMethod": 1,
"AdminImmunityFlag": "" //because i dont want to allow admins to buy restricted weapons

@ezekutor
Copy link

ezekutor commented Dec 6, 2023

это не работает. Плагин запущен, ошибок не видно, но я могу купить, например, awp в режиме 2v2.. это моя конфигурация ограничения: [ { "Weapon": "weapon_awp", "PlayersInTeamQuota": { "CT": [ { "3" : 1, "6": 2, "8": 3 } ], "T": [ { "3": 1, "6": 2, "8": 3 } ] }, "PlayersAllQuota": { " 3": 1, "6": 2, "8": 3 } }, { "Weapon": "weapon_scar20", "PlayersInTeamQuota": { "CT": [ { "4": 0, "8": 0 , "16": 0 } ], "T": [ { "4": 0, "8": 0, "16": 0 } ] }, "PlayersAllQuota": { "4": 0, "8" : 0, "16": 0 } }, { "Weapon": "weapon_m249", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ] , "T": [ { "5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "4": 0, "6": 0, "8": 0 } }, { "Weapon": "weapon_negev", "PlayersInTeamQuota": { "CT": [ { "5": 1, "8": 2, "10": 2 } ], "T": [ { " 5": 1, "8": 2, "10": 2 } ] }, "PlayersAllQuota": { "5": 1, "8": 2, "10": 2 } } ]

"AdminImmunityFlag": ""

Опишите всю проблему, мне не ясно, что вы хотите

У меня нет проблем я просто посоветовал флаг убрать, если не убран :)

@chycken
Copy link
Author

chycken commented Dec 6, 2023

I did it, but its not restricting anything, with old version it worked

@chycken
Copy link
Author

chycken commented Dec 7, 2023

waiting for new update

@Quake1011
Copy link
Owner

Quake1011 commented Dec 7, 2023

waiting for new update

quake1011 - add me to discord and i send version for test

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

3 participants