Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. @Grave867: How can a song being streamed to a client from server side as you mentioned it above?

     

    And does anybody know if it's somehow possible to play a sound file for a player being in the lobby?

  2. In your mysql database. I don't know which tool you use to access it. I am using phpmyadmin.

     

    There you click on the db link in the left menu which is called 'information_schema'. There is a table that is called 'EVENTS'.

    These events are executed by the mysql database individually (so not epoch is executing them) depending when they should start (daily, every 14 days,...)

     

    I am not sure if they get executed for you...if I remember correctly the execution of the events needs to be allowed in the my.ini or my.conf (?) (mysql config file in /etc/mysqld or similar) or via SQL commands:

    SET GLOBAL event_scheduler = ON;
    SET @@global.event_scheduler = ON;
    SET GLOBAL event_scheduler = 1;
    SET @@global.event_scheduler = 1;
     

    (can also be used to disable the event scheduler)

     

    Have a look at this link for further information: https://dev.mysql.com/doc/refman/5.1/en/events.html

  3. I am not sure if decay/maintainance is a topic in the linux version but at least I have 2 database events which you might want to change/disable:

     

    Removes old objects and vehicles

    DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)   

     

    setDamageOnAge

    UPDATE `Object_DATA` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

     

    I build 1 wall for testing something else so far. I got the menu to do the maintenance but if I remember correctly there was no maintenance I could do...it was just in the menu. But with the events above objects will get damage and will also get removed after time I guess.

  4. If you are running this on a user e.g. 'dayzepoch' and do a 'chown -R dayzepoch:users *' in your server directory...everything should be fine (without using the root user).

     

     

    I have a similar issue with my cache dir (maybe that is how it was designed): after a restarts my cache/players directory looks like:

     

    ./

    ../

    4/

     

    in forlder 4 I have some cache files and an additional folder 4/. In this folder there is an folder 3/...in there 2/ and so on.

     

    I am not sure if this is correct how it is and what I still need from these files. I mean if I can delete all subfolders in folder 4/ in the main cache/player directory.

     

    Anyone knows how to handle this?

     

    regards,

    jahan.

  5. Did you stop the server with #shutdown ingame as admin?

    I had issues with doing so.

    Only use restarter.pl to stop/restart the server.

    Character data is stored in the mysql db in table character_data.

    You could delete the characters in db and cache files for which that happens and ./restarter.pl.

    Or figure out the 'right' one and delete the others...maybe that also helps.

  6. @all: if you don't want to get lots of emails to your servers user account add somethig like '>/dev/null 2>&1' behind your script execution lines in cron:

     

    E.g. 00 2,6,10,14,18,22 * * * php5 /home/dayzepoch/Restart/120min.php >/dev/null 2>&1

     

    I recognized today that I had thousands of mails with the succes messages of the restart warning scripts ('mail' in shell).

  7. Change the PATH at the beginning of restarter.pl to your server dir.

    e.g.: use constant PATH      => '/home/dayz/server1042/';

    Then the script will find the binary and everything else executed from everywhere.

     

    For the restart message scripts it does not matter where they are. If the server runs and the password is correct they send a message whenever you execute them.

    Each should be executed by cron X minutes before restart really happens as shown in the thread for the restart scripts.

    E.g.:

    55 3,7,11,15,19,23 * * * php5 /home/dayz/Restart/5min.php

    (Which warns 5 minutes before restart; at 5 before 4, 5 before 8, 5 before 12 and so on. Such a line you will need for each script.)

  8. Hm, add this at the end of your crontab line to log something to a file:

    >> /home/serveur/arma2/restart.log

     

    I guess the epoch binary can not be found or something. I set the path contant in the beginning of my restarter.pl to the absolute path to my server directory.

     

    Restart messages: you forgot to mention what you did to set this up and why you think it's not working.

  9. Hm, for me it happened all the time. When server restarted at 8:00 and I logged in at 9:00, I got 8:00 on my watch ingame...when I logged in at 10:00 I got 8:00 too. It seemed that the time for newly connecting players was fixed until the next restart. You don't recognize this too much if you login directly after the restart and stay in the game ,) You should see it if you take a look at a watch ingame, logout for 10 minutes. Relog and have a new look at the watch.

  10. Hi,

     

    I've found a workaround for my server to get the time snyched better between players.

    E.g. I had the issue (I guess others too) that if the server starts at 8 and 12 and a player logs in within this time the player always got the time the server restarted. So some players could have night where others already got day again.

     

    1.)

    In dayz_server.pbo I've created a folder 'custom' and in 'custom' a file 'settime.sqf'. The content of the file:

         // Time sync
         _DateStamp=Date;
         setDate _DateStamp;
         PVDZE_plr_SetDate = _DateStamp;
         publicVariable "PVDZE_plr_SetDate";
         diag_log ("JAHANHIVE: Local Time set to " + str(_DateStamp));

     

    This is called in the file 'compile/server_playerLogin.sqf' in the dayz_server.pbo.

    In this file search for...

         while {_doLoop < 5} do {
        _key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
        diag_log (_key);
            _key = format["\cache\players\%1\%2.sqf", MyPlayerCounter, _playerID];
            diag_log ("LOAD PLAYER: "+_key);
            _res = preprocessFile _key;
            diag_log ("PLAYER CACHE: "+_res);

     

    ...and add this after the lines above:

             ////////// settime for players
            onPlayerConnected "[_id, _name] execVM ""\z\addons\dayz_server\custom\settime.sqf""";

     

    Repack the dayz_server.pbo, upload it to the server.

     

    2.)

    Create a file changetime.pl (e.g. in your server dir) with the following content (taken from DEVDs restarter.pl):

    #!/usr/bin/perl
    use warnings;
    use strict;
    use constant PATH      => '/home/dayzepoch/server1042/';

    set_time  ();

    sub set_time {
        print STDERR "Changing time in cache file.\n";
        my ($s, $m, $h, $day, $mon, $y) = localtime(time() - 5*3600);
        $y += 1900;
        $mon++;

        $m = ($m + 1); # if it's too unaccurate, you can +/- a minute or two
        my $file2 = PATH."cache/set_time.sqf";
        open  (IN, ">$file2") or die "Can't find $file2";
        # ["PASS", [year, month, day, hour, minute]]
        print IN '["PASS",[2013,8,3,'.$h.','.$m.']]'; # with full moon
        close (IN);
        print STDERR "Changed time in cache file.\n";
    }

     

    (Change PATH and the -5 in 'localtime(time() - 5*3600);' to your values.)

     

    Create a crontab entry to execute that script every minute.

    E.g.:

    */1 * * * * /home/dayz/server1042/changetime.pl >> /home/dayz/server1042/changetime.log 2>&1

    (Change the paths for your settings.)

     

    This will update cache/set_time.sqf every minute.

    server_monitor.sqf in dayz_server.pbo/system is called with init.sqf from the mission pbo each time a player connects and in the default DEVD version cache/set_time.sqf is only updated once per server restart (I guess).

     

    Restart the server now.

    Wait a few minutes, connect to the server and the time on a watch ingame should be the expected (e.g. your localtime -5 hours or something).

     

    Regards,

    jahan.

  11. Hey Musyanon,

     

    normally you restart yoiur (Windows) Server via BEC or something similar. You cannot use this under linux.

    For the linux server adaptions by DEVD you need to restart the server via the restarter.pl script.

     

    The scripts we are talking about here is only a warning send to the players via an php battleye client. These scripts do NOT restart the server, they just remember the peolple playing on the server (at 60, 40, 15,... mins before your scheduled restart of restarter.pl in crontab).

     

    Regards,

    jahan.

×
×
  • Create New...