Jump to content


Popular Content

Showing content with the highest reputation on 04/05/14 in all areas

  1. 2 points
    I created a MySQL trigger that will update a characters plot pole with their new CharacterID once they die. In MySQL Workbench CE connect to your mysql server. open the dayz_epoch db right click on character_data and select 'Alter Table' click on the Triggers tab at the bottom. Select After Insert from the list and click Add Trigger Replace the generated code with the below and select Apply DELIMITER $$ DROP TRIGGER IF EXISTS dayz_epoch.`character_data_AINS_plot`; CREATE TRIGGER `dayz_epoch.character_data_AINS_plot` AFTER INSERT ON dayz_epoch.character_data FOR EACH ROW -- Edit trigger body code below this line. Do not edit lines above this one BEGIN DECLARE oldCharacterID INT; SELECT CharacterID INTO oldCharacterID FROM dayz_epoch.character_data WHERE PlayerUID = new.PlayerUID AND Alive = '0' ORDER BY CharacterID Desc LIMIT 1; IF (oldCharacterID IS NOT NULL) THEN UPDATE dayz_epoch.object_data SET CharacterID = new.CharacterID WHERE Classname = 'Plastic_Pole_EP1_DZ' AND CharacterID = oldCharacterID; END IF; END My next attempt will be to have the characters buildables follow them as well so that they can remove their walls and what not. What this does sets the players previous plot pole from their old characterID to their new characterID when they rejoin and select a new character. UPDATE: In addition to the above I have written scripts so that you do NOT have to restart the server... I have tested these and have worked for me. Unpack your dayz_server.pbo file and open compile/server_playerLogin.sqf. find dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected]; at the bottom and just before this line add if (_isNew) then { diag_log format["Player %1 Character %2 is NEW", _playerID, _charID]; [_charID, _playerID, _playerObj] call server_changePlotsOwner; }; open server_functions.sqf and add DeadPlayerPlotObjects = []; just above BIS_Effects_Burn = {}; now find server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf"; and add this code just below it server_changePlotsOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_changePlotsOwner.sqf"; open server_playerDied.sqf find: _newObject setVariable["processedDeath",diag_tickTime]; if (typeName _minutes == "STRING") then { _minutes = parseNumber _minutes; }; diag_log ("PDEATH: Player Died " + _playerID); and add the below code just above it _allPoleObjs = allMissionObjects "Plastic_Pole_EP1_DZ"; _playerOwnedPlots = []; diag_log format["Running pole stuff for char %1", _characterID]; diag_log format["All Poles: %1", _allPoleObjs]; { diag_log format["Pole: %1",_x]; _ownerID = _x getVariable["CharacterID","0"]; diag_log format["Owner of pole: %1", _ownerID]; if (_ownerID == _characterID) then { diag_log format["Owner: %1 == Char: %2", _ownerID, _characterID]; _playerOwnedPlots set [(count _playerOwnedPlots), _x]; }; } forEach (_allPoleObjs); diag_log format["Player owned plots: %1", _playerOwnedPlots]; _player_death_object_record = [ _characterID, _playerID, _playerOwnedPlots ]; diag_log format["Player death records: %1", _player_death_object_record]; DeadPlayerPlotObjects set [(count DeadPlayerPlotObjects), _player_death_object_record]; diag_log format["DeadPlayerObjects: %1", DeadPlayerPlotObjects]; now create a new file in the /compile folder called server_changePlotsOwner.sqf and add private ["_charID", "_playerID", "_playerObj", "_oldCharID", "_playaID", "_plots", "_removePlayerObjects", "_loc", "_dir", "_objCharID", "_classname", "_obj"]; _charID = _this select 0; _playerID = _this select 1; _playerObj = _this select 2; //Check if player had any plots diag_log ("Hello New player"); diag_log format["Your ID: %1 - %2 - %3", _playerID, _playerObj, _charID]; diag_log DeadPlayerPlotObjects; diag_log format["Dead players count: %1", (count DeadPlayerPlotObjects)]; { diag_log format["player object found: %1",_x]; _oldCharID = _x select 0; _playaID = _x select 1; _plots = _x select 2; diag_log format["Old Character: %1 PlayerID: %2 Plots: %3", _oldCharID, _playaID, _plots]; if (count _plots > 0) then { if (_playaID == _playerID) then { // User was found { // assign plots to new character diag_log format["Type: %1", typeOf _x]; _x setVariable ["CharacterID", _charID, true]; diag_log format["Plot %1 is now owned by %2", _x, _x getVariable ["CharacterID","0"]]; } forEach (_plots); _removePlayerObjects set [count _removePlayerObjects, _x]; }; }; } forEach (DeadPlayerPlotObjects); DeadPlayerPlotObjects = DeadPlayerPlotObjects - _removePlayerObjects; Thats it... feel free to remove the diag_log lines if you want. Now save all the files and repack your dayz_server.pbo file. I'm trying to get object swapping to work so that there is no need for the database triggers but having issues with that part. For now the above works fine
  2. 1 point

    Pavlovo prison

    Here is a prison I made west of Pavlovo !!!WARNING!!! this is untested. Here is a link to the image album:http://imgur.com/a/ndsfK File:https://www.dropbox.com/sh/fwg23ajmhrdpw8s/uHQsrZ1acT/pavlovo_prison.sqf Don't drop the soap.
  3. 1 point
    I TAKE NO CREDIT FOR THE ORIGINAL SCRIPT WHICH CAN BE FOUND HERE All I have done is change the spawn locations so that it can be used with the new NAPF map. 1. Place Scripts\Newspawn\ folder in the root of your mission file. 2. At the bottom of init.sqf add this: p2_newspawn = compile preprocessFileLineNumbers "Scripts\Newspawn\newspawn_execute.sqf"; waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; if (dayzPlayerLogin2 select 2) then { player spawn p2_newspawn; }; 3. In dayz_server\compile\server_playerSetup.sqf Find this line: dayzPlayerLogin2 = [_worldspace,_state]; Replace with: dayzPlayerLogin2 = [_worldspace,_state,_randomSpot]; Disable Anti-TP: 1. Open init.sqf and remove this line: [] execVM "\z\addons\dayz_code\system\antihack.sqf"; If you are using antihax: 1. Find: _cMenu = ['','RscMainMenu','RscMoveHigh','#WATCH', ...]; 2. Add the command menu names you are using. Here are the default names used: '#USER:newspawn','#USER:classes','#USER:Page4','#USER:Donator','#USER:Peasant' Also make sure block all command menus is false:​ BLOCK ALL CMDMenus */ _BCM = false; Download
  4. 1 point
    EDIT: Although I did search the forums first and not find the answer, I THINK I've found it here - Testing now! EDIT 2: ^^^ That link and the answer below by MrAlfred solved it :D Hey all :) So I want to run a 2nd instance of Chernarus, NOT using the same DB - entirely isolated, different server files etc) Here's what I've done in prep: Made a new instance folder with battleye/BEC etc Made a new @dayz_epoch_server folder, called '@DayZ_Epoch_Server_V2' which has the server pbo > Edited the folder name of the mission file folder that sits within the server PBO Made a new mission side folder (in MPMissions) Edited init.sqf and BEC config to reflect the new instance Made a new MySQL database and added the stock SQL Edited the hive.ini to reflect the new MySQL DB name My question: Currently I reboot my single instance by a batch file called from the BEC scheduler that: Checks for 'arma2oaserver.exe' and kills the process if it finds it running (after several in-game warnings of course!) Checks if MySQL is running & reboots it if it is Checks if BEC is running and reboots that too Now, what I'm worried about is that this method may kill all servers running AND MySQL - effecting both servers AND BEC - effecting both servers - or even the wrong server :S What would be the best method to be able to reboot each server instance individually? :D Thanks in advance! Mike.
  5. 1 point

    How To Remove OverBurden?

    All you have to do now is add this near the top of init.sqf: DZE_R3F_WEIGHT = false; Example: // DayZ Epoch config spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 MaxVehicleLimit = 300; // Default = 50 MaxDynamicDebris = 500; // Default = 100 dayz_MapArea = 14000; // Default = 10000 dayz_maxLocalZombies = 15; // Default = 30 DZE_requireplot = 0; dayz_paraSpawn = false; dayz_minpos = -1; dayz_maxpos = 16000; dayz_sellDistance_vehicle = 10; dayz_sellDistance_boat = 30; dayz_sellDistance_air = 40; dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 DZE_BuildOnRoads = true; // Default: False DZE_StaticConstructionCount = 1; //Fast Building DZE_R3F_WEIGHT = false;
  6. 1 point

    How to place a villa on chernarus?

    It worked thank you very much! That is what I was planning to do.
  7. 1 point
  8. 1 point

    Respawn glitch

  9. 1 point
    That would be relatively easy:
  10. 1 point

    Server Auto-restart issue

    all you would essentially stop is the empty cmd prompt :) the higher the value, could effect server performance (I.E. lower performance if you set it too high) :)
  11. 1 point

    Server is running an Incorrect Version

    There's a read me file? I can honestly say I have never read it lol
  12. 1 point

    Server Auto-restart issue

    This is because of your IRPStackSize is set too low, or not set at all, in which case it defaults to an accepable value for everyday tasks. :) NOTE: Changing this value may effect your system performance. Here's a MicroSoft KB article on it: http://support.microsoft.com/kb/106167 If you change or modify it, and it breaks your server, dont blame me. :rolleyes: :ph34r:
  13. 1 point

    Napf - Road, Town and Brige

    Nice gonna use this
  14. 1 point
    Thats the problem. You need to edit the .sqf and change it so you remove the ai, center, group. and then you add this at the top: if (isServer) then { and then at the bottom, remove the last three lines and add this: }; Then in the init near the bottom add this: [] execVM "Buildings\(Name Goes Here).sqf"; And then make a folder called "Buildings" and add the .sqf into that folder
  15. 1 point

    Creating a custom compiles.sqf

    It works just fine, bro. Try posting more information about your erroneous attempts and someone may be able to fix it for you.
  • Create New...