Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oqyh/SurfTimer-AutoFixBot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.0
Choose a base ref
...
head repository: oqyh/SurfTimer-AutoFixBot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 15 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 27, 2022

  1. 1.0.0

    oqyh authored Nov 27, 2022
    Copy the full SHA
    c096d9c View commit details
  2. Update README.md

    oqyh authored Nov 27, 2022
    Copy the full SHA
    8be71bb View commit details
  3. Create s

    oqyh authored Nov 27, 2022
    Copy the full SHA
    e102946 View commit details
  4. img

    oqyh authored Nov 27, 2022
    Copy the full SHA
    8aa435e View commit details
  5. img

    oqyh authored Nov 27, 2022
    Copy the full SHA
    6c98e33 View commit details
  6. Delete Screenshot (181).png

    oqyh authored Nov 27, 2022
    Copy the full SHA
    8531fbe View commit details
  7. Create s

    oqyh authored Nov 27, 2022
    Copy the full SHA
    61cb846 View commit details
  8. img

    oqyh authored Nov 27, 2022
    Copy the full SHA
    af2cca7 View commit details
  9. img

    oqyh authored Nov 27, 2022
    Copy the full SHA
    7874aa1 View commit details
  10. Update README.md

    oqyh authored Nov 27, 2022
    Copy the full SHA
    914875e View commit details
  11. Copy the full SHA
    fef7e7b View commit details
  12. Delete cfg/sourcemod directory

    oqyh authored Nov 27, 2022
    Copy the full SHA
    291fdb0 View commit details
  13. 1.0.0

    oqyh authored Nov 27, 2022
    Copy the full SHA
    7a7da7e View commit details
  14. Update README.md

    oqyh authored Nov 27, 2022
    Copy the full SHA
    1216c9f View commit details
  15. 1.0.0

    oqyh authored Nov 27, 2022
    Copy the full SHA
    6964242 View commit details
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# SurfTimer-AutoFixBot
Reload Bots Beginning Of Map
# SurfTimer AutoFixBot (1.0.0)

### Reload Bots Beginning Of Map

![alt text](https://github.com/oqyh/SurfTimer-AutoFixBot/blob/main/img/bots.png?raw=true)


## .:[ ConVars ]:.
```
// Enable Auto Fix Bot Plugin || 1= Yes || 0= No
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_bot_fix_enable "1"
// Enable Print Notification Chat Bot Fixed || 1= Yes || 0= No
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_bot_fix_notify "1"
// (in sec) Timer To Fix Bots Beginning Of The Map
// -
// Default: "50.0"
sm_bot_fix_timer "50.0"
```


## .:[ Change Log ]:.
```
(1.0.0)
- Initial Release
```


## .:[ Donation ]:.

If this project help you reduce time to develop, you can give me a cup of coffee :)

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/oQYh)
Binary file removed addons/sourcemod/plugins/SurfTimer-AutoFixBot.smx
Binary file not shown.
69 changes: 8 additions & 61 deletions addons/sourcemod/scripting/SurfTimer-AutoFixBot.sp
Original file line number Diff line number Diff line change
@@ -6,16 +6,9 @@ Handle timer1;
ConVar h_eplugin;
ConVar h_notify;
ConVar f_timer;
ConVar h_ereplay;
ConVar h_ebonus;
ConVar h_estage;

bool h_beplugin = false;
bool h_bnotify = false;
bool h_bereplay = false;
bool h_bebonus = false;
bool h_bestage = false;

float f_ftimer = 0.0;

public Plugin myinfo =
@@ -32,21 +25,13 @@ public void OnPluginStart()
LoadTranslations( "SurfTimer-AutoFixBot.phrases" );

h_eplugin = CreateConVar("sm_bot_fix_enable", "1", "Enable Auto Fix Bot Plugin || 1= Yes || 0= No", _, true, 0.0, true, 1.0);
h_notify = CreateConVar("sm_bot_fix_notify", "1", "Enable Print Chat Box Fixed || 1= Yes || 0= No", _, true, 0.0, true, 1.0);
h_ereplay = CreateConVar("sm_bot_fix_replay", "1", "Fix Map Record Bot || 1= Yes || 0= No", _, true, 0.0, true, 1.0);
h_ebonus = CreateConVar("sm_bot_fix_bonus", "1", "Fix Bonus Record Bot || 1= Yes || 0= No", _, true, 0.0, true, 1.0);
h_estage = CreateConVar("sm_bot_fix_stage", "1", "Fix Stage Record Bot || 1= Yes || 0= No", _, true, 0.0, true, 1.0);

h_notify = CreateConVar("sm_bot_fix_notify", "1", "Enable Print Notification Chat Bot Fixed || 1= Yes || 0= No", _, true, 0.0, true, 1.0);
f_timer = CreateConVar("sm_bot_fix_timer", "50.0", "(in sec) Timer To Fix Bots Beginning Of The Map");

HookConVarChange(h_eplugin, OnSettingsChanged);
HookConVarChange(h_notify, OnSettingsChanged);
HookConVarChange(f_timer, OnSettingsChanged);

HookConVarChange(h_ereplay, OnSettingsChanged);
HookConVarChange(h_ebonus, OnSettingsChanged);
HookConVarChange(h_estage, OnSettingsChanged);

AutoExecConfig(true, "SurfTimer-AutoFixBot");
}

@@ -55,9 +40,6 @@ public void OnConfigsExecuted()
h_beplugin = GetConVarBool(h_eplugin);
h_bnotify = GetConVarBool(h_notify);
f_ftimer = GetConVarFloat(f_timer);
h_bereplay = GetConVarBool(h_ereplay);
h_bebonus = GetConVarBool(h_ebonus);
h_bestage = GetConVarBool(h_estage);
}

public int OnSettingsChanged(Handle convar, const char[] oldValue, const char[] newValue)
@@ -77,21 +59,6 @@ public int OnSettingsChanged(Handle convar, const char[] oldValue, const char[]
f_ftimer = f_timer.FloatValue;
}

if(convar == h_ereplay)
{
h_bereplay = h_ereplay.BoolValue;
}

if(convar == h_ebonus)
{
h_bebonus = h_ebonus.BoolValue;
}

if(convar == h_estage)
{
h_bestage = h_estage.BoolValue;
}

return 0;
}

@@ -141,19 +108,9 @@ public Action RezSay1(Handle timer)

public Action FixBot_Off(Handle timer)
{
if(h_bereplay)
{
ServerCommand("ck_replay_bot 0");
}
if(h_bebonus)
{
ServerCommand("ck_bonus_bot 0");
}
if(h_bestage)
{
ServerCommand("ck_wrcp_bot 0");
}

ServerCommand("ck_replay_bot 0");
ServerCommand("ck_bonus_bot 0");
ServerCommand("ck_wrcp_bot 0");
if(h_bnotify)
{
CPrintToChatAll(" %t %t", "Prefix", "1");
@@ -163,19 +120,9 @@ public Action FixBot_Off(Handle timer)

public Action FixBot_On(Handle timer)
{
if(h_bereplay)
{
ServerCommand("ck_replay_bot 1");
}
if(h_bebonus)
{
ServerCommand("ck_bonus_bot 1");
}
if(h_bestage)
{
ServerCommand("ck_wrcp_bot 1");
}

ServerCommand("ck_replay_bot 1");
ServerCommand("ck_bonus_bot 1");
ServerCommand("ck_wrcp_bot 1");
if(h_bnotify)
{
CPrintToChatAll(" %t %t", "Prefix", "done");
4 changes: 2 additions & 2 deletions cfg/sourcemod/SurfTimer-AutoFixBot.cfg
Original file line number Diff line number Diff line change
@@ -9,14 +9,14 @@
// Maximum: "1.000000"
sm_bot_fix_enable "1"

// Enable Print Chat Box Fixed || 1= Yes || 0= No
// Enable Print Notification Chat Bot Fixed || 1= Yes || 0= No
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_bot_fix_notify "1"

// Timer To Fix Bots Beginning Of The Map
// (in sec) Timer To Fix Bots Beginning Of The Map
// -
// Default: "50.0"
sm_bot_fix_timer "50.0"
Binary file added img/bots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.