stefanx111 / cs2-SimpleResetScore

22 stars 4 forks source link

[REQ] Change flags required for command? #5

Closed crashzk closed 10 months ago

crashzk commented 10 months ago

To access the commands you need to have @resetscore/admin, this for the !setscore command and for !rs if it is configured as true for OnlyAdmins.

Wouldn't it be better for the !setscore command to use the css/generic flag and in case of setting "OnlyAdmins": true to use the css/vip flag in the check.

This way we can limit access to the commands even further, leaving !setscore and !rs to admin only if you have the vip flag.

crashzk commented 10 months ago

I tried to make this change myself but when compiling I received the error:

PS D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore> dotnet build
Versão do MSBuild 17.7.4+3ebbd7c49 para .NET
  Determinando os projetos a serem restaurados...
D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csproj : error NU1101: N
ão é possível encontrar o pacote D:\ZK Servidores™\Servidores CS2\Editar\ddons\counterstrikesharp\api\CounterStrikeShar
p.API.dll. Não existe nenhum pacote com esta ID nas origens: nuget.org
  Falha ao restaurar D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csp
  roj (em 1,07 sec).

FALHA da compilação.

D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csproj : error NU1101: N
ão é possível encontrar o pacote D:\ZK Servidores™\Servidores CS2\Editar\ddons\counterstrikesharp\api\CounterStrikeShar
p.API.dll. Não existe nenhum pacote com esta ID nas origens: nuget.org
    0 Aviso(s)
    1 Erro(s)

Tempo Decorrido 00:00:01.83

Apparently the nuget packages, any help is welcome if possible.

stefanx111 commented 10 months ago

I tried to make this change myself but when compiling I received the error:

PS D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore> dotnet build
Versão do MSBuild 17.7.4+3ebbd7c49 para .NET
  Determinando os projetos a serem restaurados...
D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csproj : error NU1101: N
ão é possível encontrar o pacote D:\ZK Servidores™\Servidores CS2\Editar\ddons\counterstrikesharp\api\CounterStrikeShar
p.API.dll. Não existe nenhum pacote com esta ID nas origens: nuget.org
  Falha ao restaurar D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csp
  roj (em 1,07 sec).

FALHA da compilação.

D:\ZK Servidores™\Servidores CS2\Editar\addons\counterstrikesharp\source\ResetScore\ResetScore.csproj : error NU1101: N
ão é possível encontrar o pacote D:\ZK Servidores™\Servidores CS2\Editar\ddons\counterstrikesharp\api\CounterStrikeShar
p.API.dll. Não existe nenhum pacote com esta ID nas origens: nuget.org
    0 Aviso(s)
    1 Erro(s)

Tempo Decorrido 00:00:01.83

Apparently the nuget packages, any help is welcome if possible.

post your code here and if I'm ok with the code I'll update the plugin

crashzk commented 10 months ago

https://github.com/stefanx111/cs2-SimpleResetScore/pull/6

@stefanx111 would that be the case, would it work?

In order to use the !setscore command, you need the @css/generic flag.

And the !rs command when activated only for admins needs the @css/vip flag

stefanx111 commented 10 months ago

1.0.4