Raised This Month: $32 Target: $400
 8% 

[CS:GO] Round Win Share for Retakes (v1.2 2018/10/9)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Kevsolo
Junior Member
Join Date: Jun 2018
Plugin ID:
6294
Plugin Version:
1.2
Plugin Category:
Statistical
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A round win share for Retakes
    Old 10-08-2018 , 08:17   [CS:GO] Round Win Share for Retakes (v1.2 2018/10/9)
    Reply With Quote #1

    [Retake RWS]
    Hello guys, I'm SoLo. Currently running A CS:GO Community Server in Hong Kong called HKHBC.

    I made my very first plugin called Round Win Share for Retake.

    It's a Rating System based on the Damage done by the player. Compared to other rating systems, RWS is more suitable for retake's limitations.

    This RWS system is not fully the same as other RWS system,s it has a few differences:
    1. When the player disconnects, the plugin will calculate their RWS by how many rounds they have played.
    2. The RWS system doesn't count the PLANTING BOMB or DEFUSING BOMB as a validate RWS action.
    3. The RWS system only counts the damage that done by the player.

    Requirements:
    A MySQL Database

    How to use:
    1.Download the plugin
    2.Configure your /addons/sourcemod/configs/database.cfg and create a Database Entry for the plugin:
    Code:
            "RRWS"
            {
            "driver"            "mysql"
            "host"                "<host of your database>"
            "database"            "<name of the database"
            "user"                "<username of the database>"
            "pass"                "<password of the database>"
            }
    3.Create a new table in your MySQL database with the following SQL [optional]
    :
    In version 1.1, the plugin will automaticlly create tables for you, you may create a table by yourself for security purposes.
    PHP Code:
    CREATE TABLE IF NOT EXISTS `rws` (
      `
    idint(11NOT NULL AUTO_INCREMENT,
      `
    steamchar(255CHARACTER SET latin1 NOT NULL,
      `
    rwsfloat UNSIGNED NOT NULL DEFAULT '0',
      `
    rwscountint(10UNSIGNED NOT NULL DEFAULT '0',
      
    PRIMARY KEY (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci


    Commands:
    PHP Code:
    sm_rws [player//- Check player's Overall RWS and Session RWS. No Permission is required. 
    Cvars:
    PHP Code:
    sm_rws_minrounds "5" // Minimum rounds required for a valid RWS for better RWS Calculation 
    How to compile:
    This plugin uses a color library called <kento_csgocolors> by Kento
    His profile: rogeraabbccdd

    You need to have <kento_csgocolors> in order to compile this plugin. if you do not have the library, just change the PPrintToChat, PPrintToChatAll, CPrintToChat and CPrintToChatAll to PrintToChat and PrintToChatAll.



    Notice:
    Since this is my very first plugin, the plugin is poorly-written, which may contain bugs. Leave all the plugin problems in the GitHub Repository
    GitHub:
    https://github.com/dickylau20/Retakes-RWS
    Find me on steam if you have any problems with the plugin (remember to comment before you add me)
    https://steamcommunity.com/id/SoLoHK/


    Quote:
    Update 1.1:
    Syntax Update:
    -Fixed mix syntaxes

    Function Update:
    -Automatically create the RWS table

    Update 1.2:
    Syntax Update:
    -Again... replaced with newdecls
    -Added Cvars support to the plugin
    -SQL Query Optimization
    -Removed SQL Query printing out to the console
    -Removed the message for debug purposes

    Function Update:
    -Added a new cvar for minimum round that player needs to play before their RWS become valid. (More accurate RWS)
    Download:
    Newest Version From GitHub:
    https://github.com/dickylau20/Retake...ive/master.zip
    Version 1.2:
    Retakes-RWS.zip

    Last edited by Kevsolo; 10-09-2018 at 08:28.
    Kevsolo is offline
    mug1wara
    AlliedModders Donor
    Join Date: Jun 2018
    Old 10-08-2018 , 10:28   Re: [CS:GO] Round Win Share for Retakes (v1.0 2018/10/8)
    Reply With Quote #2

    Hi, I haven’t read the code that well yet, but from what I’ve seen; you mix syntaxes. Try not to, even though it’s ur first plugin. Other than that, I think the idea is good!
    mug1wara is offline
    Kevsolo
    Junior Member
    Join Date: Jun 2018
    Old 10-08-2018 , 10:41   Re: [CS:GO] Round Win Share for Retakes (v1.0 2018/10/8)
    Reply With Quote #3

    Quote:
    Originally Posted by mug1wara View Post
    Hi, I haven’t read the code that well yet, but from what I’ve seen; you mix syntaxes. Try not to, even though it’s ur first plugin. Other than that, I think the idea is good!
    Thanks! but I don't know which are the mixed syntaxes, could you point it out for me?
    Kevsolo is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 10-08-2018 , 11:24   Re: [CS:GO] Round Win Share for Retakes (v1.0 2018/10/8)
    Reply With Quote #4

    PHP Code:
    char message[1024]; //Message buffer
    char dberror[255]; //database error buffer
    new PlayerDamage[256] = 0;  //Player Damage in 1 Round
    new Int:PlayerRounds[256] = Int:1//Rounds that player joined
    new Float:rws[256] = 0.0//The damage done by player in a session
    new Float:sessionrws[255] = 0.0//Session RWS
    new String:SQLError[1024]; //SQL error buffer 
    ^--- mixed syntax
    __________________
    8guawong is offline
    Kevsolo
    Junior Member
    Join Date: Jun 2018
    Old 10-08-2018 , 11:29   Re: [CS:GO] Round Win Share for Retakes (v1.0 2018/10/8)
    Reply With Quote #5

    Quote:
    Originally Posted by 8guawong View Post
    PHP Code:
    char message[1024]; //Message buffer
    char dberror[255]; //database error buffer
    new PlayerDamage[256] = 0;  //Player Damage in 1 Round
    new Int:PlayerRounds[256] = Int:1//Rounds that player joined
    new Float:rws[256] = 0.0//The damage done by player in a session
    new Float:sessionrws[255] = 0.0//Session RWS
    new String:SQLError[1024]; //SQL error buffer 
    ^--- mixed syntax
    Thanks !^^!
    Kevsolo is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 10-09-2018 , 03:12   Re: [CS:GO] Round Win Share for Retakes (v1.1 2018/10/8)
    Reply With Quote #6

    You are still mixing syntax
    Read https://wiki.alliedmods.net/SourcePa...ing_new_syntax
    __________________
    8guawong is offline
    Kevsolo
    Junior Member
    Join Date: Jun 2018
    Old 10-09-2018 , 07:23   Re: [CS:GO] Round Win Share for Retakes (v1.1 2018/10/8)
    Reply With Quote #7

    Quote:
    Originally Posted by 8guawong View Post
    I was searching for the new syntax, really appreciate that you helped me a lot in improving my works.

    Kevsolo is offline
    mug1wara
    AlliedModders Donor
    Join Date: Jun 2018
    Old 10-09-2018 , 14:24   Re: [CS:GO] Round Win Share for Retakes (v1.2 2018/10/9)
    Reply With Quote #8

    Saw the updated syntax version; great job!

    This is what I like to see!
    mug1wara is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:55.


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