js2k6 Posted July 13, 2014 Report Share Posted July 13, 2014 Hi everyone, Been trying to get this to work tonight and i've been having no luck. Basically I would like to be able to create an arena or a town, called in via .sqf that can only be manually called in by an admin. We use epoch admin tools on our server, my admintools main Reveal hidden contents _pathtotools = "admintools\tools\"; _pathtoweapon = "admintools\weaponkits\"; _pathtovehicles = "admintools\vehicles\"; _pathtocrates = "admintools\crates\"; _pathtogcam = "gcam\"; _pathtoevents = "admintools\events\"; _EXECscript1 = 'player execVM "'+_pathtotools+'%1"'; _EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"'; _EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"'; _EXECscript6 = '["%1"] execVM "admintools\crates\%2"'; _EXECscript7 = '[] execVM "'+_pathtogcam+'%1"'; _EXECscript8 = '[] execVM "'+_pathtoevents+'%1"'; if ((getPlayerUID player) in AdminList) then { // Admins epochmenustart = [ ["",true], ["-- Epoch Admin Tools (Level: Admin) --", [], "", -5, [["expression", ""]], "1", "0"], ["Admin Menu >>", [], "#USER:AdminMenu", -5, [["expression", ""]], "1", "1"], ["Base Destruction Menu >>", [], "#USER:BaseDestructionMenu", -5, [["expression", ""]], "1", "1"], ["Vehicle Menu >>",[],"#USER:VehicleMenu",-5,[["expression",""]],"1","1"], ["Crate Menu >>",[],"#USER:CrateMenu",-5,[["expression",""]],"1","1"], ["Epoch Menu >>", [], "#USER:EpochMenu", -5, [["expression", ""]], "1", "1"], ["Weapon Kits >>", [], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"], ["Skin Change Menu >>", [], "#USER:AdminSkinsMenu", -5, [["expression", ""]], "1", "1"], ["Weather/Time Menu (Local Only) >>", [], "#USER:WTMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ];}; if ((getPlayerUID player) in ModList) then { // Admin Level 3 epochmenustart = [ ["",true], ["-- Epoch Admin Tools (Level: Mod) --", [],"", -5, [["expression", ""]], "1", "0"], ["Mod Menu >>", [], "#USER:ModMenu", -5, [["expression", ""]], "1", "1"], ["Temporary Vehicle Menu >>", [], "#USER:VehicleTempMenu", -5, [["expression", ""]], "1", "1"], ["Skin Change Menu >>", [], "#USER:AdminSkinsMenu", -5, [["expression", ""]], "1", "1"], ["Epoch Menu >>", [], "#USER:EpochMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ];}; AdminMenu = [ ["",true], ["Admin Mode (F4 for options)",[],"", -5,[["expression",format[_EXECscript1,"AdminMode\adminMode.sqf"]]],"1","1"], ["Point to Repair Vehicle(Perm)",[],"", -5,[["expression", format[_EXECscript1,"PointToRepairPERM.sqf"]]], "1", "1"], ["Point to Delete Vehicle(Perm)",[],"", -5,[["expression",format[_EXECscript1,"DatabaseRemove.sqf"]]],"1","1"], ["Spectate player (F6 to cancel)",[],"", -5,[["expression", format[_EXECscript1,"spectate.sqf"]]], "1", "1"], ["Gcam Spectate (SPACE to cancel)",[],"", -5,[["expression", format[_EXECscript7,"gcam.sqf"]]], "1", "1"], ["Admin Events",[],"#USER:EventMenu", -5, [["expression", ""]], "1", "1"], // ["Safe Zone Create/Delete",[],"", -5, [["expression", format[_EXECscript1,"SafeZoneArea.sqf"]]], "1", "1"], ["Zombie Shield",[],"", -5,[["expression",format[_EXECscript1,"zombieshield.sqf"]]],"1","1"], ["Heal Players",[],"", -5, [["expression", format[_EXECscript1,"healp.sqf"]]], "1", "1"], ["Teleport Menu >>",[],"#USER:TeleportMenu", -5, [["expression", ""]], "1", "1"], ["Humanity Menu >>",[],"#USER:HumanityMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5,[["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ]; EventMenu = [ ["",true], ["Spawn arena",[],"", -5,[["expression",format[_EXECscript8,"spawnarena.sqf"]]],"1","1"], ["", [], "", -5,[["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ]; and for spawnarena.sqf I am using a NEAF addition (i believe i found this on opendayz) to test. Reveal hidden contents /////designed by Kaysio //// ////www.wtf-gaming.co.uk//// if (isServer) then { _vehicle_380 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12100.635, 12569.338, 0], [], 0, "CAN_COLLIDE"]; _vehicle_380 = _this; _this setPos [12100.635, 12569.338, 0]; }; _vehicle_382 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11966.431, 12683.047, -6.1035156e-005], [], 0, "CAN_COLLIDE"]; _vehicle_382 = _this; _this setPos [11966.431, 12683.047, -6.1035156e-005]; }; _vehicle_384 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11851.726, 12552.665, 1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_384 = _this; _this setPos [11851.726, 12552.665, 1.5258789e-005]; }; _vehicle_386 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11736.387, 12626.416, 0.00010681152], [], 0, "CAN_COLLIDE"]; _vehicle_386 = _this; _this setPos [11736.387, 12626.416, 0.00010681152]; }; _vehicle_388 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11819.036, 12875.924, 4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_388 = _this; _this setPos [11819.036, 12875.924, 4.5776367e-005]; }; _vehicle_390 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11983.392, 12845.282, 0.00036621094], [], 0, "CAN_COLLIDE"]; _vehicle_390 = _this; _this setPos [11983.392, 12845.282, 0.00036621094]; }; _vehicle_392 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12233.598, 12728.01, -7.6293945e-005], [], 0, "CAN_COLLIDE"]; _vehicle_392 = _this; _this setPos [12233.598, 12728.01, -7.6293945e-005]; }; _vehicle_396 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12485.223, 12496.386, 1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_396 = _this; _this setPos [12485.223, 12496.386, 1.5258789e-005]; }; _vehicle_398 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12323.729, 12525.42, 9.1552734e-005], [], 0, "CAN_COLLIDE"]; _vehicle_398 = _this; _this setPos [12323.729, 12525.42, 9.1552734e-005]; }; _vehicle_401 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [12420.183, 12525.501, 0.30738819], [], 0, "CAN_COLLIDE"]; _vehicle_401 = _this; _this setDir 201.46739; _this setPos [12420.183, 12525.501, 0.30738819]; }; _vehicle_402 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [11832.899, 12605.434, 0.34147725], [], 0, "CAN_COLLIDE"]; _vehicle_402 = _this; _this setDir -151.54301; _this setPos [11832.899, 12605.434, 0.34147725]; }; _vehicle_404 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [11787.47, 12626.987, 0.53515416], [], 0, "CAN_COLLIDE"]; _vehicle_404 = _this; _this setDir -151.54301; _this setPos [11787.47, 12626.987, 0.53515416]; }; _vehicle_407 = objNull; if (true) then { _this = createVehicle ["Land_Hangar_2", [11769.209, 12712.729, 0.045495406], [], 0, "CAN_COLLIDE"]; _vehicle_407 = _this; _this setDir -57.412174; _this setPos [11769.209, 12712.729, 0.045495406]; }; _vehicle_410 = objNull; if (true) then { _this = createVehicle ["Land_Hangar_2", [11786.715, 12739.886, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_410 = _this; _this setDir -57.412174; _this setPos [11786.715, 12739.886, -4.5776367e-005]; }; _vehicle_417 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12029.462, 12794.677], [], 0, "CAN_COLLIDE"]; _vehicle_417 = _this; _this setDir 109.36105; _this setPos [12029.462, 12794.677]; }; _vehicle_418 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12018.766, 12798.643, 0.017120361], [], 0, "CAN_COLLIDE"]; _vehicle_418 = _this; _this setDir 109.36105; _this setPos [12018.766, 12798.643, 0.017120361]; }; _vehicle_419 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12039.716, 12791.433, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_419 = _this; _this setDir 109.36105; _this setPos [12039.716, 12791.433, 3.0517578e-005]; }; _vehicle_420 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12050.875, 12787.522, 0.0040588379], [], 0, "CAN_COLLIDE"]; _vehicle_420 = _this; _this setDir 109.36105; _this setPos [12050.875, 12787.522, 0.0040588379]; }; _vehicle_421 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12008.31, 12802.476, 0.090209961], [], 0, "CAN_COLLIDE"]; _vehicle_421 = _this; _this setDir 109.36105; _this setPos [12008.31, 12802.476, 0.090209961]; }; _vehicle_516 = objNull; if (true) then { _this = createVehicle ["Mi8Wreck", [11845.093, 12697.941, 0], [], 0, "CAN_COLLIDE"]; _vehicle_516 = _this; _this setPos [11845.093, 12697.941, 0]; }; _vehicle_517 = objNull; if (true) then { _this = createVehicle ["HMMWVWreck", [11872.659, 12693.959, 0.00018310547], [], 0, "CAN_COLLIDE"]; _vehicle_517 = _this; _this setPos [11872.659, 12693.959, 0.00018310547]; }; _vehicle_518 = objNull; if (true) then { _this = createVehicle ["UralWreck", [11867.833, 12683.243, -6.1035156e-005], [], 0, "CAN_COLLIDE"]; _vehicle_518 = _this; _this setDir -119.30734; _this setPos [11867.833, 12683.243, -6.1035156e-005]; }; _vehicle_519 = objNull; if (true) then { _this = createVehicle ["C130J_wreck_EP1", [11815.34, 12795.93, 4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_519 = _this; _this setDir 111.2342; _this setPos [11815.34, 12795.93, 4.5776367e-005]; }; }; Menus all load fine, I try to execute the script. and nothing happens at all. how do i do this? Link to comment Share on other sites More sharing options...
0 Guest Posted July 13, 2014 Report Share Posted July 13, 2014 this needs to be executed serverside, if you want to trigger it you will have to do it using a publicvariable or something. you could try it like this: in your init.sqf in the if(isServer) then Area add: "SpawnArea" addPublicVariableEventHandler { [] execVM "spawnarea.sqf" }; //spawnarea needs to be located in the mission file, you could also call it like the traders are called through the dayz_server.pbo and add a areaspawn.sqf to your admin tools which includes: SpawnArea = true; publicVariableServer "SpawnArea"; you maybe also have to edit your publicvariable.txt and add at the end of your first uncommented line: !="SpawnArea" But all in all this is a wild guess and i dont really know if this will work ^^ Link to comment Share on other sites More sharing options...
0 js2k6 Posted July 13, 2014 Author Report Share Posted July 13, 2014 thank you, i'll give that a try. I thought it might have been because of the first line. So i tried changing the first line of spawnarena.sqf to be if (!isServer) then { didn't work either, then it was 2am. so I gave up for the night. I'll try creating some PV's tonight when i get home from work. thank you for the tip. Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted July 14, 2014 Report Share Posted July 14, 2014 On 7/13/2014 at 2:31 PM, js2k6 said: Hi everyone, Been trying to get this to work tonight and i've been having no luck. Basically I would like to be able to create an arena or a town, called in via .sqf that can only be manually called in by an admin. We use epoch admin tools on our server, my admintools main Reveal hidden contents _pathtotools = "admintools\tools\"; _pathtoweapon = "admintools\weaponkits\"; _pathtovehicles = "admintools\vehicles\"; _pathtocrates = "admintools\crates\"; _pathtogcam = "gcam\"; _pathtoevents = "admintools\events\"; _EXECscript1 = 'player execVM "'+_pathtotools+'%1"'; _EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"'; _EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"'; _EXECscript6 = '["%1"] execVM "admintools\crates\%2"'; _EXECscript7 = '[] execVM "'+_pathtogcam+'%1"'; _EXECscript8 = '[] execVM "'+_pathtoevents+'%1"'; if ((getPlayerUID player) in AdminList) then { // Admins epochmenustart = [ ["",true], ["-- Epoch Admin Tools (Level: Admin) --", [], "", -5, [["expression", ""]], "1", "0"], ["Admin Menu >>", [], "#USER:AdminMenu", -5, [["expression", ""]], "1", "1"], ["Base Destruction Menu >>", [], "#USER:BaseDestructionMenu", -5, [["expression", ""]], "1", "1"], ["Vehicle Menu >>",[],"#USER:VehicleMenu",-5,[["expression",""]],"1","1"], ["Crate Menu >>",[],"#USER:CrateMenu",-5,[["expression",""]],"1","1"], ["Epoch Menu >>", [], "#USER:EpochMenu", -5, [["expression", ""]], "1", "1"], ["Weapon Kits >>", [], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"], ["Skin Change Menu >>", [], "#USER:AdminSkinsMenu", -5, [["expression", ""]], "1", "1"], ["Weather/Time Menu (Local Only) >>", [], "#USER:WTMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ];}; if ((getPlayerUID player) in ModList) then { // Admin Level 3 epochmenustart = [ ["",true], ["-- Epoch Admin Tools (Level: Mod) --", [],"", -5, [["expression", ""]], "1", "0"], ["Mod Menu >>", [], "#USER:ModMenu", -5, [["expression", ""]], "1", "1"], ["Temporary Vehicle Menu >>", [], "#USER:VehicleTempMenu", -5, [["expression", ""]], "1", "1"], ["Skin Change Menu >>", [], "#USER:AdminSkinsMenu", -5, [["expression", ""]], "1", "1"], ["Epoch Menu >>", [], "#USER:EpochMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ];}; AdminMenu = [ ["",true], ["Admin Mode (F4 for options)",[],"", -5,[["expression",format[_EXECscript1,"AdminMode\adminMode.sqf"]]],"1","1"], ["Point to Repair Vehicle(Perm)",[],"", -5,[["expression", format[_EXECscript1,"PointToRepairPERM.sqf"]]], "1", "1"], ["Point to Delete Vehicle(Perm)",[],"", -5,[["expression",format[_EXECscript1,"DatabaseRemove.sqf"]]],"1","1"], ["Spectate player (F6 to cancel)",[],"", -5,[["expression", format[_EXECscript1,"spectate.sqf"]]], "1", "1"], ["Gcam Spectate (SPACE to cancel)",[],"", -5,[["expression", format[_EXECscript7,"gcam.sqf"]]], "1", "1"], ["Admin Events",[],"#USER:EventMenu", -5, [["expression", ""]], "1", "1"], // ["Safe Zone Create/Delete",[],"", -5, [["expression", format[_EXECscript1,"SafeZoneArea.sqf"]]], "1", "1"], ["Zombie Shield",[],"", -5,[["expression",format[_EXECscript1,"zombieshield.sqf"]]],"1","1"], ["Heal Players",[],"", -5, [["expression", format[_EXECscript1,"healp.sqf"]]], "1", "1"], ["Teleport Menu >>",[],"#USER:TeleportMenu", -5, [["expression", ""]], "1", "1"], ["Humanity Menu >>",[],"#USER:HumanityMenu", -5, [["expression", ""]], "1", "1"], ["", [], "", -5,[["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ]; EventMenu = [ ["",true], ["Spawn arena",[],"", -5,[["expression",format[_EXECscript8,"spawnarena.sqf"]]],"1","1"], ["", [], "", -5,[["expression", ""]], "1", "0"], ["Main Menu", [20], "#USER:epochmenustart", -5, [["expression", ""]], "1", "1"] ]; and for spawnarena.sqf I am using a NEAF addition (i believe i found this on opendayz) to test. Reveal hidden contents /////designed by Kaysio //// ////www.wtf-gaming.co.uk//// if (isServer) then { _vehicle_380 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12100.635, 12569.338, 0], [], 0, "CAN_COLLIDE"]; _vehicle_380 = _this; _this setPos [12100.635, 12569.338, 0]; }; _vehicle_382 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11966.431, 12683.047, -6.1035156e-005], [], 0, "CAN_COLLIDE"]; _vehicle_382 = _this; _this setPos [11966.431, 12683.047, -6.1035156e-005]; }; _vehicle_384 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11851.726, 12552.665, 1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_384 = _this; _this setPos [11851.726, 12552.665, 1.5258789e-005]; }; _vehicle_386 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11736.387, 12626.416, 0.00010681152], [], 0, "CAN_COLLIDE"]; _vehicle_386 = _this; _this setPos [11736.387, 12626.416, 0.00010681152]; }; _vehicle_388 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11819.036, 12875.924, 4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_388 = _this; _this setPos [11819.036, 12875.924, 4.5776367e-005]; }; _vehicle_390 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [11983.392, 12845.282, 0.00036621094], [], 0, "CAN_COLLIDE"]; _vehicle_390 = _this; _this setPos [11983.392, 12845.282, 0.00036621094]; }; _vehicle_392 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12233.598, 12728.01, -7.6293945e-005], [], 0, "CAN_COLLIDE"]; _vehicle_392 = _this; _this setPos [12233.598, 12728.01, -7.6293945e-005]; }; _vehicle_396 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12485.223, 12496.386, 1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_396 = _this; _this setPos [12485.223, 12496.386, 1.5258789e-005]; }; _vehicle_398 = objNull; if (true) then { _this = createVehicle ["Land_Ind_IlluminantTower", [12323.729, 12525.42, 9.1552734e-005], [], 0, "CAN_COLLIDE"]; _vehicle_398 = _this; _this setPos [12323.729, 12525.42, 9.1552734e-005]; }; _vehicle_401 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [12420.183, 12525.501, 0.30738819], [], 0, "CAN_COLLIDE"]; _vehicle_401 = _this; _this setDir 201.46739; _this setPos [12420.183, 12525.501, 0.30738819]; }; _vehicle_402 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [11832.899, 12605.434, 0.34147725], [], 0, "CAN_COLLIDE"]; _vehicle_402 = _this; _this setDir -151.54301; _this setPos [11832.899, 12605.434, 0.34147725]; }; _vehicle_404 = objNull; if (true) then { _this = createVehicle ["Land_SS_hangar", [11787.47, 12626.987, 0.53515416], [], 0, "CAN_COLLIDE"]; _vehicle_404 = _this; _this setDir -151.54301; _this setPos [11787.47, 12626.987, 0.53515416]; }; _vehicle_407 = objNull; if (true) then { _this = createVehicle ["Land_Hangar_2", [11769.209, 12712.729, 0.045495406], [], 0, "CAN_COLLIDE"]; _vehicle_407 = _this; _this setDir -57.412174; _this setPos [11769.209, 12712.729, 0.045495406]; }; _vehicle_410 = objNull; if (true) then { _this = createVehicle ["Land_Hangar_2", [11786.715, 12739.886, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_410 = _this; _this setDir -57.412174; _this setPos [11786.715, 12739.886, -4.5776367e-005]; }; _vehicle_417 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12029.462, 12794.677], [], 0, "CAN_COLLIDE"]; _vehicle_417 = _this; _this setDir 109.36105; _this setPos [12029.462, 12794.677]; }; _vehicle_418 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12018.766, 12798.643, 0.017120361], [], 0, "CAN_COLLIDE"]; _vehicle_418 = _this; _this setDir 109.36105; _this setPos [12018.766, 12798.643, 0.017120361]; }; _vehicle_419 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12039.716, 12791.433, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_419 = _this; _this setDir 109.36105; _this setPos [12039.716, 12791.433, 3.0517578e-005]; }; _vehicle_420 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12050.875, 12787.522, 0.0040588379], [], 0, "CAN_COLLIDE"]; _vehicle_420 = _this; _this setDir 109.36105; _this setPos [12050.875, 12787.522, 0.0040588379]; }; _vehicle_421 = objNull; if (true) then { _this = createVehicle ["Land_Mil_Barracks_i", [12008.31, 12802.476, 0.090209961], [], 0, "CAN_COLLIDE"]; _vehicle_421 = _this; _this setDir 109.36105; _this setPos [12008.31, 12802.476, 0.090209961]; }; _vehicle_516 = objNull; if (true) then { _this = createVehicle ["Mi8Wreck", [11845.093, 12697.941, 0], [], 0, "CAN_COLLIDE"]; _vehicle_516 = _this; _this setPos [11845.093, 12697.941, 0]; }; _vehicle_517 = objNull; if (true) then { _this = createVehicle ["HMMWVWreck", [11872.659, 12693.959, 0.00018310547], [], 0, "CAN_COLLIDE"]; _vehicle_517 = _this; _this setPos [11872.659, 12693.959, 0.00018310547]; }; _vehicle_518 = objNull; if (true) then { _this = createVehicle ["UralWreck", [11867.833, 12683.243, -6.1035156e-005], [], 0, "CAN_COLLIDE"]; _vehicle_518 = _this; _this setDir -119.30734; _this setPos [11867.833, 12683.243, -6.1035156e-005]; }; _vehicle_519 = objNull; if (true) then { _this = createVehicle ["C130J_wreck_EP1", [11815.34, 12795.93, 4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_519 = _this; _this setDir 111.2342; _this setPos [11815.34, 12795.93, 4.5776367e-005]; }; }; Menus all load fine, I try to execute the script. and nothing happens at all. how do i do this? just remove the if(isServer and its closing bracket, and it will spawn from your admin menu. On 7/13/2014 at 6:06 PM, waTTe said: this needs to be executed serverside, if you want to trigger it you will have to do it using a publicvariable or something. you could try it like this: in your init.sqf in the if(isServer) then Area add: "SpawnArea" addPublicVariableEventHandler { [] execVM "spawnarea.sqf" }; //spawnarea needs to be located in the mission file, you could also call it like the traders are called through the dayz_server.pbo and add a areaspawn.sqf to your admin tools which includes: SpawnArea = true; publicVariableServer "SpawnArea"; you maybe also have to edit your publicvariable.txt and add at the end of your first uncommented line: !="SpawnArea" But all in all this is a wild guess and i dont really know if this will work ^^ this is unneeded ... the main reason that if is there, is so every client is not executing it and creating a set of buildings for each player logging in ... but since its not executed for each clients, its ok. potentially you could make a script that creates this exact area anywhere and just set positions and direction acording to where your admin player is currently placed. would be rather easy actually ... Link to comment Share on other sites More sharing options...
0 js2k6 Posted July 14, 2014 Author Report Share Posted July 14, 2014 On 7/14/2014 at 4:07 AM, Halvhjearne said: just remove the if(isServer and its closing bracket, and it will spawn from your admin menu. this is unneeded ... the main reason that if is there, is so every client is not executing it and creating a set of buildings for each player logging in ... but since its not executed for each clients, its ok. potentially you could make a script that creates this exact area anywhere and just set positions and direction acording to where your admin player is currently placed. would be rather easy actually ... So somewhat similar to the placement of objects in DZMS/WAI eg. _box = createVehicle ["RUBasicWeaponsBox",[(_position select 0) + 25,(_position select 1) + 15,0], [], 0, "CAN_COLLIDE"]; and _position would use my current position. I like this idea a lot. certainly would allow for things to be a lot more dynamic. Can't wait to go home and try this out. thanks halvhjearne. *edit* got it to work, was a little more involved than first anticipated. thanks for pointing me in the right direction. i've been able to create a couple of cool event type scenarios. wouldn't have been possible without your help. cheers :) Link to comment Share on other sites More sharing options...
Question
js2k6
Hi everyone,
Been trying to get this to work tonight and i've been having no luck.
Basically I would like to be able to create an arena or a town, called in via .sqf
that can only be manually called in by an admin.
We use epoch admin tools on our server,
my admintools main
and for spawnarena.sqf I am using a NEAF addition (i believe i found this on opendayz) to test.
Menus all load fine, I try to execute the script. and nothing happens at all.
how do i do this?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now