Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Custom Player Stats v1.4B121


Post New Thread Reply   
 
Thread Tools Display Modes
el_psycho
Member
Join Date: Feb 2012
Location: Vancouver, Canada
Old 02-17-2012 , 01:01   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1431

I have interesting news about the special characters problem.
I saw that another player had the same ™ character in his name, yet his name showed up fine in the list. so i downloaded both blobs (.bin files) and opened them with notepad++
under encoding i noticed the one that doesnt show was encoded in "ANSI". the one that does show up is encoded in "UTF-8 without BOM". so i converted the ANSI blob to UTF-8 and then put it back in the database and voila! both names appear just fine on the page, ™ and everything.

Something didnt seem right about being able to open a supposedly binary file with a text editor, seeing the names right there and not needing a hex editor. This isnt binary at all. Now, I guess the changes i made to mysql must have worked or changing the collation to UTF-8. Initially i didnt specify UTF-8 when i created the database, i guess all new entries are being encoded in UTF-8 where as the old entries keep thier ANSI encoding.

Anyways. I hope this can lead you in the right direction regarding this issue.
I'm waiting anxiously for an update with LAN country and city cvar or something ;)
Or maybe you can tell me how to add a LAN IP range to the country database? i tried but i failed.

EDIT:
Feature sugestion... Look at this plugin. It "displays the TF2 achievement unlocked trophy above players heads when they earn an achievement."
It would be awesome if you could incorporate something like it with the stats achievements, also when you make it to the top ten, become first, etc. Pleeeeaaaaassssseeeee........

Last edited by el_psycho; 02-17-2012 at 01:32.
el_psycho is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 02-17-2012 , 02:40   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1432

Quote:
Originally Posted by el_psycho View Post
I have interesting news about the special characters problem.
I saw that another player had the same ™ character in his name, yet his name showed up fine in the list. so i downloaded both blobs (.bin files) and opened them with notepad++
under encoding i noticed the one that doesnt show was encoded in "ANSI". the one that does show up is encoded in "UTF-8 without BOM". so i converted the ANSI blob to UTF-8 and then put it back in the database and voila! both names appear just fine on the page, ™ and everything.

Something didnt seem right about being able to open a supposedly binary file with a text editor, seeing the names right there and not needing a hex editor. This isnt binary at all. Now, I guess the changes i made to mysql must have worked or changing the collation to UTF-8. Initially i didnt specify UTF-8 when i created the database, i guess all new entries are being encoded in UTF-8 where as the old entries keep thier ANSI encoding.

Anyways. I hope this can lead you in the right direction regarding this issue.
I'm waiting anxiously for an update with LAN country and city cvar or something ;)
Or maybe you can tell me how to add a LAN IP range to the country database? i tried but i failed.

EDIT:
Feature sugestion... Look at this plugin. It "displays the TF2 achievement unlocked trophy above players heads when they earn an achievement."
It would be awesome if you could incorporate something like it with the stats achievements, also when you make it to the top ten, become first, etc. Pleeeeaaaaassssseeeee........
My guess is, that your Notepad++ automatically detects and sets the mode to ANSI. This is how for example UltraEdit sometimes work. Try opening the files in a dedicated hex editor etc. A blob is a binary field, which can contain images and what not, and therefore does not have a encoding in it. Maybe PHP does something similar? Maybe I'm supposed to read the field as binary then convert it to UTF-8 string?

The IPs are stored as long integers to the DB, as far as I can remember it? You would either need to revert it back to an IP and compare the result to your LAN IP filter, or calculate the scope of long integer IPs that represent your any of your LAN IPs and then check if the player IP is a match to the scope.

Create an array of arrays that contains your IP filter and the flag image url for example. Then iterate through the array of arrays and check the player IP for a match. If a match is found use the url specified in array in opposed for searching for the location of that IP and deciding what flag should be shown.

I'll try to grasp some time from somewhere and do something about the issues.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
el_psycho
Member
Join Date: Feb 2012
Location: Vancouver, Canada
Old 02-18-2012 , 23:44   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1433

Hey, thanks for letting me know what to do but i have no idea where to start :s I'm a mysql super noob. If its not too much trouble for you, how would i go about doing this in phpmyadmin? if its too much dont worry about it. I'll just wait until you have time. I rather not bother you and let you work on the plugin.

Thanks for your hard work muukis.
el_psycho is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 02-20-2012 , 04:47   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1434

Quote:
Originally Posted by el_psycho View Post
Hey, thanks for letting me know what to do but i have no idea where to start :s I'm a mysql super noob. If its not too much trouble for you, how would i go about doing this in phpmyadmin? if its too much dont worry about it. I'll just wait until you have time. I rather not bother you and let you work on the plugin.

Thanks for your hard work muukis.
No need for DB modifications. You will only need to modify the PHP scripts to have a "LAN country flag".
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
Chronic1
SourceMod Donor
Join Date: Jun 2011
Old 02-20-2012 , 14:57   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1435

Can you enable rankvote for my server? My server is mutation19 but the rankvote command does not work. Mutation19 is TAAANNNNK mutation and its 8vs8
__________________
Chronic1 is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 02-21-2012 , 04:01   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1436

Quote:
Originally Posted by Chronic1 View Post
Can you enable rankvote for my server? My server is mutation19 but the rankvote command does not work. Mutation19 is TAAANNNNK mutation and its 8vs8
I can, but can you in exchange list me all dual-team mutations (and their gamemode names), so I can enable the rankvote on all of the mutations at once. Thanks!
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
el_psycho
Member
Join Date: Feb 2012
Location: Vancouver, Canada
Old 02-21-2012 , 19:27   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1437

Quote:
Originally Posted by muukis View Post
No need for DB modifications. You will only need to modify the PHP scripts to have a "LAN country flag".
Thanks muukis! It wasnt as hard as i thought it was gonna be.

About the mutations, i found this list at another forum, I dont know if its complete though:
Code:
mutation1 = Last Man on Earth - One player vs Special Infected
mutation2 = Headshot! - Common Infected only killed by headshots
mutation3 = Bleed Out - Slowly lose health continuously
mutation4 = Hard Eight - 8 Special infected instead of 4
mutation5 = Four Swordsmen - Only Katanas
mutation6 = Unused at the moment.
mutation7 = Chainsaw Massacre - Only chainsaws
mutation8 = Iron man - No ammo. No respawns.
mutation9 = Last Gnome On Earth - Each team must carry a gnome
mutation10 = Room For One - Only one survivor allowed in escape vehicle
mutation11 = Healthpackalypse - No health throughout the levels
mutation12 = Realism Versus
mutation13 = Follow the Litre
mutation14 = Gibfest - M60 Unlimited ammo
mutation15 = Versus Survival
mutation16 = Hunting Party
mutation17 = Lone Gunman
mutation18 = Bleed Out Versus
mutation19 = Taaannnk!!
mutation20 = Healing Gnome
community1 = Special Delivery
community2 = Flu Season
community3 = Riding My Survivor
community4 = Nightmare
community5 = Death's Door
community6 = Confogl

Last edited by el_psycho; 02-21-2012 at 19:30.
el_psycho is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 02-22-2012 , 06:20   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1438

Quote:
Originally Posted by el_psycho View Post
Thanks muukis! It wasnt as hard as i thought it was gonna be.

About the mutations, i found this list at another forum, I dont know if its complete though:
Code:
mutation1 = Last Man on Earth - One player vs Special Infected
mutation2 = Headshot! - Common Infected only killed by headshots
mutation3 = Bleed Out - Slowly lose health continuously
mutation4 = Hard Eight - 8 Special infected instead of 4
mutation5 = Four Swordsmen - Only Katanas
mutation6 = Unused at the moment.
mutation7 = Chainsaw Massacre - Only chainsaws
mutation8 = Iron man - No ammo. No respawns.
mutation9 = Last Gnome On Earth - Each team must carry a gnome
mutation10 = Room For One - Only one survivor allowed in escape vehicle
mutation11 = Healthpackalypse - No health throughout the levels
mutation12 = Realism Versus
mutation13 = Follow the Litre
mutation14 = Gibfest - M60 Unlimited ammo
mutation15 = Versus Survival
mutation16 = Hunting Party
mutation17 = Lone Gunman
mutation18 = Bleed Out Versus
mutation19 = Taaannnk!!
mutation20 = Healing Gnome
community1 = Special Delivery
community2 = Flu Season
community3 = Riding My Survivor
community4 = Nightmare
community5 = Death's Door
community6 = Confogl
Could you or someone specify which modes have two human played teams?
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
el_psycho
Member
Join Date: Feb 2012
Location: Vancouver, Canada
Old 02-22-2012 , 13:33   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1439

Quote:
Originally Posted by muukis View Post
Could you or someone specify which modes have two human played teams?
I think everything you need is here:
http://left4dead.wikia.com/wiki/Mutations
el_psycho is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 02-22-2012 , 15:13   Re: [L4D & L4D2] Custom Player Stats v1.4B117
Reply With Quote #1440

Here's a test version for rank vote. It compiles, but that's all the testing I've done with it. Please try it out and tell me if it's working for you.

Added these checks for the rank vote:
PHP Code:
IsGamemode("mutation11") ||    // Healthpackalypse!
IsGamemode("mutation12") ||    // Realism Versus
IsGamemode("mutation13") ||    // Follow the Liter
IsGamemode("mutation15") ||    // Versus Survival
IsGamemode("mutation18") ||    // Bleed Out Versus
IsGamemode("mutation19") ||    // Taaannnkk!
IsGamemode("community3") ||    // Riding My Survivor
IsGamemode("community6");        // Confogl 
Attached Files
File Type: sp Get Plugin or Get Source (l4d_stats.sp - 243 views - 345.9 KB)
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis 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 00:35.


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