AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] amuJS (better KZTimer Jumpstats) [UPDATED 01/29/2020] (https://forums.alliedmods.net/showthread.php?t=318507)

hiiamu 09-03-2019 21:40

[CS:GO] amuJS (better KZTimer Jumpstats) [UPDATED 01/29/2020]
 
2 Attachment(s)
Original ver: https://forums.alliedmods.net/showthread.php?t=252392
Powerind's ver: https://forums.alliedmods.net/showthread.php?p=2656979

GitHub page: https://github.com/amuDev/amuJS

Some info
  • Added ownages
  • Added blues
  • Added anti-cheat functions
  • Built in Distbug
  • Jump bug detection
  • Menu for all settings
  • Cookies!! for all settings
  • Added CVars for all settings
    > All stat values
    > Enable/Disable CT Jumpstats and Distbug


Commands
  • sm_showkeys
  • sm_speed
  • sm_sync
  • sm_stats
  • sm_bstats
  • sm_sound
  • sm_ljblock
  • sm_colorchat
  • sm_jumptop
  • sm_top
  • sm_rtop
  • sm_buggedjumptop
  • sm_btop
  • sm_js
  • sm_jssettings

Add to database.cfg
Code:

    "amuJS"
    {
        "driver"              "sqlite"
        "host"                "localhost"
        "database"            "kzjumpstats-sqlite"
        "user"                "root"
        "pass"                ""
    }
    "amuJSb"
    {
        "driver"              "sqlite"
        "host"                "localhost"
        "database"            "bkzjumpstats-sqlite"
        "user"                "root"
        "pass"                ""
    }

Update Logs
PHP Code:

4.1.1[01/29/2020]
Added distbug cvar

Spoiler

OfficialSikari 09-04-2019 12:06

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Yo, truly an epic plugin you've made!

Couple things I want to note:
- Every single menu you've created leaks their menu handle.
- You've copied almost the entire Distbug plugin without crediting the original author at all.
- You've created a database connection for bugged and nonbugged stats, something that could be considered expensive.
- While you've converted the plugin to new syntax, I could argue that its way less readable at its current state.

And top this off, you've created an advertisement to your discord at a 80 second timer, without a convar to even toggle it off.
Overall, like I said, pretty epic!

xantis 09-04-2019 12:48

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Nice work mate! I'll use it on my server.
(Add quake sound files and translations file to the zip.)

hiiamu 09-04-2019 18:53

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Quote:

Originally Posted by OfficialSikari (Post 2665857)
Yo, truly an epic plugin you've made!

Couple things I want to note:
- Every single menu you've created leaks their menu handle.
- You've copied almost the entire Distbug plugin without crediting the original author at all.
- You've created a database connection for bugged and nonbugged stats, something that could be considered expensive.
- While you've converted the plugin to new syntax, I could argue that its way less readable at its current state.

And top this off, you've created an advertisement to your discord at a 80 second timer, without a convar to even toggle it off.
Overall, like I said, pretty epic!

Next version(4.0.1) will include the following -
  • Credit to GameChaos
  • CVar to change or disable/enable both adverts, meant to remove those before release...
Could you give me some info on what you mean by leaking the menu handle and how it can be affecting things in negative ways, I would like to improve those. Also could you give some pointers to make my plugin more readable?

OfficialSikari 09-05-2019 04:08

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Quote:

Originally Posted by hiiamu (Post 2665918)
Next version(4.0.1) will include the following -
  • Credit to GameChaos
  • CVar to change or disable/enable both adverts, meant to remove those before release...
Could you give me some info on what you mean by leaking the menu handle and how it can be affecting things in negative ways, I would like to improve those. Also could you give some pointers to make my plugin more readable?

Looking better, regarding the leaked menu handles:

PHP Code:

public KeyColorSettingsHandler(Handle menuMenuAction:actionclientselect) {
    if(
action == MenuAction_Select) {
        if(
select == 0)
            
g_iKeyColors[client] = 0;
        if(
select == 1)
            
g_iKeyColors[client] = 8;
        if(
select == 2)
            
g_iKeyColors[client] = 16;
        if(
select == 3)
            
g_iKeyColors[client] = 24;
        if(
select == 4)
            
g_iKeyColors[client] = 32;
        if(
select == 5)
            
g_iKeyColors[client] = 40;
        if(
select == 6)
            
g_iKeyColors[client] = 48;
        if(
select == 7)
            
g_iKeyColors[client] = 56;
        if(
select == 8)
            
g_iKeyColors[client] = 64;
        if(
select == 9)
            
g_iKeyColors[client] = 72;
        if(
select == 10)
            
g_iKeyColors[client] = 80;
        if(
select == 11)
            
g_iKeyColors[client] = 88;
        
KeyColorSettings(client);
        
char sCookie[128];
        
IntToString(g_iKeyColors[client], sCookiesizeof(sCookie));
        
SetClientCookie(clientg_hKeyColorCookiesCookie);
    }
    if(
action == MenuAction_Cancel)
        
SpeedPanelSettings(client);


You're supposed to have a condition for MenuAction_End, and delete the menu handle there, the SourceMod Menu API reference mentions this as well.
Heres an example on how to do that: https://wiki.alliedmods.net/Menu_API...od)#Basic_Menu

P.S. Your if statement madness can be solved by
PHP Code:

g_iKeyColors[client] = (select 8); 

Regarding on how to make the code more readable, this is a highly opinionated thing, but I prefer Allman as an indentation style.
On the other hand, you have mixed new and old syntax. The lack of newlines and consistency makes it hard to read.

zwolofmeister 09-05-2019 06:08

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Great job mate! Didn't expect you to release this piece of art! But instead of creating an extra table for distbug i'd add it all to a single database so installation and management would be easier.

p.s
Add it to a github repo and link it in the post

hiiamu 09-05-2019 09:54

Re: [CS:GO] amuJS (better KZTimer Jumpstats)
 
Quote:

Originally Posted by OfficialSikari (Post 2665947)
Looking better, regarding the leaked menu handles:

You're supposed to have a condition for MenuAction_End, and delete the menu handle there, the SourceMod Menu API reference mentions this as well.
Heres an example on how to do that: https://wiki.alliedmods.net/Menu_API...od)#Basic_Menu

I put these cases in to stop leaky menu handles will update download soon.
Quote:

Originally Posted by OfficialSikari (Post 2665947)
P.S. Your if statement madness can be solved by
PHP Code:

g_iKeyColors[client] = (select 8); 


JoinedSenses recommended and a few other optimizations, these will be included in the next update.
Quote:

Originally Posted by OfficialSikari (Post 2665947)
On the other hand, you have mixed new and old syntax. The lack of newlines and consistency makes it hard to read.

I tried to keep it all new syntax but haven't checked through for old syntax for a while. Will also try to update these in the next update.

Quote:

Originally Posted by zwolofmeister (Post 2665957)
Great job mate! Didn't expect you to release this piece of art! But instead of creating an extra table for distbug i'd add it all to a single database so installation and management would be easier.

p.s
Add it to a github repo and link it in the post

Thanks, planing on making everything 1 database but that may take a few updates, going to start work on creating a repo for this.

haooy 11-28-2019 11:47

Re: [CS:GO] amuJS (better KZTimer Jumpstats) [UPDATED 10/20/2019]
 
Hello, plugin is spamming these errors:
[SM] Exception reported: Client x is not connected
[SM] Blaming: hns/amuJS.smx
[SM] Call stack trace:
[SM] [0] ClientCommand
[SM] [1] Line 2185, D:\dd\amuJS.sp::NumberThreePost
[SM] [2] Line 2158, D:\dd\amuJS.sp::Top3Check
[SM] [3] Line 2107, D:\dd\amuJS.sp::Top3CheckDelay
please fix this, btw great plugin

AuricYoutube 11-29-2019 01:33

Re: [CS:GO] amuJS (better KZTimer Jumpstats) [UPDATED 10/20/2019]
 
A couple of issues, ^^ the error spam above, also a panel improvement also, why isn't there a back button and only an exit button, and also if stats don't exist in a category and you pick that category it closes the menu instead of telling you that stats don't exist there yet.

haooy 11-29-2019 08:16

Re: [CS:GO] amuJS (better KZTimer Jumpstats) [UPDATED 10/20/2019]
 
please add crouch jump in stats


All times are GMT -4. The time now is 01:57.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.