Jump to content

Silens

Member
  • Posts

    28
  • Joined

  • Last visited

Posts posted by Silens

  1. We use auto initialization (-autoInit in launch parameters), mission is loaded right after server initializes. Far as I know can't lock a server any earlier before it is initialized and loaded (this is the reason why the script waits for epoch to start, to prevent sending the lock command too early).

    How does it slow down loading?

    I would like to see the full log if you don't mind, so I can see the epoch loading messages, maybe it can be improved.

     

    Here's one of our logs, the database is 11MB, not sure how many objects:

    19:17:12 "Epoch: Init Compiles"
    19:17:12 "SERVER LOCK: Loaded."
    19:17:12 "Epoch: Starting ArmA3 Epoch Server, Version 0.3.0.3"
    19:17:12 "Epoch: Init Variables"
    19:17:12 "Loading config..."
    19:17:13 "Epoch: Start Hive, Instance ID: 'Server1'"
    19:17:13 "Epoch: Init PublicEH"
    19:17:13 "Epoch: Setup Side Settings"
    19:17:13 "Epoch: Setup World Settings for Altis"
    19:17:13 "Epoch: Set Weather"
    19:17:13 Weather was forced to change
    19:17:13 "Weather Change: fog: [0.0531277,0.0928229,15.0535] rain: 0.431991 overcast: 0.508046 windx: 3.9044 windz: -5.88424 forced: true"
    19:17:13 Successfull attempt to execute serverCommand '#lock' by server.
    19:17:13 "Epoch: Loading buildings"
    19:17:15 "Epoch: Loading teleports and static props"
    19:17:16 "Epoch: Loading NPC traders"
    19:17:20 "Epoch: Spawning NPC traders"
    19:17:20 "Epoch: Loading vehicles"
    19:17:23 "VEH SPAWN TIMER 2.215"
    19:17:23 "Epoch: Spawning vehicles"
    19:17:23 "Epoch: Loading storage"
    19:17:26 "Storage SPAWN TIMER 3.512"
    19:17:26 "Epoch: Loading static loot"
    19:17:26 "Epoch: Server Start Complete: 14.038 seconds"
    19:17:26 "Loaded Server FSM"
    19:17:26 Successfull attempt to execute serverCommand '#unlock' by server.
  2. Here is the script: https://github.com/Silens1/autolock

    Just place autolock.pbo and autolock_config.sqf in your @epochhive/addons folder. Then setup your password (serverCommandPassword) in your server config file (sc/config.cfg) and set the same password in autolock_config.sqf.

     

     

    thanks for the extra info. Am not currently using these.
    I have not experienced any issues leaving it open from the start, what did you guys notice to implement this?

     

    Players would get constantly timed out during the loading process for "server not ready" during loading time which can be minutes depending on database size or if redis is restarted. We also had 50+ players trying to simultaneously join at peak times after restarts which seemed to slow down the loading process even more. After adding this, once the server is loaded and unlocked, players can get in right away without delays (other than waiting for the server to unlock of course).

  3. Cavadus, you need to add the modified CfgPricing file in the mission folder, it needs to be in the mission folder for the clients to load. Modifiying the one in the server files does nothing.

    Our server has additional vehicles and they only became spawnable for the admins once we added them to our CfgPricing file in the mission folder.

    * For some odd reason the admin menu spawn items are linked to this

  4. Suspending not allowed in this context

     

    You cannot use sleep, uisleep, or waituntil in a nonscheduled environment, KillZoneKid:Arma Scripting Tutorials: Code Performance

     

    fn_init.sqf

    diag_log format ["Starting Custom Addons PBO"];
    
    [] spawn {
    		waitUntil {uiSleep 0.2;(count playableUnits) >= 2;};
    		call compile preprocessFileLineNumbers "\x\addons\a3_custom_crates\content\fn_random_crateLoot.sqf";
    		diag_log format ["Starting fn_random_crateLoot, player count: %1",(count playableUnits)];
    	};
    
  5. The vehicles don't spawn after restart because epoch doesn't get the number of vehicles from the database. What it does is get the vehicle limit from your allowedvehicleslist in epochconfig, so if you have 100 vehicles there, it will only spawn vehicles 1-100 from the database, it doesn't know about your other vehicles in the database.

  6. Using a custom CfgPricing file and removing the vehicles should do it.

     

    No vehicles CfgPricing:

    class CfgPricing { 
    	//Default Epoch
    	class ChainSaw {price = 125;};
    	class CircuitParts {price = 50;};
    	class ItemCoolerE {price = 50;};
    	class JackKit {price = 25;};
    	class ItemLockbox {price = 250; tax = 0.5;};
    	class ItemCompass {price = 3;};
    	class ItemGPS {price = 20;};
    
    	// Radios
    	class EpochRadio0 {price = 2;};
    	class EpochRadio1 {price = 4;};
    	class EpochRadio2 {price = 6;};
    	class EpochRadio3 {price = 8;};
    	class EpochRadio4 {price = 10;};
    	class EpochRadio5 {price = 12;};
    	class EpochRadio6 {price = 14;};
    	class EpochRadio7 {price = 16;};
    	class EpochRadio8 {price = 18;};
    	class EpochRadio9 {price = 20;};
    
    	class VehicleRepair {price = 35;};
    	class VehicleRepairLg {price = 50;};
    
    	class WhiskeyNoodle {price = 80;};
    
    	class ItemWatch {price = 2;};
    
    	class Binocular {price = 4;};
    	class NVG_EPOCH {price = 35;};
    	class acc_flashlight {price = 4;};
    	class acc_pointer_IR {price = 5;};
    
    	class srifle_EBR_F {price = 150;};
    	class srifle_GM6_F {price = 150;};
    	class srifle_LRR_F {price = 200;};
    	class srifle_DMR_01_F {price = 200;};
    
    	class 20Rnd_762x51_Mag {price = 4; tax = 0.9;};
    	class 5Rnd_127x108_Mag {price = 3; tax = 0.9;};
    	class 5Rnd_127x108_APDS_Mag {price = 6; tax = 0.9;};
    	class 7Rnd_408_Mag {price = 4; tax = 0.9;};
    
    	class 10Rnd_762x51_Mag {price = 2; tax = 0.9;};
    	class 10Rnd_338_Mag { price = 2; tax = 0.9; };
    	class 10Rnd_93x64_DMR_05_Mag { price = 2; tax = 0.9; };
    	class 10Rnd_127x54_Mag { price = 2; tax = 0.9; };
    	
    
    	// Paint
    	class PaintCanClear {price = 1;};
    	class PaintCanBlk {price = 1;};
    	class PaintCanBlu {price = 1;};
    	class PaintCanBrn {price = 1;};
    	class PaintCanGrn {price = 1;};
    	class PaintCanOra {price = 1;};
    	class PaintCanPur {price = 1;};
    	class PaintCanRed {price = 1;};
    	class PaintCanTeal {price = 1;};
    	class PaintCanYel {price = 1;};
    
    	class ItemDocument {price = 5;};
    	class ItemDocumentMission {price = 5;};
    	class ItemMixOil {price = 5;};
    	class emptyjar_epoch {price = 5;};
    	class jerrycan_epoch { price = 10; };
    	class speargun_epoch { price = 75; };
    	class spear_magazine { price = 5; tax = 0.9; };
    	class lighter_epoch { price = 50; };
    	class WoodLog_EPOCH { price = 1; };
    	class ItemRope { price = 5; };
    	class ItemStick { price = 1; };
    	class ItemRock { price = 1; };
    
    	// Food
    	class FoodBioMeat {price = 1;};
    	class FoodMeeps {price = 50;};
    	class FoodSnooter {price = 5;};
    	class sardines_epoch {price = 2;};
    	class meatballs_epoch {price = 2;};
    	class scam_epoch {price = 1;};
    	class sweetcorn_epoch {price = 2;};
    	class CookedSheep_EPOCH {price = 5;};
    	class CookedGoat_EPOCH {price = 5;};
    	class SnakeMeat_EPOCH {price = 3;};
    	class CookedRabbit_EPOCH {price = 5;};
    	class CookedChicken_EPOCH {price = 3;};
    	class ItemTrout {price = 1;};
    	class ItemSeaBass {price = 5;};
    	class ItemTuna {price = 10;};
    
    	// Drinks
    	class FoodWalkNSons {price = 5;};
    	class ItemSodaOrangeSherbet {price = 4;};
    	class ItemSodaPurple {price = 5;};
    	class ItemSodaMocha {price = 8;};
    	class ItemSodaBurst {price = 4;};
    	class ItemSodaRbull {price = 5;};
    
    	// Medical
    	class FAK {price = 3;};
    	class Towelette {price = 1;};
    	class HeatPack {price = 2;};
    	class ColdPack {price = 2;};
    	
    	class sr25_epoch { price = 50; };
    	class l85a2_epoch { price = 50; };
    	class l85a2_pink_epoch { price = 50; };
    	class l85a2_ugl_epoch { price = 50; };
    	class arifle_Katiba_F {price = 50;};
    	class arifle_Katiba_C_F {price = 50;};
    	class arifle_Katiba_GL_F {price = 75;};
    	class arifle_MXC_F {price = 50;};
    	class arifle_MX_F {price = 50;};
    	class arifle_MX_GL_F {price = 75;};
    	class arifle_MXM_F {price = 50;};
    	class arifle_SDAR_F {price = 50;};
    	class arifle_TRG21_F {price = 50;};
    	class arifle_TRG20_F {price = 50;};
    	class arifle_TRG21_GL_F {price = 75;};
    	class arifle_Mk20_F {price = 50;};
    	class arifle_Mk20C_F {price = 50;};
    	class arifle_Mk20_GL_F {price = 75;};
    	class arifle_Mk20_plain_F {price = 50;};
    	class arifle_Mk20C_plain_F {price = 50;};
    	class arifle_Mk20_GL_plain_F {price = 75;};
    	class SMG_01_F {price = 35;};
    	class SMG_02_F {price = 35;};
    	class hgun_PDW2000_F {price = 35;};
    	class arifle_MXM_Black_F {price = 50;};
    	class arifle_MX_GL_Black_F {price = 75;};
    	class arifle_MX_Black_F {price = 50;};
    	class arifle_MXC_Black_F {price = 50;};
    	class Rollins_F {price = 50;};
    
    	class 30Rnd_65x39_caseless_green {price = 3; tax = 0.9;};
    	class 30Rnd_65x39_caseless_green_mag_Tracer {price = 4; tax = 0.9;};
    	class 30Rnd_65x39_caseless_mag {price = 3; tax = 0.9;};
    	class 30Rnd_65x39_caseless_mag_Tracer {price = 4; tax = 0.9;};
    	class 20Rnd_556x45_UW_mag {price = 3; tax = 0.9;};
    	class 30Rnd_556x45_Stanag {price = 3; tax = 0.9;};
    	class 30Rnd_556x45_Stanag_Tracer_Red {price = 4; tax = 0.9;};
    	class 30Rnd_556x45_Stanag_Tracer_Green {price = 4; tax = 0.9;};
    	class 30Rnd_556x45_Stanag_Tracer_Yellow {price = 4; tax = 0.9;};
    	class 30Rnd_45ACP_Mag_SMG_01 {price = 2; tax = 0.9;};
    	class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green {price = 3; tax = 0.9;};
    	class 5Rnd_rollins_mag {price = 2; tax = 0.9;};
    
    	class UGL_FlareWhite_F {price = 2;};
    	class UGL_FlareGreen_F {price = 2;};
    	class UGL_FlareRed_F {price = 2;};
    	class UGL_FlareYellow_F {price = 2;};
    	class UGL_FlareCIR_F {price = 2;};
    	class 1Rnd_Smoke_Grenade_shell {price = 4;};
    	class 1Rnd_SmokeRed_Grenade_shell {price = 4;};
    	class 1Rnd_SmokeGreen_Grenade_shell {price = 4;};
    	class 1Rnd_SmokeYellow_Grenade_shell {price = 4;};
    	class 1Rnd_SmokePurple_Grenade_shell {price = 4;};
    	class 1Rnd_SmokeBlue_Grenade_shell {price = 4;};
    	class 1Rnd_SmokeOrange_Grenade_shell {price = 4;};
    	class 3Rnd_HE_Grenade_shell {price = 10;};
    	class 3Rnd_UGL_FlareWhite_F {price = 4;};
    	class 3Rnd_UGL_FlareGreen_F {price = 4;};
    	class 3Rnd_UGL_FlareRed_F {price = 4;};
    	class 3Rnd_UGL_FlareYellow_F {price = 4;};
    	class 3Rnd_UGL_FlareCIR_F {price = 4;};
    	class 3Rnd_Smoke_Grenade_shell {price = 3;};
    	class 3Rnd_SmokeRed_Grenade_shell {price = 3;};
    	class 3Rnd_SmokeGreen_Grenade_shell {price = 3;};
    	class 3Rnd_SmokeYellow_Grenade_shell {price = 3;};
    	class 3Rnd_SmokePurple_Grenade_shell {price = 3;};
    	class 3Rnd_SmokeBlue_Grenade_shell {price = 3;};
    	class 3Rnd_SmokeOrange_Grenade_shell {price = 3;};
    
    	class LMG_Mk200_F {price = 150;};
    	class arifle_MX_SW_F {price = 150;};
    	class LMG_Zafir_F {price = 150;};
    	class arifle_MX_SW_Black_F {price = 150;};
    
    	// DLC sniper rifles
    	class srifle_DMR_02_F { price = 150; };
    	class srifle_DMR_02_camo_F { price = 150; };
    	class srifle_DMR_02_sniper_F { price = 150; };
    	class srifle_DMR_03_F { price = 150; };
    	class srifle_DMR_03_khaki_F { price = 150; };
    	class srifle_DMR_03_tan_F { price = 150; };
    	class srifle_DMR_03_multicam_F { price = 150; };
    	class srifle_DMR_03_woodland_F { price = 150; };
    	class srifle_DMR_03_spotter_F { price = 150; };
    	class srifle_DMR_04_Tan_F { price = 150; };
    	class srifle_DMR_05_blk_F { price = 150; };
    	class srifle_DMR_05_hex_F { price = 150; };
    	class srifle_DMR_05_tan_f { price = 150; };
    	class srifle_DMR_06_camo_F { price = 150; };
    	class srifle_DMR_06_olive_F { price = 150; };
    	// DLC machine guns
    	class MMG_01_hex_F { price = 150; };
    	class MMG_01_tan_F { price = 150; };
    	class MMG_02_camo_F { price = 150; };
    	class MMG_02_black_F { price = 150; };
    	class MMG_02_sand_F { price = 150; };
    
    	// new weapons
    	class m249_EPOCH {price = 150;};
    	class m249Tan_EPOCH {price = 150;};
    	class m107Tan_EPOCH {price = 200;};
    	class m107_EPOCH {price = 200;};
    	class m16_EPOCH {price = 100;};
    	class m16Red_EPOCH {price = 125;};
    	class M14_EPOCH {price = 125;};
    	class M14Grn_EPOCH {price = 150;};
    	class m4a3_EPOCH {price = 100;};
    	class AKM_EPOCH {price = 100;};
    	
    	// new magazines kiory
    	class 30rnd_556_magazine{ price = 5; tax = 0.9; };
    	class 20rnd_762_magazine{ price = 5; tax = 0.9; };
    	// new magazines seq
    	class 30Rnd_762x39_Mag {price = 5; tax = 0.9;};
    	class 200Rnd_556x45_M249 {price = 5; tax = 0.9;};
    
    	class 200Rnd_65x39_cased_Box {price = 5; tax = 0.9;};
    	class 100Rnd_65x39_caseless_mag {price = 3; tax = 0.9;};
    	class 200Rnd_65x39_cased_Box_Tracer {price = 5; tax = 0.9;};
    	class 100Rnd_65x39_caseless_mag_Tracer {price = 4; tax = 0.9;};
    	class 150Rnd_762x54_Box {price = 4; tax = 0.9;};
    	class 150Rnd_762x54_Box_Tracer {price = 5; tax = 0.9;};
    	class 150Rnd_93x64_Mag{ price = 6; tax = 0.9; };
    
    	class Rangefinder {price = 4;};
    	class Laserdesignator {price = 4;};
    	class hgun_ACPC2_F {price = 5;};
    	class hgun_Rook40_F {price = 5;};
    	class hgun_P07_F {price = 5;};
    	class hgun_Pistol_heavy_01_F {price = 7;};
    	class hgun_Pistol_heavy_02_F {price = 10;};
    	class ruger_pistol_epoch {price = 4;};
    	class 1911_pistol_epoch {price = 6;};
    	class hgun_Pistol_Signal_F {price = 4;};
    	class Hatchet {price = 25;};
    	class MultiGun {price = 100;};
    	class MeleeSledge {price = 50;};
    
    	class CrudeHatchet { price = 5; };
    	class MeleeMaul { price = 10; };
    	class WoodClub { price = 5; };
    	class Plunger { price = 15; };
    	
    	class 16Rnd_9x21_Mag {price = 2; tax = 0.9;};
    	class 30Rnd_9x21_Mag {price = 3; tax = 0.9;};
    	class 9Rnd_45ACP_Mag {price = 1; tax = 0.9;};
    	class 11Rnd_45ACP_Mag {price = 1; tax = 0.9;};
    	class 6Rnd_45ACP_Cylinder {price = 1; tax = 0.9;};
    	class 10rnd_22X44_magazine {price = 2; tax = 0.9;};
    	class 9rnd_45X88_magazine {price = 2; tax = 0.9;};
    	class 6Rnd_GreenSignal_F {price = 1;};
    	class 6Rnd_RedSignal_F {price = 1; tax = 0.9;};
    	class EnergyPack {price = 3; tax = 0.9;};
    	class EnergyPackLg {price = 30; tax = 0.9;};
    
    	class optic_Arco {price = 3;};
    	class optic_Hamr {price = 3;};
    	class optic_Aco {price = 2;};
    	class optic_ACO_grn {price = 3;};
    	class optic_Aco_smg {price = 2;};
    	class optic_ACO_grn_smg {price = 3;};
    	class optic_Holosight {price = 2;};
    	class optic_Holosight_smg {price = 2;};
    	class optic_SOS {price = 3;};
    	class optic_MRCO {price = 3;};
    	class optic_DMS {price = 3;};
    	class optic_Yorris {price = 2;};
    	class optic_MRD {price = 1;};
    	class optic_LRPS {price = 3;};
    	class optic_NVS {price = 7;};
    	class optic_Nightstalker {price = 10;};
    	class optic_tws {price = 5;};
    	class optic_tws_mg {price = 5;};
    
    	// DLC optics
    	class optic_AMS { price = 5; };
    	class optic_AMS_khk { price = 5; };
    	class optic_AMS_snd { price = 5; };
    	class optic_KHS_blk { price = 5; };
    	class optic_KHS_hex { price = 5; };
    	class optic_KHS_old { price = 5; };
    	class optic_KHS_tan { price = 5; };
    
    	// DLC bipods
    	class bipod_01_F_snd { price = 15; };
    	class bipod_01_F_blk { price = 15; };
    	class bipod_01_F_mtp { price = 15; };
    	class bipod_02_F_blk { price = 15; };
    	class bipod_02_F_tan { price = 15; };
    	class bipod_02_F_hex { price = 15; };
    	class bipod_03_F_blk { price = 15; };
    	class bipod_03_F_oli { price = 15; };
    
    	// Epoch
    	class Elcan_epoch { price = 5; };
    	class Elcan_reflex_epoch { price = 10; };
    
    	class muzzle_snds_H {price = 2;};
    	class muzzle_snds_L {price = 2;};
    	class muzzle_snds_M {price = 2;};
    	class muzzle_snds_B {price = 2;};
    	class muzzle_snds_H_MG {price = 2;};
    	class muzzle_snds_acp {price = 2;};
    	class Heal_EPOCH {price = 3;};
    	class Defib_EPOCH {price = 5;};
    	class Repair_EPOCH {price = 2;};
    
    	// DLC muzzles
    	class muzzle_snds_338_black { price = 3; };
    	class muzzle_snds_338_green { price = 3; };
    	class muzzle_snds_93mmg { price = 3; };
    	class muzzle_snds_93mmg_tan { price = 3; };
    
    	class muzzle_sr25S_epoch { price = 2; };
    
    	class PartOreGold {price = 70;};
    	class PartOreSilver {price = 7;};
    	class PartOre {price = 1;};
    	class ItemGoldBar {price = 100;};
    	class ItemSilverBar {price = 10;};
    	class ItemGoldBar10oz {price = 1000;};
    	class ItemTopaz {price = 25;};
    	class ItemOnyx {price = 30;};
    	class ItemSapphire {price = 50;};
    	class ItemAmethyst {price = 25;};
    	class ItemEmerald {price = 25;};
    	class ItemCitrine {price = 25;};
    	class ItemRuby {price = 75;};
    	class ItemQuartz {price = 5;};
    	class ItemJade {price = 100;};
    	class ItemGarnet {price = 25;};
    	class ItemKiloHemp {price = 100;};
    
    	// Building resources
    	class PartPlankPack {price = 2;};
    	class CinderBlocks {price = 20;};
    	class MortarBucket {price = 20;};
    	class ItemScraps {price = 5;};
    	class ItemCorrugated {price = 25;};
    	class ItemCorrugatedLg {price = 75;};
    
    	// Building parts
    	class KitStudWall {price = 10;};
    	class KitWoodFloor {price = 10;};
    	class KitWoodStairs {price = 10;};
    	class KitWoodRamp {price = 14;};
    	class KitFirePlace {price = 4;};
    	class KitTiPi {price = 10;};
    	class KitShelf {price = 90;};
    	class KitWoodFoundation { price = 20; };
    	class KitFoundation {price = 90;};
    	class KitPlotPole {price = 300;};
    	class KitCinderWall {price = 140;};
    
    	class honey_epoch {price = 5;};
    	class Pelt_EPOCH {price = 1;};
    	class Venom_EPOCH {price = 10;};
    
    	class HandGrenade_Stone {price = 1;};
    	class SmokeShell {price = 2;};
    	class SmokeShellYellow {price = 2;};
    	class SmokeShellGreen {price = 2;};
    	class SmokeShellRed {price = 2;};
    	class SmokeShellPurple {price = 2;};
    	class SmokeShellOrange {price = 2;};
    	class SmokeShellBlue {price = 2;};
    	class Chemlight_green {price = 1;};
    	class Chemlight_red {price = 1;};
    	class Chemlight_yellow {price = 1;};
    	class Chemlight_blue {price = 1;};
    
    	class HandGrenade {price = 15;};
    	class MiniGrenade {price = 10;};
    	class DemoCharge_Remote_Mag {price = 40;};
    	class SatchelCharge_Remote_Mag {price = 75;};
    	class ATMine_Range_Mag {price = 50;};
    	class ClaymoreDirectionalMine_Remote_Mag {price = 50;};
    	class APERSMine_Range_Mag {price = 30;};
    	class APERSBoundingMine_Range_Mag {price = 50;};
    	class SLAMDirectionalMine_Wire_Mag {price = 40;};
    	class APERSTripMine_Wire_Mag {price = 30;};
    
    
    	class B_AssaultPack_cbr {price = 10;};
    	class B_AssaultPack_dgtl {price = 10;};
    	class B_AssaultPack_khk {price = 10;};
    	class B_AssaultPack_mcamo {price = 10;};
    	class B_AssaultPack_ocamo {price = 10;};
    	class B_AssaultPack_rgr {price = 10;};
    	class B_AssaultPack_sgg {price = 10;};
    	class B_Carryall_cbr {price = 1;};
    	class B_Carryall_khk {price = 10;};
    	class B_Carryall_mcamo {price = 10;};
    	class B_Carryall_ocamo {price = 10;};
    	class B_Carryall_oli {price = 10;};
    	class B_Carryall_oucamo {price = 10;};
    	class B_FieldPack_blk {price = 10;};
    	class B_FieldPack_cbr {price = 10;};
    	class B_FieldPack_khk {price = 10;};
    	class B_FieldPack_ocamo {price = 10;};
    	class B_FieldPack_oli {price = 10;};
    	class B_FieldPack_oucamo {price = 10;};
    	class B_Kitbag_cbr {price = 10;};
    	class B_Kitbag_mcamo {price = 10;};
    	class B_Kitbag_rgr {price = 10;};
    	class B_Kitbag_sgg {price = 10;};
    	class B_Parachute {price = 15;};
    	class B_TacticalPack_blk {price = 10;};
    	class B_TacticalPack_mcamo {price = 10;};
    	class B_TacticalPack_ocamo {price = 10;};
    	class B_TacticalPack_oli {price = 10;};
    	class B_TacticalPack_rgr {price = 10;};
    	class smallbackpack_red_epoch {price = 10;};
    	class smallbackpack_green_epoch {price = 10;};
    	class smallbackpack_teal_epoch {price = 10;};
    	class smallbackpack_pink_epoch {price = 10;};
    
    	// Marksman DLC
    	class U_O_FullGhillie_lsh { price = 7; };
    	class U_O_FullGhillie_sard { price = 7; };
    	class U_O_FullGhillie_ard { price = 7; };
    
    	class U_O_CombatUniform_ocamo {price = 5;};
    	class U_O_GhillieSuit {price = 5;};
    	class U_O_PilotCoveralls {price = 5;};
    	class U_O_Wetsuit {price = 5;};
    	class U_OG_Guerilla1_1 {price = 5;};
    	class U_OG_Guerilla2_1 {price = 5;};
    	class U_OG_Guerilla2_2 {price = 5;};
    	class U_OG_Guerilla2_3 {price = 5;};
    	class U_OG_Guerilla3_1 {price = 5;};
    	class U_OG_Guerilla3_2 {price = 5;};
    	class U_OG_leader {price = 5;};
    
    	class U_C_Poloshirt_stripped {price = 4;};
    	class U_C_Poloshirt_blue {price = 4;};
    	class U_C_Poloshirt_burgundy {price = 4;};
    	class U_C_Poloshirt_tricolour {price = 4;};
    	class U_C_Poloshirt_salmon {price = 4;};
    	class U_C_Poloshirt_redwhite {price = 4;};
    	class U_C_Poor_1 {price = 5;};
    	class U_C_WorkerCoveralls {price = 5;};
    	class U_C_Journalist {price = 5;};
    	class U_C_Scientist {price = 5;};
    	class U_OrestesBody {price = 5;};
    	class U_Wetsuit_uniform {price = 5;};
    	class U_Wetsuit_White {price = 5;};
    	class U_Wetsuit_Blue {price = 5;};
    	class U_Wetsuit_Purp {price = 5;};
    	class U_Wetsuit_Camo {price = 5;};
    	class U_Camo_uniform {price = 5;};
    	class U_ghillie1_uniform {price = 5;};
    	class U_ghillie2_uniform {price = 5;};
    	class U_ghillie3_uniform {price = 5;};
    	class U_CamoBlue_uniform {price = 5;};
    	class U_CamoBrn_uniform {price = 5;};
    	class U_CamoRed_uniform {price = 5;};
    
    	class U_C_Driver_1 {price = 5;};
    	class U_C_Driver_2 {price = 5;};
    	class U_C_Driver_3 {price = 5;};
    	class U_C_Driver_4 {price = 5;};
    	class U_C_Driver_1_black {price = 5;};
    	class U_C_Driver_1_blue {price = 5;};
    	class U_C_Driver_1_green {price = 5;};
    	class U_C_Driver_1_red {price = 5;};
    	class U_C_Driver_1_white {price = 5;};
    	class U_C_Driver_1_yellow {price = 5;};
    	class U_C_Driver_1_orange {price = 5;};
    
    	class V_1_EPOCH {price = 5;};
    	class V_2_EPOCH {price = 5;};
    	class V_3_EPOCH {price = 5;};
    	class V_4_EPOCH {price = 5;};
    	class V_5_EPOCH {price = 5;};
    	class V_6_EPOCH {price = 5;};
    	class V_7_EPOCH {price = 5;};
    	class V_8_EPOCH {price = 5;};
    	class V_9_EPOCH {price = 5;};
    	class V_10_EPOCH {price = 5;};
    	class V_11_EPOCH {price = 5;};
    	class V_12_EPOCH {price = 5;};
    	class V_13_EPOCH {price = 5;};
    	class V_14_EPOCH {price = 5;};
    	class V_15_EPOCH {price = 5;};
    	class V_16_EPOCH {price = 5;};
    	class V_17_EPOCH {price = 5;};
    	class V_18_EPOCH {price = 5;};
    	class V_19_EPOCH {price = 5;};
    	class V_20_EPOCH {price = 5;};
    	class V_21_EPOCH {price = 5;};
    	class V_22_EPOCH {price = 5;};
    	class V_23_EPOCH {price = 5;};
    	class V_24_EPOCH {price = 5;};
    	class V_25_EPOCH {price = 5;};
    	class V_26_EPOCH {price = 5;};
    	class V_27_EPOCH {price = 5;};
    	class V_28_EPOCH {price = 5;};
    	class V_29_EPOCH {price = 5;};
    	class V_30_EPOCH {price = 5;};
    	class V_31_EPOCH {price = 5;};
    	class V_32_EPOCH {price = 5;};
    	class V_33_EPOCH {price = 5;};
    	class V_34_EPOCH {price = 5;};
    	class V_35_EPOCH {price = 5;};
    	class V_36_EPOCH {price = 5;};
    	class V_37_EPOCH {price = 5;};
    	class V_38_EPOCH {price = 5;};
    	class V_39_EPOCH {price = 5;};
    	class V_40_EPOCH {price = 5;};
    
    	class H_1_EPOCH {price = 3;};
    	class H_2_EPOCH {price = 3;};
    	class H_3_EPOCH {price = 3;};
    	class H_4_EPOCH {price = 3;};
    	class H_5_EPOCH {price = 3;};
    	class H_6_EPOCH {price = 3;};
    	class H_7_EPOCH {price = 3;};
    	class H_8_EPOCH {price = 3;};
    	class H_9_EPOCH {price = 3;};
    	class H_10_EPOCH {price = 3;};
    	class H_11_EPOCH {price = 3;};
    	class H_12_EPOCH {price = 3;};
    	class H_13_EPOCH {price = 3;};
    	class H_14_EPOCH {price = 3;};
    	class H_15_EPOCH {price = 3;};
    	class H_16_EPOCH {price = 3;};
    	class H_17_EPOCH {price = 3;};
    	class H_18_EPOCH {price = 3;};
    	class H_19_EPOCH {price = 3;};
    	class H_20_EPOCH {price = 3;};
    	class H_21_EPOCH {price = 3;};
    	class H_22_EPOCH {price = 3;};
    	class H_23_EPOCH {price = 3;};
    	class H_24_EPOCH {price = 3;};
    	class H_25_EPOCH {price = 3;};
    	class H_26_EPOCH {price = 3;};
    	class H_27_EPOCH {price = 3;};
    	class H_28_EPOCH {price = 3;};
    	class H_29_EPOCH {price = 3;};
    	class H_30_EPOCH {price = 3;};
    	class H_31_EPOCH {price = 3;};
    	class H_32_EPOCH {price = 3;};
    	class H_33_EPOCH {price = 3;};
    	class H_34_EPOCH {price = 3;};
    	class H_35_EPOCH {price = 3;};
    	class H_36_EPOCH {price = 3;};
    	class H_37_EPOCH {price = 3;};
    	class H_38_EPOCH {price = 3;};
    	class H_39_EPOCH {price = 3;};
    	class H_40_EPOCH {price = 3;};
    	class H_41_EPOCH {price = 3;};
    	class H_42_EPOCH {price = 3;};
    	class H_43_EPOCH {price = 3;};
    	class H_44_EPOCH {price = 3;};
    	class H_45_EPOCH {price = 3;};
    	class H_46_EPOCH {price = 3;};
    	class H_47_EPOCH {price = 3;};
    	class H_48_EPOCH {price = 3;};
    	class H_49_EPOCH {price = 3;};
    	class H_50_EPOCH {price = 3;};
    	class H_51_EPOCH {price = 3;};
    	class H_52_EPOCH {price = 3;};
    	class H_53_EPOCH {price = 3;};
    	class H_54_EPOCH {price = 3;};
    	class H_55_EPOCH {price = 3;};
    	class H_56_EPOCH {price = 3;};
    	class H_57_EPOCH {price = 3;};
    	class H_58_EPOCH {price = 3;};
    	class H_59_EPOCH {price = 3;};
    	class H_60_EPOCH {price = 3;};
    	class H_61_EPOCH {price = 3;};
    	class H_62_EPOCH {price = 3;};
    	class H_63_EPOCH {price = 3;};
    	class H_64_EPOCH {price = 3;};
    	class H_65_EPOCH {price = 3;};
    	class H_66_EPOCH {price = 3;};
    	class H_67_EPOCH {price = 3;};
    	class H_68_EPOCH {price = 3;};
    	class H_69_EPOCH {price = 3;};
    	class H_70_EPOCH {price = 3;};
    	class H_71_EPOCH {price = 3;};
    	class H_72_EPOCH {price = 3;};
    	class H_73_EPOCH {price = 3;};
    	class H_74_EPOCH {price = 3;};
    	class H_75_EPOCH {price = 3;};
    	class H_76_EPOCH {price = 3;};
    	class H_77_EPOCH {price = 3;};
    	class H_78_EPOCH {price = 3;};
    	class H_79_EPOCH {price = 3;};
    	class H_80_EPOCH {price = 3;};
    	class H_81_EPOCH {price = 3;};
    	class H_82_EPOCH {price = 3;};
    	class H_83_EPOCH {price = 3;};
    	class H_84_EPOCH {price = 3;};
    	class H_85_EPOCH {price = 3;};
    	class H_86_EPOCH {price = 3;};
    	class H_87_EPOCH {price = 3;};
    	class H_88_EPOCH {price = 3;};
    	class H_89_EPOCH {price = 3;};
    	class H_90_EPOCH {price = 3;};
    	class H_91_EPOCH {price = 3;};
    	class H_92_EPOCH {price = 3;};
    	class H_93_EPOCH {price = 3;};
    	class H_94_EPOCH {price = 5;};
    	class H_95_EPOCH {price = 5;};
    	class H_96_EPOCH {price = 5;};
    	class H_97_EPOCH {price = 5;};
    	class H_98_EPOCH {price = 5;};
    	class H_99_EPOCH {price = 5;};
    	class H_100_EPOCH {price = 5;};
    	class H_101_EPOCH {price = 5;};
    	class H_102_EPOCH {price = 5;};
    	class H_103_EPOCH {price = 5;};
    	class H_104_EPOCH {price = 3;};
    	class wolf_mask_epoch {price = 30;};
    	class pkin_mask_epoch {price = 30;};
    	
    	//Mission Items
    	class B_UavTerminal {price = 10;};
    	class O_UavTerminal {price = 10;};
    }; 

     

    Create a CfgPricing.hpp file in your mission folder, paste that in it, and then in description.ext add: 

    #include "CfgPricing.hpp"

  7. In your mission init.sqf, 

    if (isServer) then
    {
    	_veh = createVehicle["M_Plane_F", _spawnPos, [8500, 2500, 0.01], 0, "NO_COLLIDE"];
    	_veh setDir 90.314346;
    	_veh setPos [8500, 2500, 0.01];
    	_veh call EPOCH_server_setVToken;
    };
    

    Or, if using M3Editor script, make sure the script is run on the server:

    private ["_objs"];
    _objs = [
    	["M_Plane_F",[11506.4,11653.6,0],0,[[0,1,0],[0,0,1]],false]
    ];
    
    {
    	private ["_obj"];
    	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    	if (_x select 4) then {
    		_obj setDir (_x select 2);
    		_obj setPos (_x select 1);
    	} else {
    		_obj setPosATL (_x select 1);
    		_obj setVectorDirAndUp (_x select 3);
    	};
    	if ((_obj iskindof "Air") || (_obj iskindof "Tank") || (_obj isKindOf "Land") || (_obj isKindOf "Ship"))then{ //Add this to check for vehicles and set the vToken
    		_obj call EPOCH_server_setVToken;
    	};
    } foreach _objs;
    
  8. Your server side script in epochHive only runs once when the server starts, so it will only run or not run based on whatever you have "event=" set to in the mission init.sqf since init.sqf is loaded by both the server and client. Anything else you do with "event" after that doesn't matter because the script is no longer running.

    To use public variables you need an addPublicVariableEventHandler on the server (or clients depending on where you want it to go off) and use publicVariableServer, it will only send the variable to the server, publicVariable will send the variable to everyone.

    My suggestions, remove 

    event = false;

    publicVariable "event";

    from your mission init.sqf

     

    In your start.sqf

    systemChat "Starting event";
    event = true;
    publicVariableServer "event";
    

    In your @epochHive script:

    "event" addPublicVariableEventHandler {
    	[] execVM "x\addons\custom\serverside\test.sqf";
    };
    

    (You don't need to use isServer on @epochHive scripts, they only run on the server)

    This way, when your addaction runs start.sqf, "event" will be sent to the server and the server will then run [] execVM "x\addons\custom\serverside\test.sqf";

  9. Don't know if I am missing something, but there is no need for code = or publicVariable 'Code',  Code is not a public variable event handler so it will never run.

    if (!isDedicated) then {
        'SoundBroadcaster' addPublicVariableEventHandler {
            _args = _this select 1;
            _aiunit = _args select 0;
            _soundClass = _args select 1;
            _aiunit say3D _soundClass;
        };
    };
    

    On your AI file, the error is probably due to a couple of things:

    defining _player = playableUnits, playableUnits returns an array of every playable unit.

    You are sending an array of units into (_player distance _aiunit), when it is expecting a single object.

    forEach playableUnits is already iterating through each unit and each of them will be _x when they are checked, if that makes sense.

    while {alive _aiunit} do{
    	{		
    		if ((_x distance _aiunit) < 500) then {
    			SoundBroadcaster = [_aiunit,'_sound'];
    			(owner _x) publicVariableClient 'SoundBroadcaster';			
    		};		
    	} forEach playableUnits;
    	uisleep 5;
    };
    
  10. interesting, then there is something else going on there, no way to know without seeing all of the scripts, but another thing I just now noticed:

     

     if (_this select 0 == 1)

     

    You are sending a single value, not an array,  Noise = 1;

    So when the client receives, [_this select 1] execVM "test\sound.sqf";  it is going to run as [1] execVM "test\sound.sqf";

    Which will make _this = 1 in your sound.sqf,

    Try:   if (_this == 1)

     

    Other than that, check the rpt logs for errors and also use diag_log to log things from your script into the rpt log so you can see what is going on when the script runs.

  11. You are adding the event handler to the server, it should be on the client which is where you want the event handler to fire.

    if (isServer) then {
    
    _aispawn = [[4019.26,8378.12,0],3000,100,1,0,0] execVM "addons\AI\test.sqf";
    
    };
    

    In mission init.sqf

    if(hasInterface)then{
    	"Noise" addPublicVariableEventHandler {[_this select 1] execVM "test\sound.sqf";};
    };

    Also, remove  [Noise] execVM "test\sound.sqf"; from your AI script, it is of no use.

    I would also recommend using uiSleep instead of sleep, sleep is an older arma command, it can get stuck or even stop working and break your script, specially on server side if server is lagging or low performance/fps.

  12. [[DIR,[X,Y,Z],"InstanceID"],[BleedRemainTime,0(this is hard coded to be 0),Oxygen,Damage],["Goggles","HeadGear","Vest","Backpack","Uniform","PlayerType(Epoch_Male_F)"],[not used for anything?],[Temp,Hunger,Thirst,AliveTime,Energy,Wet,Soiled,Immunity,Toxicity,Stamina,Crypto,[HitPoints],BloodPressure,[SpawnArray(antagonists)]],["CurrentWeapon",[WeaponAttachments&LoadedMagazines],["PrimaryWeapon","SecondaryWeapon","HandgunWeapon"]],["Items(NVG/MAP/GPS/etc)"],[Magazines(includes epoch stuff that is categorized as magazines)],[[ItemsInUniform&Count],[ItemsInVest&Count],[ItemsInBackpack&Count]],[[[WeaponsInUniform&Count]],[[WeaponsInVest&Count]],[[WeaponsInBackpack&Count]]],"GroupID",CanBeRevived]
    
×
×
  • Create New...