fix: AI does make mistakes

revert: build action to main
This commit is contained in:
Sachin 2025-09-29 17:42:57 +05:30
parent b5a2f3b386
commit baa638bad6
3 changed files with 8 additions and 9 deletions

View file

@ -2,11 +2,11 @@ name: Build
on:
push:
branches: [ "dev" ]
branches: [ "main" ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ "dev" ]
branches: [ "main" ]
paths-ignore:
- '**/README.md'
@ -96,7 +96,6 @@ jobs:
name: "CS2-SimpleAdmin - Build ${{ env.BUILD_NUMBER }}"
tag: "fork-build-${{ env.BUILD_NUMBER }}-${{ github.run_id }}"
body: |
# Note: This is a dev build. Use with caution
Place files in addons/counterstrikesharp
After first launch, configure the plugins in the respective configs:
- CS2-SimpleAdmin: addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json

View file

@ -42,9 +42,9 @@ public static class CustomCommandsMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < customCommands.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < customCommands.Count)
{
var cmd = customCommands[selected.Option];
var cmd = customCommands[menu.Option];
Helper.TryLogCommandOnDiscord(admin, cmd.Command);
if (cmd.ExecuteOnClient)

View file

@ -41,9 +41,9 @@ public static class ReasonMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < reasons.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < reasons.Count)
{
onSelectAction(admin, player, reasons[selected.Option]);
onSelectAction(admin, player, reasons[menu.Option]);
}
},
true,
@ -82,9 +82,9 @@ public static class ReasonMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < reasons.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < reasons.Count)
{
onSelectAction(admin, player, reasons[selected.Option]);
onSelectAction(admin, player, reasons[menu.Option]);
}
},
true,