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

[Counter strike Source]Players duplicates again after update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KingPovilas
Junior Member
Join Date: Aug 2015
Old 09-17-2015 , 13:59   [Counter strike Source]Players duplicates again after update
Reply With Quote #1

Hi , after css update players started to duplicate again,can anyone provide some info how to fix it?

Thanks

Last edited by KingPovilas; 09-20-2015 at 06:59.
KingPovilas is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 09-18-2015 , 07:52   Re: Players duplicates again after update
Reply With Quote #2

Can confirm this. Player one has STEAM_0:0:28257275 and duplicate player has STEAM_0:[U:1:56514550]
__________________
micazoid is offline
musosoft
Senior Member
Join Date: Dec 2008
Location: Thailand
Old 09-18-2015 , 11:41   Re: Players duplicates again after update
Reply With Quote #3

Try this:

1. SQL query

PHP Code:
CREATE TABLE IF NOT EXISTS hlstats_PlayerUniqueIds_copy LIKE hlstats_PlayerUniqueIds;
INSERT hlstats_PlayerUniqueIds_copy SELECT FROM hlstats_PlayerUniqueIds WHERE NOT EXISTS (SELECT FROM hlstats_PlayerUniqueIds_copy);
DELETE FROM hlstats_PlayerUniqueIds WHERE (game 'css' OR 'dods' OR 'hl2mp') AND INSTR(uniqueId'U') > 0;
UPDATE IGNORE hlstats_PlayerUniqueIds SET uniqueId=CONCAT('[U:1:'SUBSTR(uniqueId11)+SUBSTR(uniqueId3)*2']'WHERE (game 'css' OR 'dods' OR 'hl2mp'); 


2. hlstats.pl edit

Under getPlayerInfo replace lines containing $uniqueid with:

PHP Code:
$uniqueid =~ /^\[U:1:(\d+)\]/;
$uniqueid = $1
^^ borrowed from https://forums.alliedmods.net/showth...32#post2188432


Reported not working, hope someone can post proper solution. Currently only way I know is reinstalling HlstatsX
__________________
Making FiveM servers nowadays. Can help with CS:GO, CS:S, and other Source server stuff too, just PM me. Thanks

Last edited by musosoft; 09-19-2015 at 16:54.
musosoft is offline
KingPovilas
Junior Member
Join Date: Aug 2015
Old 09-18-2015 , 13:14   Re: Players duplicates again after update
Reply With Quote #4

Ill try this tomorrow,but maybe someone has actual info,if our steam id in counter strike source gonna stay as they are now,starting with U or they will be swapped back as it was before?
KingPovilas is offline
stoneyschillhouse
Senior Member
Join Date: Nov 2012
Old 09-18-2015 , 15:15   Re: Players duplicates again after update
Reply With Quote #5

Quote:
Originally Posted by musosoft View Post
Try

PHP Code:
CREATE TABLE hlstats_PlayerUniqueIds_copy LIKE hlstats_PlayerUniqueIds
INSERT hlstats_PlayerUniqueIds_copy SELECT 
FROM hlstats_PlayerUniqueIds
DELETE FROM hlstats_PlayerUniqueIds WHERE game 
'css' AND INSTR(uniqueId'U') > 0
UPDATE hlstats_PlayerUniqueIds SET uniqueId
=CONCAT('[U:1:'SUBSTR(uniqueId11)+SUBSTR(uniqueId3)*2']'WHERE game 'css' 

Thanks
This code have a syntax error

if I take each line individually I always get at least one error message.

it shows effect, but only for players that are already deposited with the v3 ID in the database.

I hope there is
__________________
SRY FOR MY BAD ENGLISH
I'm german
stoneyschillhouse is offline
musosoft
Senior Member
Join Date: Dec 2008
Location: Thailand
Old 09-18-2015 , 16:56   Re: Players duplicates again after update
Reply With Quote #6

edited post above thank you! kindly share errors if any
__________________
Making FiveM servers nowadays. Can help with CS:GO, CS:S, and other Source server stuff too, just PM me. Thanks

Last edited by musosoft; 09-18-2015 at 17:15.
musosoft is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 09-18-2015 , 18:24   Re: Players duplicates again after update
Reply With Quote #7

Will your solution make use of old data or is every player considered as new player musoft?

Another Question:

WHERE game = 'css';

will this just be good for css game? I have dods? Do I have to change that?

Got an error here:

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 'INSERT hlstats_PlayerUniqueIds_copy SELECT * FROM hlstats_PlayerUniqueIds
DELET' at line 2
__________________

Last edited by micazoid; 09-18-2015 at 18:39.
micazoid is offline
musosoft
Senior Member
Join Date: Dec 2008
Location: Thailand
Old 09-18-2015 , 19:12   Re: Players duplicates again after update
Reply With Quote #8

This solution will convert old SteamID32 to new Steam3ID,

there might be some problems with superlogs which will still log old SteamID32 format, I recommend to disable this plugin until it's updated to Steam3ID

I updated statement to track dods and hl2mp also

Regarding that error... Start from third line, as it seems that you have already backup (_copy) created...
__________________
Making FiveM servers nowadays. Can help with CS:GO, CS:S, and other Source server stuff too, just PM me. Thanks
musosoft is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 09-18-2015 , 19:38   Re: Players duplicates again after update
Reply With Quote #9

I fixed mysql syntax by myself.

I tried to get this working but no success. Even worse output was given. The players were no tracked at all =(

I will do further testing but I am not sure what you mean exactly by:

$uniqueid =~ /^\[U:1\d+)\]/;
$uniqueid = $1;

Can you please consider to post whole code?
__________________
micazoid is offline
stoneyschillhouse
Senior Member
Join Date: Nov 2012
Old 09-19-2015 , 14:31   Re: Players duplicates again after update
Reply With Quote #10

thx

Now the Sqlsyntax doesnt put out any errors but the problem is still the same

the converting isnt correct

the resulting IDv2 wich is now show up in hlstats isnt the right one

its a ID wich does not exists.

The .pl section wich he means I think its line 1050 - 1064


PHP Code:
#
# array getPlayerInfo (string player, string $ipAddr)
#
# Get a player's name, uid, wonid and team from "Name<uid><wonid><team>".
#

sub getPlayerInfo
{
    
my ($player$create_player$ipAddr) = @_;

    if (
$player =~ /^(.*?)<(\d+)><([^<>]*)><([^<>]*)>(?:<([^<>]*)>)?.*$/) {
        
my $name        = $1;
        
my $userid        = $2;
        
my $uniqueid    = $3;
        
my $team        = $4;
        
my $role        = $5;
        
my $bot            0;
        
my $haveplayer  0;
        
        
$plainuniqueid $uniqueid;
        
$uniqueid =~ /^\[U:1:(\d+)\]/;
        
$uniqueid = $1
        
        if ((
$uniqueid eq "Console") && ($team eq "Console")) {
          return 
0;
        }
        if (
$g_servers{$s_addr}->{play_game} == L4D()) {
        
#for l4d, create meta player object for e 
???
__________________
SRY FOR MY BAD ENGLISH
I'm german
stoneyschillhouse 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 03:49.


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