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

[L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]


Post New Thread Reply   
 
Thread Tools Display Modes
kochifish
Junior Member
Join Date: Feb 2016
Old 10-23-2022 , 21:58   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #51

Quote:
Originally Posted by kochifish View Post
hello, ive tried change the database to mysql, but its error, here is my database.cfg:

Tried both version of MySql

- MYSQL 5.7.33
- MYSQL 8.0.30

database.cfg
PHP Code:
    "l4d2_srs"
    
{
        
"driver"            "default"
        "host"                "localhost"
        "database"            "l4d2_srs"
        "user"                "root"
        "pass"                ""
    

Plugins Error:
PHP Code:
L 10/23/2022 08:32:01: [l4d2_srs.smx] [CREATE]: Failed to Create SRS table"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('now','localtime')),LastUpdatedDate DATE DEFAULT (datetime('now','localtime')),' at line 1"
L 10/23/2022 08:32:11: [l4d2_srs.smx] [LOAD]: Failed to load TOP10"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Rank , * FROM SRS LIMIT 0,10' at line 1" 
Could you help me? Thank you!
Ok this one is fixed, i change the database ddriver to another, then i update the SQL query in plugin source, because sqlite and mysql have some difference, but now i only have one problem with this one query:


PHP Code:
case DBA_LOAD:
            {
                
Format(querysizeof(query), "SELECT * FROM (SELECT RANK() OVER (ORDER BY t.Score DESC, t.CreatedDate DESC) AS `globalRank` FROM (SELECT * from l4d2_srs.srs GROUP BY steamId) AS t) AS `rt` WHERE rt.globalRank = '%s'"steamId);
                
g_db.Query(OnSelectRowqueryclient);
            } 
Could you please help me to convert that query syntax to mysql 8 syntax? i tried but no success, im not an expert with sql. Thank you!
kochifish is offline
pan0s
Senior Member
Join Date: Nov 2017
Old 10-27-2022 , 13:14   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #52

Quote:
Originally Posted by kochifish View Post
Ok this one is fixed, i change the database ddriver to another, then i update the SQL query in plugin source, because sqlite and mysql have some difference, but now i only have one problem with this one query:


PHP Code:
case DBA_LOAD:
            {
                
Format(querysizeof(query), "SELECT * FROM (SELECT RANK() OVER (ORDER BY t.Score DESC, t.CreatedDate DESC) AS `globalRank` FROM (SELECT * from l4d2_srs.srs GROUP BY steamId) AS t) AS `rt` WHERE rt.globalRank = '%s'"steamId);
                
g_db.Query(OnSelectRowqueryclient);
            } 
Could you please help me to convert that query syntax to mysql 8 syntax? i tried but no success, im not an expert with sql. Thank you!
I don't set up a mysql server to test,
but it should be just like that
Code:
SELECT * 
FROM (
	SELECT RANK() OVER(ORDER BY t.score DESC, t.CreatedDate DESC) AS globalRank, * 
	FROM (SELECT * FROM l4d2_srs.srs GROUP BY steamId) l4d2_srs.srs AS t) AS rt 
	WHERE rt.steamId = '%s')
You may need to remove 'AS' keyword which I have highlighted.
__________________

Last edited by pan0s; 10-27-2022 at 13:14.
pan0s is offline
kochifish
Junior Member
Join Date: Feb 2016
Old 11-06-2022 , 02:40   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #53

Quote:
Originally Posted by pan0s View Post
I don't set up a mysql server to test,
but it should be just like that
Code:
SELECT * 
FROM (
	SELECT RANK() OVER(ORDER BY t.score DESC, t.CreatedDate DESC) AS globalRank, * 
	FROM (SELECT * FROM l4d2_srs.srs GROUP BY steamId) l4d2_srs.srs AS t) AS rt 
	WHERE rt.steamId = '%s')
You may need to remove 'AS' keyword which I have highlighted.
Thank you mate, i managed to make it works, need to learn sql
kochifish is offline
marki89
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 11-06-2022 , 10:18   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #54

Does it work for local servers?
marki89 is offline
Hawkins
Senior Member
Join Date: Jul 2021
Old 11-06-2022 , 21:27   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #55

Quote:
Originally Posted by marki89 View Post
Does it work for local servers?
It does.
Hawkins is offline
James William Bottomtooth
Junior Member
Join Date: Sep 2022
Old 11-14-2022 , 09:34   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #56

Reporting a bug:
When people join the server for the very very first time, the panel is automatically opened and people are unable to close it.
Pressing 0 does nothing and the only way to close the panel is to open a different menu (like !csm) and then closing that one.
This issue exists only when people join the server for the first time (unregistered players). After their first map transition (and being registered in database) they are able to close the panel, but they have to press the 0 button twice for some odd reason.
(using version 2.5)
James William Bottomtooth is offline
Tivil
New Member
Join Date: Nov 2022
Old 11-22-2022 , 06:56   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #57

Hi,
newbie here, love this plugin thank you so much for it. Is there any way to change the text size for the combo info displayed in the middle of the screen? It is hard to see at times, will be nice if it was a little bit bigger.
Thank you!
Tivil is offline
Fraggor
Junior Member
Join Date: Jun 2020
Old 11-27-2022 , 17:31   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #58

@Tivil, do you mean the text in the screenshot (figure 2) ?
If that's the case, it seems that the plugin is utilizing the "PrintCenterText()" native, so what ever font is used to print the text is handled by the client, the plugin author can't do anything about it

However, You can:

A. Modify your "ClientScheme.res"
here's a video tutorial it's for tf2, but the same concept can be applied to l4d

B. Download already modified UI elements, you can find them Steamworkshop or gamemaps

I manually changed almost all fonts to "Tahoma" and "Tahoma Bold" (it's already installed in windows 10)
Fraggor is offline
Tivil
New Member
Join Date: Nov 2022
Old 11-28-2022 , 14:43   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #59

@Fraggor
I meant this

I tried a mod from the workshop and every font got bigger, except the one I am interested in. Regarding the first option, I did not find the files he is talking about in the l4d2 folders, so I didnt get too far.
Thanks for the suggestions anyways, I appreciate them
Tivil is offline
Fraggor
Junior Member
Join Date: Jun 2020
Old 11-29-2022 , 00:50   Re: [L4D2] Statistic and Ranking System (SRS) [v2.5 | 17 March 2022]
Reply With Quote #60

offtopic
Fraggor is offline
Reply


Thread Tools
Display Modes

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 22:32.


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