Jump to content

Problem with PlayerUID


MrInfro

Recommended Posts

Hello guys, I have a HUGE problem.

Few of my players reported that when they disconnect and connect again, they have fresh spawn. I did some digging up and found, that they have PlayerUID with "AX" at the end and the linux server doesnt know how to handle that. Did someone fixed this somehow? 

 

Thx

 

P.S.: AX at the end is from Gold edition ArmA 2

Link to comment
Share on other sites

Hello,

 

I do not have the Gold edition ArmA 2.

 

The playerUID field can have numbers and characters.  BIS changed their policy Anniversary with the annirversory edition and has started to include letters in the playerUID field.

 

If you are building and maintaining the Linux version then you may want to take this in to account or more and more players may have the issue going forwards.

Link to comment
Share on other sites

Hello,

 

I do not have the Gold edition ArmA 2.

Only thing that is needed is to modify you regex in writer.pl on line #231

sub init_login_uid {
    my $dump = shift;
    return unless $dump;
        
    return unless ($dump =~ m/\sconnected/);
    return if ($dump =~ m/BattlEye Server: Player/);
    
    my ($p, $str)   = split (/Player\s/, $dump);
    return unless (defined $str);
    
    my ($name, $uid) = split (/\sconnected\s/, $str);
    return unless ($name && $uid);
    
    if ($uid =~ m/(\d+)/) {
        $uid = $1;
    } 
    return unless $uid;
    print STDERR "$uid => $name\n";
    
    #my $PLAYERS_DIR = CACHE_DIR.'players/'.$myPlayerCounter;
    #my $file        = $PLAYERS_DIR.'/'.$uid.'.sqf';
    #return if (-e $file);
    
    h_load_player ([101, $uid, INSTANCE, $name]);
}

The block with

if ($uid =~ m/(\d+)/) {

$uid = $1;

is responsible for cutting the player ID to just numbers. If you manage to make it read two more non integer characters, everything would be ok. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...