Sandbird Posted March 28, 2014 Report Share Posted March 28, 2014 So i figured it out how to do it....Manually start epoch events or any custom event you've made. There might be too much code to change in your files but i like to keep things tidy, thats why so many additions. Step 1 (editing your dayz_server.pbo) Extract your dayz_server.pbo and go to folder \dayz_server\compile\ Inside there make a new file called: server_adminspawnEvent.sqf and paste the following code inside private ["_date","_key","_result","_outcome","_datestr","_event"]; diag_log("MANUAL EPOCH EVENT INIT"); _event = _this select 0; _key = "CHILD:307:"; _result = _key call server_hiveReadWrite; _outcome = _result select 0; if(_outcome == "PASS") then { _date = _result select 1; _datestr = str(_date); diag_log ("RUNNING EVENT: " + (_event) + " on " + _datestr); [] execVM "\z\addons\dayz_server\modules\" + (_event) + ".sqf"; }; Open file: init\server_functions.sqf Under line: server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf"; add this: server_adminspawnEvent = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_adminspawnEvent.sqf"; Step 2 (editing your missionfile.pbo) Extract your missionfile and locate your publicEH.sqf then search for "PVDZE_maintainArea" addPublicVariableEventHandler {(_this select 1) spawn server_maintainArea}; under that add this: "PVDZE_spawnEvent" addPublicVariableEventHandler {(_this select 1) spawn server_adminspawnEvent}; Note: If you dont have publicEH.sqf (meaning you are not overwriting it....then open your compiles.sqf and add this line at the bottom INSIDE if (isServer) then { .... It should work there as well. If not post here. --------------------------------------------- Now make a new file in the root directory of your mission folder called superadmins.sqf (if you dont have something similar already). Inside there add the UIDs of your admins. The people allowed to run the events manually. Example code inside the superadmins.sqf: ["12312321313","232323232","1231231231","2323234","123123131","23232323"]; //An array of 6 admin UIDs --------------------------------------------- Now open your fn_selfactions.sqf. At the top after the first values are initiated ... (do it somewhere after _onLadder = ......) add this: _adminsList= call compile preProcessFileLineNumbers "superadmins.sqf"; if(("ItemMap_Debug" in items player) and ((getPlayerUID player) in _adminsList)) then { if (s_player_run_events < 0) then { s_player_run_events = player addaction [("<t color=""#0074E8"">" + ("Events Menu") +"</t>"),"custom\execute.sqf","",5,false,true,"",""]; }; } else { player removeAction s_player_run_events; s_player_run_events = -1; }; Now if are a control freak like me, you would like the script to be executed by admins, and also not to have the select Option in your face all the time. Thats why i added the if(("ItemMap_Debug" in items player)... So only if you have the Debug map in your inventory you will see the option to start an event. If you dont want this then change the second line above to this: if((getPlayerUID player) in _adminsList) then { -------------------------------------------- Now make a folder in your root mission folder called custom (or put the script wherever you want...just make sure you put the right path above in the addaction. Inside the folder make a new file called execute.sqf and add the following code: private ["_adminList"]; _adminList = call compile preProcessFileLineNumbers "superadmins.sqf"; // Recheck if player is allowed to run this if ((getPlayerUID player) in _adminList) then { adminmenu = [ ["",true], ["Supplyitems", [2], "", -5, [["expression", '["Supplyitems"] call SNDB_CALL']], "1", "1"], ["Treasure", [3], "", -5, [["expression", '["Treasure"] call SNDB_CALL']], "1", "1"], ["Sidemissions", [4], "", -5, [["expression", '["Sidemissions"] call SNDB_CALL']], "1", "1"], ["Construction", [5], "", -5, [["expression", '["Construction"] call SNDB_CALL']], "1", "1"], ["Military", [6], "", -5, [["expression", '["Military"] call SNDB_CALL']], "1", "1"], ["", [-1], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; }; showCommandingMenu "#USER:adminmenu"; SNDB_CALL = { DO_THIS = { PVDZE_spawnEvent = [_this select 0]; publicVariableServer "PVDZE_spawnEvent"; }; call DO_THIS; }; As you can see this is the menu. If you want to add/change/remove events you have to follow some rules. Notice the incremental number next to the Event names. (2,3,4,5,6) you have to follow that increment...First one must be 2, last one 12 (make a new page if you want more) You have to add the name of the event twice.....First is the menu option you'll see igame, and just before call SNDB_CALL is the name of the FILENAME of the event, located in your dayz_server\modules. Step 3 (Initializations and Antihack exceptions) Open your variables.sqf located somewhere in your mission folder. Search for dayz_resetSelfActions = { add this before the end of the last bracket : s_player_run_events = -1; ---------------------------------------------- If you are using infistar AH add these to your config file.....you know where :) ,s_player_run_events and also this : ,"#USER:adminmenu" This way, lower admins will be able to start events.... ----------------------------------------------------------- PS: Incase you are getting kicked like do this: (he has heavily modified his mission files, so do this only if you are getting kicked) If you get kicked for Publicvariable 3 then just place this !="PVDZE_spawnEvent" at the end of the 4th line Enjoy. SideShowFreak, TNT, Zupa and 1 other 4 Link to comment Share on other sites More sharing options...
Sandbird Posted March 28, 2014 Author Report Share Posted March 28, 2014 Well its for running events manually... But i guess you can tweak it to run anything peipo118 1 Link to comment Share on other sites More sharing options...
LawlessBaron Posted March 30, 2014 Report Share Posted March 30, 2014 where abouts do we add the? ,"#USER:adminmenu" i have infistar but not sure where to add this Link to comment Share on other sites More sharing options...
Sandbird Posted March 30, 2014 Author Report Share Posted March 30, 2014 For security reasons...i'll pm you LawlessBaron Link to comment Share on other sites More sharing options...
peipo118 Posted March 30, 2014 Report Share Posted March 30, 2014 Already did Sandbird ;) btw the public variable DZE_Spawnevent is an Epoch public variable i suppose (too lazy to check lol) Because if not there might be a BE exception to add still.... But i think it is one. You know what you are doing :D Link to comment Share on other sites More sharing options...
Sandbird Posted March 30, 2014 Author Report Share Posted March 30, 2014 Already did Sandbird ;) btw the public variable DZE_Spawnevent is an Epoch public variable i suppose (too lazy to check lol) Because if not there might be a BE exception to add still.... But i think it is one. You know what you are doing :D Nahhhh, i named it DZE_Spawnevent...there is no value like that. And no BE exceptions needed :) Link to comment Share on other sites More sharing options...
peipo118 Posted March 30, 2014 Report Share Posted March 30, 2014 BE exceptions are needed :P at least for me because i get kicked for public variable restriction 3 .. gonna add them and see if it works and if so will post the exact exception here Link to comment Share on other sites More sharing options...
Sandbird Posted March 30, 2014 Author Report Share Posted March 30, 2014 cool thanks, i'll add them in the top if you have them. Weird though that i didnt get any. I havent set myself as an admin in BEC either. Link to comment Share on other sites More sharing options...
peipo118 Posted March 30, 2014 Report Share Posted March 30, 2014 My BE files are quite heavily modified as i am doing a lot of stuff with public variables so i am not sure if i am completely up to date right now.. well i will tell you if i get it working ;) Link to comment Share on other sites More sharing options...
SideShowFreak Posted April 1, 2014 Report Share Posted April 1, 2014 If you get kicked for Publicvariable 3 then just place this !="PVDZE_spawnEvent" at the end of the 4th line ;) Link to comment Share on other sites More sharing options...
peipo118 Posted April 1, 2014 Report Share Posted April 1, 2014 exactly :P Link to comment Share on other sites More sharing options...
ruubje11 Posted April 3, 2014 Report Share Posted April 3, 2014 I love it, super useful, very good guide, thanks! Link to comment Share on other sites More sharing options...
NoxSicarius Posted April 25, 2014 Report Share Posted April 25, 2014 So if I wanted to use this to spawn a server event for changing server time I would set it up the same but instead of creating an execute.sqf I could use a different file and do PVDZE_spawnEvent = setDate [2012,6,6,0,0]; publicVariableServer "PVDZE_spawnEvent"; Just want to be 100% sure before I write out all this code since I don't have a way to test it at the moment. Link to comment Share on other sites More sharing options...
TylerHumor Posted December 28, 2014 Report Share Posted December 28, 2014 For security reasons...i'll pm you LawlessBaron Could you help me out too? I did everything exactly as stated, except the AH.sqf was a guess. Link to comment Share on other sites More sharing options...
Sandbird Posted December 29, 2014 Author Report Share Posted December 29, 2014 Could you help me out too? I did everything exactly as stated, except the AH.sqf was a guess. The ah addition is basically the #USER:adminmenu, to be added where the rest of the #USER menus are in the config file. What seems to be the problem ? You are not saying. Log files ? any errors ? Link to comment Share on other sites More sharing options...
TylerHumor Posted December 30, 2014 Report Share Posted December 30, 2014 I only have access to the server RPT log which doesn't really tell me much since the server started up fine, but the menu never popped up. (Had the debugmap in inventory) Reall sorry for pasting large text, but this is where I put the two pieces of code: /* ALLOWED Actions "_dayzActions" are only used if you have "_CSA = true;" */ _dayzActions = [ // s_player_servermenu,s_player_servermenu1,s_player_servermenu2,s_player_servermenu3,s_player_servermenu4,s_player_servermenuCancel,s_player_run_events "DonorSkins","wardrobe","s_player_maintain_area","s_player_maintain_area_preview","BTC_SganciaActionId","BTC_liftActionId","BTC_liftHudId","dayz_myLiftVehicle","s_player_heli_detach", "dayz_myCursorTarget","s_player_craftZombieBait","s_player_butcher_human","s_player_makeBomb","s_player_zombieShield","s_player_upgrademoto", "s_player_smeltRecipes","null","churchie_check","churchie_defuse","churchie_rig_veh","player_Cannibalism","s_player_fillfuel210","s_player_knockout","s_player_upgradegyro","ActionMenu", "manatee_craft_menu","manatee_craft_menu_wea","manatee_craft_menu_sur","manatee_craft_menu_ind","s_player_craftZombieBaitBomb","horror_traders","s_player_takeOwnership","s_siphon","s_player_suicide", "silver_myCursorTarget","stow_vehicle","menu_Worker2","neutral","menu_RU_Citizen1","menu_RU_Citizen4","menu_TK_CIV_Takistani04_EP1","menu_RU_Villager3","menu_RU_Functionary1","menu_Doctor", "menu_Dr_Hladik_EP1","menu_Profiteer4","menu_Worker3","menu_Pilot_EP1","menu_RU_Citizen3","menu_CIV_EuroMan02_EP1","menu_Rita_Ensler_EP1","menu_RU_WorkWoman5","menu_RU_WorkWoman1", "menu_Woodlander1","menu_Woodlander3","menu_Rocker4","menu_CIV_EuroMan01_EP1","Tow_settings_action_heliporter","Tow_settings_action_heliport_larguer", "Tow_settings_action_deplacer_objet","Tow_settings_action_relacher_objet","Tow_settings_action_selectionner_objet_charge","Tow_settings_action_charger_selection", "Tow_settings_action_charger_deplace","Tow_settings_action_selectionner_objet_remorque","Tow_settings_action_remorquer_selection","Tow_settings_action_remorquer_deplace", "Tow_settings_action_detacher","Tow_settings_action_contenu_vehicule","Tow_settings_dlg_CV_titre","Tow_settings_dlg_CV_btn_decharger","Tow_settings_dlg_CV_btn_fermer", "s_player_makePLBomb","s_player_stats","s_player_deploybike","s_player_packbike","s_player_deploygyro","s_player_upgradebike","nul", "s_player_equip_carry","s_player_showname","s_player_showname1","s_player_smeltItems","s_building_snapping","s_player_downgrade_build", "s_player_debug","s_player_calldog","s_player_speeddog","s_player_movedog","s_player_followdog","s_player_warndog","s_player_barkdog","s_player_trackdog", "s_player_staydog","s_player_waterdog","s_player_feeddog","s_player_tamedog","s_player_repair_crtl","s_player_towing", "s_player_fillgen","s_player_maint_build","s_player_fuelauto2","s_player_fuelauto","s_player_information", "s_player_upgrade_build","s_player_packvault","s_player_unlockvault","s_player_checkGear", "s_player_lockUnlock_crtl","s_player_deleteBuild","s_player_pzombiesfeed","s_player_pzombiesattack", "s_player_pzombiesvision","s_player_callzombies","s_player_removeflare","s_player_fishing_veh", "s_player_forceSave","s_player_fillfuel20","s_player_fillfuel5","s_player_lockvault","s_player_dragbody", "s_player_packFdp","s_player_otkdv","s_player_isCruse","s_player_cnbb","bis_fnc_halo_action", "s_player_rest","s_player_flipvehiclelight","s_player_flipvehicleheavy","s_player_1bupd", "s_halo_action","s_player_smelt_scrapmetal","s_player_grabflare","s_player_fishing", "s_player_smelt_engineparts","s_player_smelt_fueltank","s_player_smelt_windscreenglass", "s_player_smelt_mainrotoraryparts","s_player_smelt_wheel","s_player_smelt_jerrycan","s_player_siphonfuel", "s_player_flipveh","s_player_fillfuel","s_player_dropflare","s_player_butcher","s_player_cook", "s_player_boil","s_player_fireout","s_player_packtent","s_player_sleep","s_player_studybody", "NORRN_dropAction","s_player_selfBloodbag","s_clothes","s_player_holderPickup","s_player_gather", "s_player_recipeMenu","s_player_deleteCamoNet","s_player_netCodeObject","s_player_codeRemoveNet", "s_player_enterCode","s_player_codeObject","s_player_codeRemove","s_player_disarmBomb", "unpackRavenAct","disassembleRavenAct","launchRavenAct","strobeRavenResetAct","strobeRavenTestAct", "batteryLevelCheckRavenAct","batteryRechargeRavenAct","mavBaseStationActionName_00","mavBaseStationActionName_001", "mavBaseStationActionName_01","mavBaseStationActionName_02","mavBaseStationActionName_03","mavBaseStationActionName_04", "s_player_dance","s_player_igniteTent","s_player_clothes","s_player_scrollBandage", "STR_R3F_LOG_action_heliporter","STR_R3F_LOG_action_heliport_larguer","s_vehicle_lockUnlock_crtl", "STR_R3F_LOG_action_relacher_objet","STR_R3F_LOG_action_deplacer_objet","STR_R3F_LOG_action_remorquer_deplace", "STR_R3F_LOG_action_selectionner_objet_remorque","STR_R3F_LOG_action_detacher","STR_R3F_LOG_action_charger_deplace", "STR_R3F_LOG_action_selectionner_objet_charge","STR_R3F_LOG_action_remorquer_selection","STR_R3F_LOG_action_charger_selection", "STR_R3F_LOG_action_contenu_vehicule","STR_R3F_ARTY_action_ouvrir_dlg_SM", "s_player_removeActions","s_player_repairActions","r_player_actions","r_player_actions2","s_player_parts","s_player_combi","s_player_parts", "s_player_lockunlock","s_vehicle_lockunlock","s_player_toggleSnap","s_player_toggleSnapSelect","s_player_toggleSnapSelectPoint", "s_player_evacCall","s_player_makeEvacChopper","s_player_clearEvacChopper", "s_player_deploybike2","s_player_deploymoped","s_player_deploymoped2","s_player_deploymozzie","s_player_deploymozzie2","#USER:adminmenu" ]; Link to comment Share on other sites More sharing options...
Tricks Posted December 30, 2014 Report Share Posted December 30, 2014 edit your post and add: [ spoiler] [ /spoiler] at the beginning and end of your post, no spaces. Link to comment Share on other sites More sharing options...
TylerHumor Posted December 30, 2014 Report Share Posted December 30, 2014 edit your post and add: [ /spoiler] at the beginning and end of your post, no spaces. Link to comment Share on other sites More sharing options...
copper Posted January 30, 2015 Report Share Posted January 30, 2015 Hi! I know this is a bit older already but it seems to be a very usefull script. But I want to ask if it would be possible to call the superadmin.sqf in a way so you can place it rather in the Server root Directory (like infistar does) or into the serverfile. Because Iam a bit worried to put all the UIDs into the Mission file where everybody could get them who connect to the Server and download the Mission file. Link to comment Share on other sites More sharing options...
Sandbird Posted January 30, 2015 Author Report Share Posted January 30, 2015 Hi! I know this is a bit older already but it seems to be a very usefull script. But I want to ask if it would be possible to call the superadmin.sqf in a way so you can place it rather in the Server root Directory (like infistar does) or into the serverfile. Because Iam a bit worried to put all the UIDs into the Mission file where everybody could get them who connect to the Server and download the Mission file. In your dayz_server.pbo files open server_function.sqf under waituntill put: superadmins = ["xxxxxx","xxxxxx"]; //where xxx are the guids publicVariable "superadmins"; remove all the variables like : _adminsList= call compile preProcessFileLineNumbers "superadmins.sqf"; and then instead of using: if((getPlayerUID player) in _adminsList) then { do: if ((getPlayerUID player) in superadmins) then { where _adminsList has been replaced by the superadmins public variable coming from server_functions.sqf done. Buck0 1 Link to comment Share on other sites More sharing options...
copper Posted January 30, 2015 Report Share Posted January 30, 2015 Super!! Thank you very much!! This will let me feel much more secure using this nice adition. Respect!! Link to comment Share on other sites More sharing options...
ElDubya Posted February 13, 2015 Report Share Posted February 13, 2015 Ok, I don't know what's going on. I have installed this EXACTLY as it says, done every step. I get the "Events Menu", then when I click that I get the list of events I have in my modules folder. When I select one and click ...... nothing happens. No message, no event .... Nothing. There are NO errors in either my serverside or clientside .rpt's ... It just .... does nothing. What am I missing here? My execute.sqf private ["_adminList"]; _adminList = call compile preProcessFileLineNumbers "superadmins.sqf"; // Recheck if player is allowed to run this if ((getPlayerUID player) in _adminList) then { adminmenu = [ ["",true], ["Supplyitems", [2], "", -5, [["expression", '["Supplyitems"] call SNDB_CALL']], "1", "1"], ["Treasure", [3], "", -5, [["expression", '["Treasure"] call SNDB_CALL']], "1", "1"], ["Sidemissions", [4], "", -5, [["expression", '["Sidemissions"] call SNDB_CALL']], "1", "1"], ["Construction", [5], "", -5, [["expression", '["Construction"] call SNDB_CALL']], "1", "1"], ["Military 1", [6], "", -5, [["expression", '["Military"] call SNDB_CALL']], "1", "1"], ["Building", [7], "", -5, [["expression", '["building_supplies"] call SNDB_CALL']], "1", "1"], ["Medical", [8], "", -5, [["expression", '["medical_supplies"] call SNDB_CALL']], "1", "1"], ["Military 2", [6], "", -5, [["expression", '["military_supplies"] call SNDB_CALL']], "1", "1"], ["", [-1], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; }; showCommandingMenu "#USER:adminmenu"; SNDB_CALL = { DO_THIS = { PVDZE_spawnEvent = [_this select 0]; publicVariableServer "PVDZE_spawnEvent"; }; call DO_THIS; }; I have made the necessary additions to my AH.sqf. I am using maca's remote message script too. I have the following in my modules folder : building_supplies.sqf Construction.sqf crash_spawner.sqf drop_bombs.sqf medical_supplies.sqf Military.sqf military_supplies.sqf supply_drop.sqf Supplyitems.sqf Treasure.sqf As you can see, I don't want to be able to call all of them manually, just the ones in my execute.sqf file. And again, there are NO ERRORS in either .rpt. I am using these 4 events : and these 3 : page-4#entry31446 Link to comment Share on other sites More sharing options...
Sandbird Posted February 13, 2015 Author Report Share Posted February 13, 2015 Ok, I don't know what's going on. I have installed this EXACTLY as it says, done every step. I get the "Events Menu", then when I click that I get the list of events I have in my modules folder. When I select one and click ...... nothing happens. No message, no event .... Nothing. You created the server_adminspawnEvent.sqf in the dayz_server files and added the sqf in the server_functions.sqf right? And also added the line in your publicEH.sqf: "PVDZE_spawnEvent" addPublicVariableEventHandler {(_this select 1) spawn server_adminspawnEvent}; It seems to me that the command is not sent to the server...thats why there is no error in the logs. Also....maybe there is another event running at that moment ? Thats why 'yours' is not firing up ? Try changing the server_adminspawnEvent.sqf to this: private ["_event"]; diag_log("MANUAL EPOCH EVENT INIT"); _event = _this select 0; diag_log ("RUNNING EVENT: " + (_event)); [] execVM "\z\addons\dayz_server\modules\" + (_event) + ".sqf"; This will run the event no mater what. Link to comment Share on other sites More sharing options...
ElDubya Posted February 13, 2015 Report Share Posted February 13, 2015 Got it sorted finally Sandbird, cheers. Sandbird 1 Link to comment Share on other sites More sharing options...
ElDubya Posted February 15, 2015 Report Share Posted February 15, 2015 Guys, I have made a few things (racetrack, tank sumo arena) specifically for this script so I can call them at any time from the modules folder. What I was wanting to know was : A. Is there anyway to "clean them up" before a server reset? B. If I use the Winchester FARP sign, where do I put the associated pictures that I want displayed on them? I have tried putting the pictures in the modules folder and the mission root, no dice? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now