Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. @Devd: how does that work. How can I determine the time in the game. Would be great to know that.

    If I restart the server with restarter.pl in between 2 planned restarts the time showing in the debug monitor is obviously wrong.

    If the load on the server is heavy and a second is not a second anymore the time is also wrong. Don't want to have the situation where the debug monitor says: restart in 2 minutes and in that moment it already restarts cause the cron job is accurate.

  2. Then for Bandits humanity need to change the other way round or something.

     

    Would like the way better that it last for a configurable amount of time (a bit randomized) instead of washing it away...as the smell maybe goes away after walking around a bit.

    And that running fast still atrácts zeds...and walking does not. Maybe I change that for me.

     

    Very good idea! Nobody should say that watching too much TV is bad ;)

  3. For me the sound distance is still not working correctly. I think the CfgSound parameters in description.ext are not described properly.

    I found some posts in other forums where I can see that it's also possible to have 4 values in description.ext for the soundfile.

    If I add a 4th one, e.g. 40 (which should be the distance in meters) where you do not hear the sound anymore, it works...but now the sound if I'am very near is not as loud as before.

     

    For me it seams the _sounddist variable in the RE call does nothing. I can set it to 20, 10, 40 and the sound can always be heard about 100m far. But it should be possible somehow to change this via a script and not hard-define it in description.ext which cannot be changed anymore later on (?). E.g. if someone is in a car, 40m distance, or is NOT in a car I possibly want to change how loud the sound plays...this would be possible anymore if this can only be set in description,ext.

     

    Anyone figured it out how this could be controlled more precisely?

  4. Maybe I've fixed it now (maybe as it does not always happen which makes it difficult to test ;) ).

     

    I changed the preprocessFile function in server_ublishverhicles2.sqf to loadFile as I've read that preprocessFunction should not be used in time critical tasks (even if I think that the one line in this file should be irrelevant).

    And I send a message to the client when server cleanup is finished and from then cars should be bought at traders again. I think that the server handles too many things directly after a restart and I always tested buying cars shortly after a restart. Did not have any problems again since then, hm.

  5. I don't know why...it is not working if I put this in the addActiion command as condition as showed above. Maybe a typo. I did it now like this, which is working:

     

    Same as before...your in your custom fn_selfAction.sqf find this:

    // Allow Owner to lock and unlock vehicle  
    	if(_player_lockUnlock_crtl) then {
    		if (s_player_lockUnlock_crtl < 0) then {
    			_hasKey = _ownerID in _temp_keys;
    			_oldOwner = (_ownerID == dayz_playerUID);
    			if(locked _cursorTarget) then {
    				if(_hasKey or _oldOwner) then {
    					_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];
    					s_player_lockunlock set [count s_player_lockunlock,_Unlock];
    					s_player_lockUnlock_crtl = 1;
    				} else {
    					if(_hasHotwireKit) then {
    						_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true, "", ""];
    					} else {
    						_Unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, true, true, "", ""];
    					};
    					s_player_lockunlock set [count s_player_lockunlock,_Unlock];
    					s_player_lockUnlock_crtl = 1;
    				};
    			} else {
    				if(_hasKey or _oldOwner) then {
    					_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
    					s_player_lockunlock set [count s_player_lockunlock,_lock];
    					s_player_lockUnlock_crtl = 1;
    				};
    			};
    		};
    

    Now change this:

    _hasKey = _ownerID in _temp_keys;
    _oldOwner = (_ownerID == dayz_playerUID);
    

    ...to this:

    _hasKey = _ownerID in _temp_keys;
    _oldOwner = (_ownerID == dayz_playerUID);
    _isCarEmpty = ( {alive _x} count crew _cursorTarget == 0);
    

    And below in the if condition for the lock part change this:

    } else {
    	if (_hasKey or _oldOwner) then {
    	_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
    

    ...to this:

    } else {
    	if ((_hasKey or _oldOwner) && _isCarEmpty) then {
    	_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
    

    Did not have much time and noone at hand to test but I guess it should also work in the addAction if I find the typo. But this way it works now.

  6. Open your custom fn_selfAction.sqf and find the following code:

    // Allow Owner to lock and unlock vehicle  
    	if(_player_lockUnlock_crtl) then {
    		if (s_player_lockUnlock_crtl < 0) then {
    			_hasKey = _ownerID in _temp_keys;
    			_oldOwner = (_ownerID == dayz_playerUID);
    			if(locked _cursorTarget) then {
    				if(_hasKey or _oldOwner) then {
    					_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];
    					s_player_lockunlock set [count s_player_lockunlock,_Unlock];
    					s_player_lockUnlock_crtl = 1;
    				} else {
    					if(_hasHotwireKit) then {
    						_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true, "", ""];
    					} else {
    						_Unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, true, true, "", ""];
    					};
    					s_player_lockunlock set [count s_player_lockunlock,_Unlock];
    					s_player_lockUnlock_crtl = 1;
    				};
    			} else {
    				if(_hasKey or _oldOwner) then {
    					_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
    					s_player_lockunlock set [count s_player_lockunlock,_lock];
    					s_player_lockUnlock_crtl = 1;
    				};
    			};
    		};
    

    Change this line:

    _lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
    

    ...to this:

    _lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", "count (crew _target) < 1"];
    

    It adds a condition to the addacction which then only shows up if the vehicle is empty. You need to look at the vehicle and the distance needs to be <15m.

    Not tested but should work, I guess.

     

    P.s.: this means the vehicle really needs to be empty. If it should be lockable even if a dead corpse is still in the car, you could use this condition:

    {alive _x} count crew vehiclenamehere == 0

  7. I am not sure if that can cause issues. The preprocessFile calls in compiles.sqf execute the code in the scripts like fn_selfAction.sqf, right?

     

    The original line in init.sqf to call compiles.sqf which e.g. calls the original fn_selfAction.sqf could contain a piece of code which you could have deleted in your custom fn_selfAction.sqf called by your custom compile.sqf.

    Will the original code in that case will not also be present as it is not overwritten by the custom one?

     

    I think calling a seperate variables.sqf with just a few new variables or changing values again for variables you set already via the original variables.sqf should not be a problem...but in case of seleted code (as pointed out above) is maybe not what you want.

    That happens if it is really like how I understood how function preprocessFile works. But maybe I've understood it wrongly.

  8. I have still no idea why the cache file cannot be found properly.

    17:02:08 "CHILD:306:673:[]:0:"
    17:02:12 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:12 "OBJECT ID CACHE: "
    17:02:17 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:17 "OBJECT ID CACHE: "
    17:02:22 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:22 "OBJECT ID CACHE: "
    17:02:27 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:27 "OBJECT ID CACHE: "
    17:02:32 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:32 "OBJECT ID CACHE: "
    17:02:37 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:37 "OBJECT ID CACHE: "
    17:02:42 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:42 "OBJECT ID CACHE: "
    17:02:47 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:47 "OBJECT ID CACHE: "
    17:02:52 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:52 "OBJECT ID CACHE: "
    17:02:57 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:02:57 "OBJECT ID CACHE: "
    17:03:02 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:03:02 "OBJECT ID CACHE: "
    17:03:07 Warning Message: Script cache\objects\1145551134120785.sqf not found
    17:03:07 "OBJECT ID CACHE: "
    
    

    I created a while loop around the part in publish_vehicles2.sqf to give it the chance to try again.

    On the file system the file is there:

    -rw-r--r-- 1 dayzepoch users 14 Apr 19 17:01 cache/objects/1145551134120785.sqf
    

    I thought maybe it takes a bit until it's available but it has been created at 17:01 but the dump.log shows that server_publishVehicles2.sqf does not find it still at 17:03.

     

    It is always the first car I buy which does not work. The next one I buy spawns.

    17:01:34 "CHILD:308:11:SUV_Blue:0:3705:[7,[11455.5,11341.2,0]]:[]:[]:1:1145551134120617:"
    17:01:34 "JAHAN Test publishVehicle2"
    17:01:34 "LOAD OBJECT ID: cache\objects\1145551134120617.sqf"
    17:01:34 "OBJECT ID CACHE: ["PASS","673"]"
    

    What could be the reason here? Any idea?

  9. @FragZ: for the next time something like this happens:

     

    "In my RPT I get this:   ErrorMessage: File mpmissions\__cur_mp.chernarus\mission.sqm, line 1470: /Mission/: Missing '}'"

     

    In file mission.sqm, line 1470 there is a } missing. As 1470 is the end of your file it's a good start to try if it's missing there ;))

     

    That does NOT mean that it is really missing there from the logic you may want to achieve...it could also be missing somewhere before. But at least the message shows you clearly that 1 open bracket still needs to be closed which has not been done until the end of the file. Instead of one } missing it could also be one { too much somewhere (type or something).

  10. As far as have seen in the list there was one example program which does this via a web page. I just wanted to point out that HE could search (e.g. in google) for something like this which should be easy to find (if someone wants to invest a few minutes). Took me 5 seconds. With searching a bit longer you should find that. I guess this is a problem which people have not only in Arma/dayz/epoch, right?

  11. I also had some issues and it took me 2 weeks until understood how that works. But I never had a windows server before to know how the file structure needs to be (which files from arma2/oa goes where). But in some posts here devd explained it. The most difficult part for me in the beginning was to understand that the linux version cannot use HIVE (which is obvious as this is provided by a dll which has not been compiled to a .so for linux). So I left out restarter.pl and writer.pl as I normally don't execute script I do not know what they are doing. ;) So the most important stuff has been missing for me.

     

    1.: if you add/change something additionally whatever that is, devd pointed out to execute tolower again. E.g a mission file.

    2.: if you donÄt know what these 4 or 5 commands mean, don't execute them !

    3.: as mentioned above that was also a problem for me. So you do NOT need any hive.ini or something as hive is not used or executed here.

     

    If you have a look into the installation posts where it is explained which files need to go where everything runs quite well.

  12. Should be possible via a trigger and maybe a separate table where the information about the donor players or whatever is placed.

    Trigger activates for a specific situation (new character created) and in the where clause it checks if the player is IN table donors or friends or something (or just a flag to be checked).

    I am not an expert writing that down from mind but with a bit of searching and trying it sounds possible to achieve. That's what triggers are used for.

  13. If you have mysql query logging or binary logging on you could maybe get some information what queries have been executed since a certain point in time. But that does not help in your example as for updates or deletes you will have no way of knowing what the previous data was.

     

    At least you will need a full backup.

     

    As far as I know with a backup you could go to a previous state of the db (let's say 4 hours ago) and with a log file (binary one...if you have something like that) you could execute the statements from the time the backup was made to the time you specify (e.g. 2 hours ago when your error happened). A redo of the queries so to say.

     

    Without a full backup the data is lost.

×
×
  • Create New...