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

[ANY] Most Active (play time rank system) webpanel included [Updated 3-Jan-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
EMINEM_FB
Senior Member
Join Date: Dec 2010
Location: Czech republic
Old 01-31-2019 , 05:29   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #191

I little bit search and in this

Quote:
Format(buffer, sizeof(buffer), "UPDATE mostactive SET last_accountuse = %d, playername = '%s',timeCT = '%i',timeTT = '%i', timeSPE = '%i',total = '%i' WHERE steamid = '%s';",GetTime(), SafeName, g_iPlayTimeCT[client],g_iPlayTimeT[client],g_iPlayTimeSpec[client],g_iPlayTimeCT[client]+g_iPlayTimeT[client]+g_iPlayTimeSpec[client], steamid);
I mean this

Quote:
playername = '%s'
I mean this

Quote:
%s
Cannot be used for "Unicode" symbols (I think)

And then I got idea.. We can convert STEAM ID to STEAM Name.. I found some code

Quote:
// Get User Profile Data
$xml = @simplexml_load_file("http://steamcommunity.com/profiles/$steam64/?xml=1");

if(!empty($xml) && !isset($xml->error)) {
if( isset($xml->steamID) && $xml->steamID == "" )
$username = "Not Setup"; // Example: steamcommunity.com/profiles/76561198077095013/?xml=1
else
$username = $xml->steamID; // Example: steamcommunity.com/profiles/76561198077095031/?xml=1
}
else {
$username = "Not Found"; // Example: steamcommunity.com/profiles/0/?xml=1
}

echo "$username";
But then I test it and got some troubles because in menu first player is "Dulam" and he have on first line his steam id but his name is used for second line. In second line. Same in search

Lets see how this bug looks on main page



Lets see how this bug looks on search


How looks code before update?
https://pastebin.com/b5bpqYe8

How looks code after my bad update?
https://pastebin.com/yfhuimYd


Guys.. Please.. I know I do some mistakes in editing code but Iam not verry good at this and I only give you ideas how to fix this problem. After editing this code loading page is slower (maybe it must convert every steam id to name). But maybe it can do automatically every 10 minutes and paste it to database and page will take it from database (faster loading page). Or there is way how this fix in plugin to send unicode names...


Have a nice day guys..
__________________
EMINEM_FB is offline
Lannister
Veteran Member
Join Date: Apr 2015
Old 02-02-2019 , 18:10   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #192

Is there a command to reset everyone's time played?
Lannister is offline
eliteroyal
AlliedModders Donor
Join Date: Dec 2016
Location: Moldova
Old 02-13-2019 , 16:23   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #193

I think it lags my csgo server when there are more than 10 players on. Could you please rewrite it for csgo? thank you.
eliteroyal is offline
EMINEM_FB
Senior Member
Join Date: Dec 2010
Location: Czech republic
Old 02-18-2019 , 10:55   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #194

How to fix unicode text on most active WEB?

Before:


After:


Solution:
- Added to line 99 this:
Quote:
SQL_SetCharset(g_hDB, "utf8mb4");
- Used "Dev Sourcemod 1.10 - build 6381"

Thank you Papero (Hexah) for your help : )
Attached Files
File Type: sp Get Plugin or Get Source (mostactive.sp - 141 views - 21.0 KB)
__________________
EMINEM_FB is offline
eliteroyal
AlliedModders Donor
Join Date: Dec 2016
Location: Moldova
Old 02-23-2019 , 06:03   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #195

Quote:
Originally Posted by EMINEM_FB View Post
How to fix unicode text on most active WEB?

Before:


After:


Solution:
- Added to line 99 this:
- Used "Dev Sourcemod 1.10 - build 6381"

Thank you Papero (Hexah) for your help : )
can you confirm this plugin will not increase server var when there are more than 15 players connected?
or can someone else confirm?
__________________
PEACE FROM MOLDOVA
eliteroyal is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 02-23-2019 , 12:00   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #196

You should replace this part: https://github.com/Franc1sco/MostAct...ive.sp#L77-L82
with something like this:
Code:
char sDate[24];
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
BuildPath(Path_SM, g_sCmdLogPath, sizeof(g_sCmdLogPath), "logs/mostactive_%s.log", sDate);
Could be bad for servers with crashes issues (example after an csgo update with broken stuff). This will create on every server start an log file.
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
EMINEM_FB
Senior Member
Join Date: Dec 2010
Location: Czech republic
Old 02-27-2019 , 15:50   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #197

Quote:
Originally Posted by Bara View Post
You should replace this part: https://github.com/Franc1sco/MostAct...ive.sp#L77-L82
with something like this:
Code:
char sDate[24];
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
BuildPath(Path_SM, g_sCmdLogPath, sizeof(g_sCmdLogPath), "logs/mostactive_%s.log", sDate);
Could be bad for servers with crashes issues (example after an csgo update with broken stuff). This will create on every server start an log file.




Spoiler


Compiled with: SourceMod (1.10.0.6381)
__________________
EMINEM_FB is offline
Pala4
Senior Member
Join Date: Dec 2007
Old 07-18-2019 , 00:24   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #198

Quote:
Originally Posted by EMINEM_FB View Post
How to fix unicode text on most active WEB?

Before:


After:


Solution:
- Added to line 99 this:
- Used "Dev Sourcemod 1.10 - build 6381"

Thank you Papero (Hexah) for your help : )

This does not fix the Unicode issue.
Attached Thumbnails
Click image for larger version

Name:	img-2019-07-18-07-08-06.png
Views:	131
Size:	55.8 KB
ID:	176368  
Pala4 is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 07-18-2019 , 06:09   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #199

Quote:
Originally Posted by Pala4 View Post
This does not fix the Unicode issue.
After you made this change you deleted / reset the finger bank completely?

If not, I believe that only the new data will be corrected, the old ones remain bugged.
paulo_crash is offline
Pala4
Senior Member
Join Date: Dec 2007
Old 07-18-2019 , 14:59   Re: [ANY] Most Active (play time rank system) with webpanel included
Reply With Quote #200

Quote:
Originally Posted by paulo_crash View Post
After you made this change you deleted / reset the finger bank completely?

If not, I believe that only the new data will be corrected, the old ones remain bugged.
I solved the problem by simply changing utf8mb4 to utf8.

https://cloud.mail.ru/public/AuaG/DJatAadUp

https://cloud.mail.ru/public/Czj6/659G1TA4f

Last edited by Pala4; 07-18-2019 at 15:02.
Pala4 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 04:54.


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