Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. ? temchartable is a temporary table the command just uses. NOTHING which needs to be created.

    Execute my sql just in whatever tool you use and just adapt the character_table to the exact case it's named in your database. This is enough.

    The temporary table is created by the database in memory just while executing the statement. It's used to compare row for row in the REAL character_data table with a the same rows in the VIRTUAL temp table.

     

    If you wat to execute this statement manually in e.g. phpMyAdmin (each other tool should also have a way to execute statements) you go to the sql tab and just execute it. If you want to execute it automatically e.g. each day once...I guess you need to create an mysql event which does that scheduled for you.

  2. Hm, the place is here to check if it's a new character or not:

     

    dayz_server pbo / compiles/server_playerSetup.sqf

     

    There is a check : if (count _worldspace > 0) then {

    ...

    else {
        /////_randomSpot = true;
        _worldspace = [229,[8246.3184,15485.867,15.544708]]; <-- you would need to place the worldspace coordinates here where a new player should spawn. Uncomment ramdonSpot = true;
    };

     

    Existing characters go into the if clause...new ones into the else part.

     

    The 229 is the height. I've tested it once now and I spawned at the top of the building at this coordinates. So seems that you don't stuck in the ground or fall deep.

     

    How you get the coordinates in there fitting to your current event I don't know. That's something you need to figure out.

  3. I think that someone can help you you need to provide a bit more details.

    Does that happen since you created the server...or did it not happen all the time but now it happens? Then the next question would be: what did you do? and so on ;)

  4. Hm, maybe I don't understand it after a quick read...but how should this ever get true?

    if ( _px > _cx1 && _px < _cx2 && _py > _cy1 && _py < _cy2 && !(labirint_enter in _allowed)) then {
                _flag = true;
            };

     

    The forEach loop runs first with [3420,2076] and in the second iteration with [3670,2337].

    _x is the current element processed.

    So you never get both coordinate pairs in one iteration to get this:

           _cx1 = (_x select 0) select 0;
            _cy1 = (_x select 0) select 1;
            _cx2 = (_x select 1) select 0;
            _cy2 = (_x select 1) select 1;

     

    As far as I understand this this is done one after another. Maybe for some reason this gets true. But not controlled by you. Or?

  5. You could extend you delete statement to something like this:

     

    DELETE from Character_DATA
    USING Character_DATA, Character_DATA as tempchartable
    WHERE (Character_DATA.PlayerUID = tempchartable.PlayerUID)
    AND (NOT Character_DATA.alive = tempchartable.alive)
    AND (Character_DATA.alive = 0)

     

    You may need to change the table names to fit to your names. In the linux server character_data is Character_DATA (the db will complain for the wrong case).

     

    1.) You delete from char table

    2.) using an temporary table tempchartable which contains the same lines to compare

    3.) where playeruid in character_data table is same as in tempchartable

    4.) and alive field is different in both tables

    4.) and alive = 0 in character_data (so you keep alive = 1)

     

    I'v tested this quickly. Maybe you copy your table to a new one and test if this does it with more data rows ;)

     

    http://s1.postimg.org/6111o7433/image.jpg

     

    So in the picture in the lower screen are the lines before and above in the DB are the lines after execution of the command.

    It keeps the rows where there is Alive = 0 but no row with the same PlayerUID with Alive = 1 is available.

    It delete all rows with the same playerUID if there is a line with Alive = 1 for this player.

     

    Looks ok to me. Don't know if there are much better ways.

  6. Hm, basically you just need both releases and check via total commander or similar tool if the file size is different (right side folder A from release 1.0.4.2 and left side folder A from release 1.0.5.1).

    If a new file has a different size, use this (if made custom before) and incorporate the changes into this again. That's how I do it.

    I did not have the original epoch release 1.0.4.2 anymore (and you cannot download it from the page anymore...or can you?). So this time I just checked my old mission and server files against the new ones. That took long ,)

  7. Ah ok, then only the check for !isNil will help there  guess.

     

    I am wondering that there are erros for local variables as well as in your zombie_agent.fsm (or why there is no value assigned to it).

    But having a look into zombie_agent.fsm I found this: _target = objNull;

    Maybe that's how you could initialize your dialog variable (https://community.bistudio.com/wiki/objNull)

     

    Really, I am spending too much time in this...and I'm afraid that if a new Epoch version is out, I need to have a look again and again into this stuff ,)

     

    P.S.: and don't mention zombie_abent.fsm: I was spending hours yesterday night to figure out a way to get Zeds react faster if I am near after I've slowed down their movement. Tried so many things and it did not work)

    But ok...I am not a real developer. I can search for things I need and that's it. These .fms files are already difficult for me to understand in which order what happens. I guess I need to live with that ;))

  8. Maybe a thing which needs to be done only 1 time is to look for all these variables in fn_selfAction (and other scripts, hm) and assign a value to them. I am not sure if it is relevant if these are boolean, string or number variables or arrays (but not sure). Maybe it's enough to just set them to <variable> = ""; in a file (e.g. variables.sqf) which is loaded early in init.sqf.

    So if you then have this file once you can always use this in new versions and if you add a new script just add the additional global variables (not starting with '_') to this variables file.

     

    This is the changelog:

    http://www.arma2.com/downloads/ARMA2OA_Update_163_readme.txt

     

    There is the change line:

    [97926]  Changed: Scripting: When a global variable is assigned a nil value, it is now deleted (was kept with a nil value).

    It's a bit work once but one does not need to wait for new errors again and again while starting/stopping the server always.

  9. Strange convex component. is a problem in some models

    http://forums.bistudio.com/showthread.php?64592-Strange-convex-component

     

    Object not found:

     

    Sounds not found:

    http://forums.bistudio.com/showthread.php?85630-Error-Cannot-load-sound-ca-dubbing (?)

     

    The others I've never seen. The models I could not fix as these are binarized and not allowed to change.

    The object not found thingy I did not try to solve.

     

    Just left these things as they are.

     

    Some other diag_logs I've commented out in the dayz_server files just to keep the log more clean.

     

    @Sandbird: same for me. Also had a 4-5 months break and needed to learn (and search) a lot of things from scratch ;)

  10. What I always do: bevor it's used the first time (or in init.sqf) set a value for it depending what suitable values are.

    I guess for fn_selfAction something like: s_vehicle_unlock = -1; Or if it's a string variable s_vehicle_unlock = ""; (So what to assign depends on what makes sense of course :) )

     

    Or check if the var is NIL and enclose the command with it

     

    if (!isNil "s_vehicle_unlock") then {

     

    }

     

    I was also wondering that I get errors for nearly every script.

     

    Maybe there are better ways...but at least the issues are gone for me.

     

    If a variable is first used in an if close for an comparison or something the scripting engine complains. There needs to be an initialisation before.

    So in your example above it's exactly that case. Not initialized before but used (in the if clause).

     

    (https://community.bistudio.com/wiki/Variables)

  11. @BetterDeadThanZed: I think what you are looking for (and I myself was now searching for a longer time cause I also wanted a way to make them more dangerous.) is dayz_code\player_zombieAttack.sqf

     

    So in there is this part:

    if (((_unit distance player) <= dayz_areaAffect) && ((animationState _unit) in _attackanimations)) then {
            //check LOS
            _inAngle = [_zPos,(getdir _unit),350,_tPos] call fnc_inAngleSector;
            if (_inAngle) then {
                //LOS check
                _cantSee = [_unit,_vehicle] call dayz_losCheck;
                if (!_cantSee) then {
                    if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
                        _cnt = count (DAYZ_woundHit select 1);
                        _index = floor (random _cnt);
                        _index = (DAYZ_woundHit select 1) select _index;
                        _wound = (DAYZ_woundHit select 0) select _index;
                    } else {
                        _cnt = count (DAYZ_woundHit_ok select 1);
                        _index = floor (random _cnt);
                        _index = (DAYZ_woundHit_ok select 1) select _index;
                        _wound = (DAYZ_woundHit_ok select 0) select _index;
                    };
                    _damage = 0.1 + random (1.2);

                    //diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
                    [player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
                    [_unit,"hit",2,false] call dayz_zombieSpeak;
                };
            };
        };

     

     

    The angle decides (I guess) if the Zed is able to hit you or not...so if you you are a bit to far to the right or left, their hit is not in the angle and does no damage:

    _inAngle = [_zPos,(getdir _unit),50,_tPos] call fnc_inAngleSector;

     

    If you change this to:

    _inAngle = [_zPos,(getdir _unit),350,_tPos] call fnc_inAngleSector;

     

    they nearly hit you all the time, independently where you are standing relatively to them. So just play with the value (here 350 degrees) until it fits for you.

     

    I just tested this once now for a short time as it is late already but for me it seems to be the right file/location also to adjust other attack behaviour things of Zeds vs. players.

     

    Regards,

    jahan.

  12. Yes, that's how I did it now. I thought maybe it is possible to allow the creation of "USOrdnanceBox" but just if the command to create it is called from within the script admintools/crates/items.sqf. If called from any other script --> kick.

     

    But it seems that this is not possible. But anyways...thanks for the help!

  13. This happens if you log in?

    What does the db tell you for your character in Character_data, field worldspace?

    Seems that there is something wrong. Need to look like this: [117,[8677.8,16014.5,0.102148]].

     

    What did you change that this happens now?

  14. Ok thanks for the answer. Will try that as soon as I can. In my opinion these things are not documented properly or I did not find these stuff after searching and reading for very long. There are a lot of forum posts and 90% of all tell you to change a "5" to a "1".

     

    Do you have a link to a full documentation of these kind of things?

     

    EDIT:

    Hm that did not work. In the log I get this:

    14:37:34 Player [666] jahan kicked off by BattlEye: CreateVehicle Restriction #2
    14:37:34 "get: STRING (76561197980730579), sent: STRING (76561197980730579)"

     

    I've entered your line from above behind line 3 in createvehicle.txt (the line which kicks for creating boxes).

    So but _classname will get replaced so as in your line this needs to be set to the actual vehicle to spawn?

    I guess the place to enter this is createvehicle.txt? Or is it in scripts.txt?

     

    I've read somewhere that it should alsp be possible to allow things for a complete script. Say for admintools\crates\items.sqf.

     

    Dou you know an exception for that?

×
×
  • Create New...