Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. What exactly is epoch 1.0.6+. Is this community work for including some mods/scripts or was that still released by the Epoch team?
    I think I've stopped working with 1.0.5.1 (long ago ;) ) but contributed a bit fixing issues and also added features like 'spawn as a zombie' or 'gender selection' for the devd linux version at these times.
    Basically that was all done by writer.pl which parses the server dump file for specific messages to then write stuff to the db. But as mentioned above the BI scripting language is really awful and nothing goes fast.
    But maybe if there is a kind of team I will remember some things and also like to contribute here. Not yet sure if any effort still makes sense.

  2. Just wanted to make sure the friend might have any Hack Menu (whatever tool) installed client side which always kicks him if it's always him joining as the second player ;)

    I think I did read that wrong initially. You are using the infistar admintool, not the Noxsicarius one, I guess. I would say you are not using the correct battleye filter files which are needed by the infistar version you use.

    Not sure how to get these but I saw some posts where people asked infistar for the files...after that server was working as normal without kicks.

     

  3. "but there is just this problem that, it is only the first admin who joins the server and opens the admintool that can use it??? everytime that more than 1 admin tryes to use it the other admins get kicked and this message comes up"

    Did you try to change the order of admins logging in or is it always you logging in as the first admin user and your friend is always the second?

    What happens if you do NOT login and just let your friend login as an admin...is it then working for him?

    Just want to ensure that your hint with the 2nd admin does not lead to a completely wrong idea of what the problem really is. But I do not really get this information out of what you wrote so far. But I think it will be helpful if you mention what you've already tested to isolate the issue?

     

  4. Use an absolute path here:

    use constant PATH      => '/home/epoch/epochserver/'; # Set your epoch server dir

    The path need to point to your servers directory.

    And have a look if your server executable really has the name 'server'. If it has another name you need to rename it to 'server' or change it in restarter.pl here in the check condition ( unless (-f PATH.'server') { ).

     

  5. Hey, why do you not have a look into the epoch linux server files? There you can see how it is writen to the db via diag_log.

    Extract the epoch server .pbo and have a look at scripts which update vehicles for example (I don't have the correct names now in front of me but you will find them by the name).

    And have a look into writer.pl as this is the place where the db reads/updates/deletes happen. The script parses the information from the server log file. Therefore the epoch server scripts write it into the log.

     

     

     

  6. The cache should not be a problem. Just do the changes in the db when the server is down in a restart.

    Thats a part of a script I've used in my server to do cleanup tasks in the db. I guess I've started this from restarter.pl everytime before the server is actually started.

    #!/usr/bin/perl
    #
    use DBI;
    use warnings;
    use strict;
    
    use constant {
        INSTANCE  => 24,           # Chernarus instance
        DB_NAME   => 'epoch',      # Set database name
        DB_LOGIN  => 'your_db_user', # Set database login
        DB_PASSWD => 'your_db_user_pass', # Set database password
        DB_HOST   => 'localhost',  # Set database host
        DB_PORT   => 3306,         # Set database port (default 3306)
    };
    
    # connect to the db
    my $dbh   = connect_to_db();
    
    # Here you call your function for cleanup or whatever
    clean_player_login_data();
    
    # disconnect again
    $dbh->disconnect;
    
    exit;
    
    
    #---------------------------------------------------------------------------
    # SQL Query Sub-functions
    #
    sub connect_to_db {
        my $dbh = DBI->connect('dbi:mysql:'.DB_NAME.':'.DB_HOST.':'.DB_PORT, DB_LOGIN, DB_PASSWD,
                  {'PrintError' => 1, 'RaiseError' => 1, 'AutoCommit' => 1})
                  or die "Can't connect to mysql: $!";
        $dbh->{'mysql_auto_reconnect'} = 1;
        return $dbh;
    }
    
    
    # Clean player_login data older than 2 days
    sub clean_player_login_data {
        my $sql = "DELETE FROM `Player_LOGIN` WHERE `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 2 DAY);";
        my $sth = $dbh->prepare ($sql);
        my $res = $sth->execute ();
        $sth->finish;
        return $res;
    }
    

    The perl script connects to the db and executes the function, here clean_player_login_data{}. The function called a few lines above. Of course you can create more functions.

    The clean_player_login_data function is the example where you need to enter the query you've posted.

    You could also have a look at a video I made some time ago which contains some useful sql queries:

    " https://www.youtube.com/watch?v=jLLbjWttBZ4 "

     

  7. Hm, so the only difference is that you have these lines additionally at the end of playerLogin:

     

    if (_isNew) then {
        diag_log format["Player %1 Character %2 is NEW", _playerID, _charID];
        [_charID, _playerID, _playerObj] call server_changePlotsOwner;
    };

    But I guess this has nothing to do with the loadout.

     

    I also did some changes to writer.pl (and in my video description I remark that the fixed writer.pl (with JSON fixes) is needed from denisios Arma2oa Linux Server GitHub page.

    But I think if you use single currency, they did also changes to writer.pl.

     

    You can also send me that (writer.pl) but I think now it's getting complicated to understand for me what they've changed for single currency.

    I use one of the columns (infected) in the character cache files to see if player is infected or not (or added it there). Column infected was NOT used by devd in the linux port in mysql table character_data.

    So, I've added this to have it the same as in the windows version. And if I remember correctly they also added a new column to character_data for single currency.

     

    Devd did not add my gender/zombie changes to his GitHub Linux server version for whatever reason or he did not see my request. Would have been easier if additional scripts could be developed and added to a more consolidated version (and gender select or play as a zombie is not a new extension...it's part of the standard epoch). That leads to what we have here: scripts and changes individually done do not fit together anymore unfortunately.

     

    This will be possible to check/fix, but I cannot test anything.

    If you can provide a screenshot or something how the column names in character_data look like in your server (maybe with an example data row), your writer.pl and a player cache file...maybe I can find a fix/workaround.

     

    Or maybe DeanReid has an idea here if he is still around. He helped with the single currency changes for Linux.

  8. It is this part in 'server pbo'/compile/server_playerLogin.sqf which is responsible for getting the default loadout setup in init.sqf.

    I don't know how that looks for you.

     

    //Record initial inventory only if not player zombie (values defined in init.sqf)
        if(_isInfected != 1) then {
            _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
            _mags = getArray (_config >> "magazines");
            _wpns = getArray (_config >> "weapons");
            _bcpk = getText (_config >> "backpack");

            if(!isNil "DefaultMagazines") then {
                _mags = DefaultMagazines;
            };
            if(!isNil "DefaultWeapons") then {
                _wpns = DefaultWeapons;
            };
            if(!isNil "DefaultBackpack") then {
                _bcpk = DefaultBackpack;
            };
            //_randomSpot = true;
        
            //Wait for HIVE to be free
            diag_log format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
        };

    The problem here is to get the value for __isInfected (zombie or man)

    Enter a ' _isInfected = 0; ' before the if condition for testing.

     

     

    This is in my init.sqf:

    DefaultMagazines = ["ItemBandage","ItemBandage","ItemSodaCoke","FoodCanBakedBeans","ItemPainkiller"];
    DefaultWeapons = ["ItemCompass","ItemRadio","ItemToolbox","ItemMachete","ItemMap"];
    DefaultBackpack = "DZ_TerminalPack_EP1";
    DefaultBackpackItems = [""];

     

    I still have this in my writer.pl:

    INVENTORY => '[["ItemMap","ItemMachete","ItemCompass","ItemToolbox","ItemRadio"],["ItemBandage","ItemPainkiller","ItemBandage","ItemSodaCoke","FoodCanBakedBeans"]]',
    BACKPACK  => '["DZ_TerminalPack_EP1",[],[]]',
    MODEL     => '"Survivor2_DZ"'

     

    Thought I did delete this, hm. It's too long ago. But I remember that without changing server_playerLogin.sqf it was not possible via init.sqf.

  9. Initially devd did it so that the default configuration for loadout is at the beginning of writer.pl.

    With something I've changed (not sure if it was Gender Select...need to have a look) it was then possible to do it in init.sqf.

    If I remember correctly using init.sqf was not possible in an unchanged A2OA Linux server.

     

     

    EDIT: yes, it was here (fix to make Gender Select and Play as Zombie possible). With these changes as a side effect Custom Loadout via init.sqf was working for me.

  10. Hm, just tried it, works for me. Just edited the config:

     

    {
    "napf":
                {
                    "ip":"127.0.0.1",
                    "port":"2304",
                    "pass":"adminpass",
                    "msg":"kick message"
                }
    }
     

    took all guids out of guids.txt...so nobody is whitelisted, connected and got kicked immediately after executing php wl.php

    Port is your server port where you connect with your client. pass is the admin pass in the server.cfg (or how you named it).

     

    Regards, jahan.

  11. Thanks for the feedback!

    Yes, you are right: the video shows how to setup an A3 Epoch server on a Linux box (as the title says). It does how to create the user or how to install all packages. The packages which need to be installed can be seen in the Link (URL/commands used) in the video description).

     

    How to download and use libc6 is shown in previous of my videos for the Dayz Epoch server. People can also ask, although I think that many are using linux distros where newer packages of these libs are available by default.

     

    As I can connect at the end of the video, so many things cannot be missing here...and there are others where it is working. Does not mean that there cannot be something wrong, of course (will check if I get a free minute).

×
×
  • Create New...