Raised This Month: $51 Target: $400
 12% 

Player Feedback [SQL]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MSWS
New Member
Join Date: Aug 2020
Plugin ID:
7287
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow players to give feedback on other players, comments are stored on an SQL server,
    Old 09-10-2020 , 07:40   Player Feedback [SQL]
    Reply With Quote #1

    Hello, this is my first plugin however I do believe that it has a fair amount of usefulness for server administrators who want to get player feedback on other members of their server. I've created a plugin that allows players to do !like and !dislike on other players with a message.

    Features:
    • (Obviously) No SQL Injection
    • MySQL and SQLite Support
    • Complete configurability over cooldowns
    • Useful messages that say how long their cooldown is
    • Cooldowns use the database to prevent players from bypassing it

    Installation:
    Move the Feedback.xms file into your \csgo\addons\sourcemod\plugins folder.
    Create a new feedback database under your csgo\addons\sourcemod\configs\databases.cfg, it can be either MySQL or SQLite (other database types untested).

    ConVars / Configuration:
    sm_cooldown_like - Seconds of delay between being able to use sm_like
    sm_cooldown_dislike - Seconds of delay between being able to use sm_dislike
    sm_cooldown_shared - If 1, both sm_like and sm_dislike will be under the same cooldown
    sm_cooldown_global - If 1, cooldown is for giving feedback to any player instead of the same player
    sm_cooldown_simple - If not 0, the cooldown does not sync with database, is global, and shared (overrides shared and global convars)

    Commands:
    sm_like [Player] [Message] - Gives positive feedback towards a player
    sm_dislike [Player] [Message] - Gives negative feedback towards a player
    [ADMIN_ROOT] sm_deletefeedback [Steam64] - Deletes all feedback from a player
    [ADMIN_ROOT] sm_clearfeedback [Steam64] - Deletes all feedback towards a player

    GitHub: https://gist.github.com/MSWS/2ed64b4...49595638f10123
    Attached Files
    File Type: sp Get Plugin or Get Source (Feedback.sp - 331 views - 14.7 KB)

    Last edited by MSWS; 09-10-2020 at 08:02.
    MSWS is offline
    Trum
    AlliedModders Donor
    Join Date: Jan 2017
    Old 09-10-2020 , 11:17   Re: Player Feedback [SQL]
    Reply With Quote #2

    Very cool, good job! Definetly gonna use this on my user panel project.
    Trum is offline
    Judge_Duck
    Junior Member
    Join Date: Jul 2020
    Old 09-10-2020 , 17:35   Re: Player Feedback [SQL]
    Reply With Quote #3

    L 09/10/2020 - 142:47: [SM] Blaming: Feedback.smx
    L 09/10/2020 - 142:47: [SM] Call stack trace:
    L 09/10/2020 - 142:47: [SM] [0] IsClientConnected
    L 09/10/2020 - 142:47: [SM] [1] Line 339, /home/forums/content/files/3/0/3/3/0/4/183634.attach::assignAliases
    L 09/10/2020 - 142:47: [SM] [2] Line 46, /home/forums/content/files/3/0/3/3/0/4/183634.attach::OnPluginStart
    L 09/10/2020 - 142:47: [SM] Unable to load plugin "Feedback.smx": Error detected in plugin startup (see error logs)



    We've got our maxplayers set to 34 is probably the cause I'm guessing.
    Judge_Duck is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 09-10-2020 , 20:42   Re: Player Feedback [SQL]
    Reply With Quote #4

    Quote:
    Originally Posted by Judge_Duck View Post
    L 09/10/2020 - 142:47: [SM] Blaming: Feedback.smx
    L 09/10/2020 - 142:47: [SM] Call stack trace:
    L 09/10/2020 - 142:47: [SM] [0] IsClientConnected
    L 09/10/2020 - 142:47: [SM] [1] Line 339, /home/forums/content/files/3/0/3/3/0/4/183634.attach::assignAliases
    L 09/10/2020 - 142:47: [SM] [2] Line 46, /home/forums/content/files/3/0/3/3/0/4/183634.attach::OnPluginStart
    L 09/10/2020 - 142:47: [SM] Unable to load plugin "Feedback.smx": Error detected in plugin startup (see error logs)



    We've got our maxplayers set to 34 is probably the cause I'm guessing.
    You left out the most crucial and helpful part of that error log, which is the "Exception reported" line.
    __________________
    Psyk0tik is offline
    Judge_Duck
    Junior Member
    Join Date: Jul 2020
    Old 09-11-2020 , 09:37   Re: Player Feedback [SQL]
    Reply With Quote #5

    L 09/11/2020 - 064:44: [SM] Exception reported: Client index 34 is invalid
    L 09/11/2020 - 064:44: [SM] Blaming: Feedback.smx
    L 09/11/2020 - 064:44: [SM] Call stack trace:
    L 09/11/2020 - 064:44: [SM] [0] IsClientConnected
    L 09/11/2020 - 064:44: [SM] [1] Line 339, /home/forums/content/files/3/0/3/3/0/4/183634.attach::assignAliases
    L 09/11/2020 - 064:44: [SM] [2] Line 46, /home/forums/content/files/3/0/3/3/0/4/183634.attach::OnPluginStart
    L 09/11/2020 - 064:44: [SM] Unable to load plugin "Feedback.smx": Error detected in plugin startup (see error logs)


    That's my fault, was getting rushed out the door when I posted yesterday and didn't catch that. But the index 34 was what made me think it might be a maxplayers issue. Am going to look it at this morning and report back.
    Judge_Duck is offline
    Judge_Duck
    Junior Member
    Join Date: Jul 2020
    Old 09-11-2020 , 09:49   Re: Player Feedback [SQL]
    Reply With Quote #6

    L 09/11/2020 - 06:451: [SM] Exception reported: Client index 31 is invalid
    L 09/11/2020 - 06:451: [SM] Blaming: Feedback.smx
    L 09/11/2020 - 06:451: [SM] Call stack trace:
    L 09/11/2020 - 06:451: [SM] [0] IsClientConnected
    L 09/11/2020 - 06:451: [SM] [1] Line 339, /home/forums/content/files/3/0/3/3/0/4/183634.attach::assignAliases
    L 09/11/2020 - 06:451: [SM] [2] Line 46, /home/forums/content/files/3/0/3/3/0/4/183634.attach::OnPluginStart
    L 09/11/2020 - 06:451: [SM] Unable to load plugin "Feedback.smx": Error detected in plugin startup (see error logs)


    Just tried to run with our maxplayers set to 30, and got a similar error. So my theory on maxplayers=34 breaking the plugin is incorrect.
    Judge_Duck is offline
    SSheriFF
    AlliedModders Donor
    Join Date: May 2020
    Location: Israel
    Old 09-11-2020 , 12:16   Re: Player Feedback [SQL]
    Reply With Quote #7

    Change
    PHP Code:
    for (int i 1MAXPLAYERSi++) 
    To
    PHP Code:
    for (int i 1<= MaxClientsi++) 
    __________________
    Taking small private requests (Free) and big private requests (Paid).
    Contact me via Discord: WilDick#1524

    My Plugins:

    Last edited by SSheriFF; 09-11-2020 at 12:17.
    SSheriFF is offline
    Judge_Duck
    Junior Member
    Join Date: Jul 2020
    Old 09-11-2020 , 12:34   Re: Player Feedback [SQL]
    Reply With Quote #8

    That fixed it for me, thank you!
    Judge_Duck 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 07:57.


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