AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   [Counter strike Source]Players duplicates again after update (https://forums.alliedmods.net/showthread.php?t=271680)

KingPovilas 09-17-2015 13:59

[Counter strike Source]Players duplicates again after update
 
Hi , after css update players started to duplicate again,can anyone provide some info how to fix it?

Thanks

micazoid 09-18-2015 07:52

Re: Players duplicates again after update
 
Can confirm this. Player one has STEAM_0:0:28257275 and duplicate player has STEAM_0:[U:1:56514550]

musosoft 09-18-2015 11:41

Re: Players duplicates again after update
 
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

KingPovilas 09-18-2015 13:14

Re: Players duplicates again after update
 
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?

stoneyschillhouse 09-18-2015 15:15

Re: Players duplicates again after update
 
Quote:

Originally Posted by musosoft (Post 2344320)
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

musosoft 09-18-2015 16:56

Re: Players duplicates again after update
 
edited post above thank you! kindly share errors if any

micazoid 09-18-2015 18:24

Re: Players duplicates again after update
 
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

musosoft 09-18-2015 19:12

Re: Players duplicates again after update
 
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...

micazoid 09-18-2015 19:38

Re: Players duplicates again after update
 
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?

stoneyschillhouse 09-19-2015 14:31

Re: Players duplicates again after update
 
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 

???


All times are GMT -4. The time now is 08:54.

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