Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. What I did not see in my last post (and sorry for that) is, that in your list you only showed .pbo files. So the battleye dir cannot be seen here.

    If you can provide a list with all files/dirs I will have another look at these. Maybe you can save the time for doing everything again.

     

    With beta I am not sure. In my first 1.0.5.1 server I did not have beta included (for 1.63.11255). It can be that this is required for higher versions. I have it now in expansion but don't know if this is really required.

     

    It is important that you have this in your server.cfg (so if you use 2302 as your port for example you can use these values):

    At the end of this page there are some hints:

    https://community.bistudio.com/wiki/server.cfg

     

    steamport = 2300;
    steamqueryport = 2301;

    and comment out the gamespy line (//).

     

    Then you will need an steam_appid.txt file in your servers root dir with content:

    33930

     

    Server should not kick you after a fresh install for anything (before you add new things to it like infostar or whatever scripts). I had the problem that I had bikey files in the servers root dirs key directory which should not be there for my 1.63.126652 version...I only have thiese file there:

    -rw-r--r--  1 epoch epoch  157 Oct  4 12:24 dayz.bikey
    -rw-r--r--  1 epoch epoch  167 Oct  4 12:24 dayz_epoch1051.bikey
    -rw-r--r--  1 epoch epoch  160 Oct  4 12:24 dayz_vb.bikey

     

    Without deleting the rest I couoldn't connect.

    ).

  2. @fluke/BetterDeadThanZed: how many vehicles do you have on your map?

     

    I think if you put the script into the mission, restart the server and directly test this...then the server is doing whatever stuff (running server_monitor and populating all the vehicles and whatever actions there are).

    I don't know how that is on the windows server as I am using the Linux version which loads these things differently.

     

    I can imagine that the search for a car may take some time (especially directly after restarting)...if there are many vehicles around. I need to check with a diag_log line that if you search for a vehicle from type xyz, if it needs to search through all vehicles or only all from this type. That's something I do not know. After testing it is a bit more clear to me how that works.

    So what I mean: for the lower range scan (with showing the arrow) does the search go through all Vehs on the map to see which are within the lower range and returns the list of Vehs which fit to the radius...or is the algorithm (however that works) smart enough to start in the center of search position and just touch the ones in the radius. I think in any case all vehicles need to be touched (same for type, I guess...but not sure).

     

    I did not put the search into ui_selectSlot so that one needs to wait there until the search is finished as I saw it in other scripts. It's executed via ExecVM to execute an external script in parallel.

    And the script exits the loop as soon as it finds the vehicle which matches ( if ( _keyOwner == _ownerID ) exitWith {  ) so that we do not search for unneccessary things anymore. I don't think that this can be optimized much (but I am happy with any hints if so).

  3. Hi CaptainReid:

    ./epoch.sh: line 1: ./epoch: No such file or directory  (<-- where is this coming from?)

     

    Hm from the log I do not see something special.

     

    This I see every day:

    17:04:48 Player Preid2905 connecting.
    17:04:48 Mission DayZ Epoch Chernarus read from bank.
    17:04:52 Player Preid2905 disconnected.
    17:04:52 BattlEye Server: Player #0 Preid2905 disconnected

     

    I think it's related that people have wrong extensions enabled in the game menu (so Epoch and DayZ activated there...sonething like that). Can you connect to other Epoch servers?

     

    If nothing helps I would delete content of table Character_DATA and delete all directories in cache/players/ to see what happens then. Maybe you've started once where the installation has not been finished yet or something and you got a wrong character line in the table which you now uses every time.

  4. Hm, I don't know why you have this 2 times here?

     

            _erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
            _erc_numActions = (count _erc_cfgActions);
            if (isClass _erc_cfgActions) then {
                    for "_j" from 0 to (_erc_numActions - 1) do
                    {
                            _menu =  _parent displayCtrl (1600 + _j + _numActions);
                            _menu ctrlShow true;
                            _config =  (_erc_cfgActions select _j);
                            _text =  getText (_config >> "text");
                            _script =  getText (_config >> "script");
                            _height = _height + (0.025 * safezoneH);
                            uiNamespace setVariable ['uiControl', _control];
                            _menu ctrlSetText _text;
                            _menu ctrlSetEventHandler ["ButtonClick",_script];
                    };
            };
           
       _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
       _erc_numActions = (count _erc_cfgActions);
       if (isClass _erc_cfgActions) then {
         for "_j" from 0 to (_erc_numActions - 1) do
         {
           _menu =  _parent displayCtrl (1600 + _j + _numActions);
           _menu ctrlShow true;
           _config =  (_erc_cfgActions select _j);
           _text =  getText (_config >> "text");
           _script =  getText (_config >> "script");
           _height = _height + (0.025 * safezoneH);
           uiNamespace setVariable ['uiControl', _control];
           _menu ctrlSetText _text;
           _menu ctrlSetEventHandler ["ButtonClick",_script];
         };
       };

     

    Can this not been done in one file?

    I had a similar issue where 1 menu item has been overwritten so in between I've counted _numActions one up.

    Maybe you need to enter such a line between the 2 parts.

    I mean this:

    _numActions = _numActions + 1;

     

    Just a guess as it was an similar issue.

  5. Hm, on a fresh server you should not get kicked. And removing the files for sure helps (hackers ;) ).

    There is something wrong with your installation I would say.

     

    if (_characterID == "0") exitWith {
        diag_log ("ERROR: Cannot Sync Character " + (_name) + " as no characterID");
    };

     

    The question is why your characterID is 0.

    Post your dump.log file so that we can see what happens there? Delete the content (> dump.log) and restart the server. Maybe we can see something there.

  6. Hi,

     

    can you try to delete this line from my code (or comment it out):

     

    _numActions = _numActions + 1; // if there are other item action after that (other mods) add 1 to _numactions

     

    I was not 100% sure if this should be there. I need it as I have the Remote Vehicle Door Opener options after the Vehicle Pointer stuff.

    Just to be sure that this is not causing that.

     

    Let me know how the result looks like (1 option more or even worse (another one missing or something). It's all about counting the available options and to add the new ones below the existing ones. With different methods here it was difficult for me to understand how that works until I got it running for me.

     

    EDIT:

    But I guess as there is an if at the beginning of my code which checks for the key item and it only enters this part if clicked on a key, I guess this should change nothing.

    I will have another look when I am back from work if not someone else already answered to this.

  7. There seems to be a bug with createVehicleLocal for some objects which might spam the RPT log:

    https://dev.withsix.com/issues/25648

     

    Just to let you know. Seems that this has not been fixed so far. But I think it's more interesting to use the createVehicle function which everybody else on the server can see ,))

    I am still not 100% sure which _classnames that are where the spamming occurs. Either should be made non-local or another classname should be used in this case.

  8. Lol, this one was a real performance killer. Doing the loop to check for an existing player bike in fn_selfAction was bullshit. To avoid that the menu action shows up if the bike has been already unpacked when player reloggs I did it this way (for what I should get banned from the forums^^).

     

    I've updated the link in the video description to the corrected script (instructions are at the end of the file). I've also rearranged some other things (bike spawns into direction at time player looked when executing the command / quit the loop if personal bike has been found) and now it should work as intended.

     

    I did not get the invisibility issue anymore. Let me know if that still occurs (or try to change _classname everywhere from "MMT_USMC" to "MMT_Civ" which might solve it...don't know why there are 2 classnames for the sae thing. There might be a reason ;) ).

  9. No. It's just a try. I had some issues to find the right way but I also use this remote vehicle door opener.

    I tried to enter my stuff after the remote vehicle opener stuff and my option wasn't shown. Then I recognized that something like this was missing:

    _numActions = _numActions + 1; // if there are other item action after that (other mods) add 1 to _numactions

     

    ...so that the next menu option counts on top of it. In the end I've ended with what I've told you...I put my part below the rc extra stuff method by Maca and before _pos set [3,_height];

     

    So I cannot guarantee a way which works for everyone (if not used in the vanilla Epoch version)...as everybody has whatever changes in ui_selectSlot.sqf.

     

    This is my file...you can use it to compare. But already the beginning is different to yours as I use Macas old way for the selfBloodBag and not the new Epoch way for self-transfuse.

    So you cannot take this 1 to 1. Start with comparison from: //Populate Menu

     

    private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType","_key_colors","_ownerKeyId","_itemsPlayer","_hasKey","_objects","_ownerID","_i"];
    disableSerialization;
    _control =     _this select 0;
    _button =    _this select 1;
    _parent =     findDisplay 106;

    //if ((time - dayzClickTime) < 1) exitWith {};
    // jahan - self transfusion mit check variable ausschalten
    /////if (!DZE_SelfTransfuse && ((gearSlotData _control) == "ItemBloodBag")) exitWith {};

    if (_button == 1) then {
        //dayzClickTime = time;
        _group = _parent displayCtrl 6902;
        
        _pos =         ctrlPosition _group;
        _pos set [0,((_this select 2) + 0.48)];
        _pos set [1,((_this select 3) + 0.07)];
        
        _item = gearSlotData _control;
        
        _conf = configFile >> "cfgMagazines" >> _item;
        if (!isClass _conf) then {
            _conf = configFile >> "cfgWeapons" >> _item;
        };
        _name = getText(_conf >> "displayName");
        _cfgActions = _conf >> "ItemActions";
        ///// jahan - if selfbloodpack, sonst geht das menu nicht
        if !((gearSlotData _control) == "ItemBloodBag") then {
        _numActions = (count _cfgActions);
        } else {
        _numActions = 0;
        };
        _height = 0;
        
        ///// jahan - selfbloodpack
        if !((gearSlotData _control) == "ItemBloodBag") then {
        //Populate Menu
        for "_i" from 0 to (_numActions - 1) do
        {
            _menu =     _parent displayCtrl (1600 + _i);
            _menu ctrlShow true;
            _config =     (_cfgActions select _i);
            _type =     getText    (_config >> "text");
            _script =     getText    (_config >> "script");
            _outputOriented =     getNumber    (_config >> "outputOriented") == 1;
            _height = _height + (0.025 * safezoneH);
            _compile =  format["_id = '%2' %1;",_script,_item];
            uiNamespace setVariable ['uiControl', _control];
            if (_outputOriented) then {
                /*
                    This flag means that the action is output oriented
                    the output class will then be transferred to the script
                    && the type used for the name
                */            
                _array =     getArray    (_config >> "output");
                _outputClass = _array select 0;
                _outputType = _array select 1;
                _name = getText (configFile >> _outputType >> _outputClass >> "displayName");
                _compile =  format["_id = ['%2',%3] %1;",_script,_item,_array];
            };
            
            _menu ctrlSetText format[_type,_name];
            _menu ctrlSetEventHandler ["ButtonClick",_compile];
        };
       };
        
        ///// jahan self boodpack und evac chopper
        ////////// jahan: Add extra context menus (for SelfBloodbag and Radio Communication
    _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
    _erc_numActions = (count _erc_cfgActions);
    if (isClass _erc_cfgActions) then {
        for "_j" from 0 to (_erc_numActions - 1) do
        {
            _menu =  _parent displayCtrl (1600 + _j + _numActions);
            _menu ctrlShow true;
            _config =  (_erc_cfgActions select _j);
            _text =  getText (_config >> "text");
            _script =  getText (_config >> "script");
            _height = _height + (0.025 * safezoneH);
            uiNamespace setVariable ['uiControl', _control];
            _menu ctrlSetText _text;
            _menu ctrlSetEventHandler ["ButtonClick",_script];
        };
    };
    ///// end jahan self bloodpack and evac chopper


    ///// jahan - begin vehicle pointer
            // key colors
            _colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
            if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _item)) in _colors) then {
                // characterID of the key (car character number)
                _keyOwner = getNumber(configFile >> "CfgWeapons" >> _item >> "keyid");
                // key name (like: e3f2)
                _keyName = getText(configFile >> "CfgWeapons" >> _item >> "displayName");

                //Menu entry Key vehicle pointer
                _control =  _parent displayCtrl (1600 + _numActions);
                _control ctrlShow true;
                _height = _height + (0.025 * safezoneH);
                // this needs to point the place where the script is in your mission (vehicle_pointer.sqf)
                _script =  "custom\jtools\vehicle_pointer.sqf";
                _exescript = format["_id = ['%2','%3'] execVM '%1';closeDialog 0;",_script,_keyOwner,_keyName];
                uiNamespace setVariable ['uiControl', _control];
                // sets the text in the right button menu
                _control ctrlSetText "Vehicle Pointer";
                _control ctrlSetTextColor [0.3,0.4,1,1];
                _control ctrlSetTooltip "Pinpoint vehicle. Mark on map if not in range.";
                _control ctrlSetTooltipColorBox [0.3,0.4,1,1];
                _control ctrlSetTooltipColorShade [0, 0, 0, 1];
                _control ctrlSetTooltipColorText [0.3,0.4,1,1];
                _control ctrlSetEventHandler ["ButtonClick",_exescript];
                _numActions = _numActions + 1; // if there are other item action after that (other mods) add 1 to _numactions
            };
    ///// jahan - end vehicle pointer


    ///// jahan - begin remote vehicle door opener
    /*
            Begin: Vehicle remote lock/unlock
        */
            _itemsPlayer = items player;
            
            _temp_keys = [];
            _temp_keys_names = [];
            // find available keys
            _key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
            if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _item)) in _key_colors) then {
                _ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _item >> "keyid");
                _ownerKeyName = getText(configFile >> "CfgWeapons" >> _item >> "displayName");
                _temp_keys_names set [_ownerKeyId,_ownerKeyName];
                
                _objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Plane","Ship"], 50];
                _i = 0;
                {
                    if (alive _x) then {
                        _ownerID = _x getVariable ["CharacterID", "0"];
                        _hasKey = (_ownerID == str(_ownerKeyId));
                        _oldOwner = (_ownerID == dayz_playerUID);

                        if(_hasKey or _oldOwner) then {
                            if(locked _x) then {
                                //Unlock
                                _menu =  _parent displayCtrl (1600 + _numActions);
                                _menu ctrlShow true;
                                _text =  "Unlock";
                                _script =  "[""" + _ownerID + """] execVM ""custom\remote_unlock.sqf""";
                                _height = _height + (0.025 * safezoneH);
                                uiNamespace setVariable ['uiControl', _control];
                                _menu ctrlSetText _text;
                                _menu ctrlSetEventHandler ["ButtonClick",_script];
                            } else {
                                //Lock
                                _menu =  _parent displayCtrl (1600 + _numActions);
                                _menu ctrlShow true;
                                _text =  "Lock";
                                _script =  "[""" + _ownerID + """] execVM ""custom\remote_lock.sqf""";
                                _height = _height + (0.025 * safezoneH);
                                uiNamespace setVariable ['uiControl', _control];
                                _menu ctrlSetText _text;
                                _menu ctrlSetEventHandler ["ButtonClick",_script];
                            };
                            //Engine start
                            _menu =  _parent displayCtrl (1600 + _numActions + 1);
                            _menu ctrlShow true;
                            _text =  "Engine";
                            _script =  "[""" + _ownerID + """] execVM ""custom\remote_engine.sqf""";
                            _height = _height + (0.025 * safezoneH);
                            uiNamespace setVariable ['uiControl', _control];
                            _menu ctrlSetText _text;
                            _menu ctrlSetEventHandler ["ButtonClick",_script];
                        };
                        
                        _i = _i + 1;
                    };
                } forEach _objects;
            };
        /*
            End: Vehicle remote lock/unlock
        */
    ///// jahan - end remote vehicle door opener


        _pos set [3,_height];
        //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos];        

        _group ctrlShow true;
        ctrlSetFocus _group;
        _group ctrlSetPosition _pos;
        _group ctrlCommit 0;
    };

  10. SilentKilla: that's the same for everything: writing the first simple program is not difficult...you find a lot of examples.

    But installing the developing environment, getting the first 'Hello World' to show up is (at least for me) the most difficult thing ,)

     

    But here you already have example scripts and the whole game is scripted. You can have a look in all the code available. There are a few things you need to know like a page with available commands (easy to find in google: arma2 scripting commands) and how to make files from the servers .pbo files custom to your mission to change them (which is needed and explained in nearly any mod/script released here).

    The rest is as Sandbird and the others said: trying to change a few things and in my opinion reading here in the forum. Not everything is what you need/want but at specific times you need something and remember that you've already read siomething similar.
    What helps me a lot is a tool like FileSeek which allows you to search for strings in a folder (with subfolder) for all occurences. So if you want to know where a specific variable has been set I search for this in dayz_server / dayz_code and my mission and that also helps to understand the context a bit (but it's still really difficult to me to be honest).

     

    I totally agree to Sandbird that I've never used any scripting way/language where it is so difficult and time consuming as here (and I (idiot) upload the changed files first via ftp to my server even that I've recognized long ago already that the difference in scripting for my linux server should be in most parts the same as under windows, hehe...this behaviour is wrongly trained and I blame BIS for that.)) ).

     

    I don't really need a debugger but here I often recognize an error while testing and this tiny little error caues a lot of other things to go bad. It's not only the one place where the error occurs which is not working. Yesterday I had a problem with 2 local variables I just used wrongly written in my debug monitor (just in a diag_log)...both names written wrongly in my output but the consequence was that nothing was saved into the db anymore. I could not delete a plotpole or other builds I did, removing debries on the street was working but they stayed there (did not vanish after completion) and a few other things. How should one know what causes all of this, hm. This here is the only thing where I've recognized something like this so far and have many years of scripting experience privately and in business. Ok, I am not a real developer but if that's really needed, the whole environment is crap ;)

     

    Here are some useful links in the first post (one is german but there is an english download a bit below):

    http://hx3.de/editing-scripting-167/scripting-arma2-16949/

  11. For what is this step here? _vehicle_2971 = _this;

     

    This is missing in the second example. So I don't know how costly the assignment to another variable is, as the object needs to be copied with all internal stuff the object has. So I would say the second way can save some steps.

     

    Or did you just forget: _bldObj = _this? which everybody else just estimated that this is there. But nevertheless why not create a variable _vehicle = createVeh blablabla and do your changes on this _vehicle  and get rid of the assignment to another variable and get rid of the if (true) which is also nonsense ? Then you save 2 steps. If you save 2 steps for all the vehicles (if it's so) you may really save something if there are many.

  12. There is :

     

    player reveal _bike;

     

    But not the next command after the createVehicle. First I set some variables, change pos and so on. After all of that I reveal it.

    I was just not sure if I am doing something wrong here, but I guess it's as you said: something with texture or model for this classname (MMT_USMC).

     

    It's something like this...so no scripting issue in your opinion? That's what I want to know ;)

    http://forums.bistudio.com/showthread.php?146864-ArmA-2-LOD-stuttering-texture-flickering

     

    With a Vault it's a bit different for me..it's sometimes badly to see nut it's there. The bike completely vanished as it can be seen in the video, hm.

  13. I also had it twice today that the bike vanished. I guess this has nothing to do with the script...it's the same as with vaults which sometimes look ok and sometimes disappear. I am not sure if it#s the same.

    Have a look at the small video: I am standing next to the bike and when I turn the player around a bit it's visible or completely invisible.

     

    http://youtu.be/6x4zstrPIds

     

    Maybe someone can explain what this is or if there's a way to fix this?

  14. If the player is im combat or unconscious is what I check in the script (you should not be able to unpack the bike if in combat or unconscious).

    I got it once after I died and relogged. So I guess in this case the player should not be unconscious anymore. You can comment the line out if you don't want it there.

     

    Never vanished or had a freeze so far, hm. If you have a look into your db. How many objects do you have with classname "MMT_USMC" ?

    For the standard linux server I use you cannot buy this mountain bike at traders and they do not spawn automatically. Only other classnames. Therefore I've used this one. If there are a lot of these on your map...yes, it might take long.

     

    What does 'vanish' mean exactly. You drive with the bike and then it's gone and you are on your feet again or is it invisible but you are still driving?

  15. @leodr99: the credits go to JPhix in the Linux Server port forum ( )

     

    @Uebermorgen: I use the scripts since they are released and they work. I've copied the above code into my webserver and also works from there if executed in the browser.

    Then you may have set something wrong in your settings.

     

    Which message do you get in your browser?

     

    My messages:

    Got Socket! Attempting Login Login Successful! RCon admin #0 (127.0.0.1:37213) logged in say -1 WARNING!! Server Restart in X MINUTES!!!

×
×
  • Create New...