diff --git a/@A3XAI/addons/a3xai.pbo b/@A3XAI/addons/a3xai.pbo new file mode 100644 index 0000000..df9392f Binary files /dev/null and b/@A3XAI/addons/a3xai.pbo differ diff --git a/@A3XAI/addons/a3xai_config.pbo b/@A3XAI/addons/a3xai_config.pbo new file mode 100644 index 0000000..66e5e2d Binary files /dev/null and b/@A3XAI/addons/a3xai_config.pbo differ diff --git a/@A3XAI/addons/a3xai_config/$PREFIX$ b/@A3XAI/addons/a3xai_config/$PREFIX$ new file mode 100644 index 0000000..b55db03 --- /dev/null +++ b/@A3XAI/addons/a3xai_config/$PREFIX$ @@ -0,0 +1 @@ +A3XAI_config \ No newline at end of file diff --git a/@A3XAI/addons/a3xai_config/a3xai_custom_defs.sqf b/@A3XAI/addons/a3xai_config/a3xai_custom_defs.sqf new file mode 100644 index 0000000..626b0ef --- /dev/null +++ b/@A3XAI/addons/a3xai_config/a3xai_custom_defs.sqf @@ -0,0 +1,16 @@ +/* + A3XAI Custom Spawn Definitions File + + Instructions: + + Generate custom spawns and blacklist areas using the included A3XAI Editor Tool (Inside the "Editor Tool" folder of the A3XAI download package). + + Instructions on how to use the Editor Tool are located on the A3XAI Wikia page: http://A3XAI.wikia.com/wiki/A3XAI_Editor_Tool + + In order for A3XAI to load this file on startup, you must set in @A3XAI/A3XAI_config/config.cpp under the "A3XAI Settings" section: + + loadCustomFile = 1; + +//----------------------------Add your custom spawn and dynamic area blacklist definitions below this line ----------------------------*/ + + diff --git a/@A3XAI/addons/a3xai_config/config.cpp b/@A3XAI/addons/a3xai_config/config.cpp new file mode 100644 index 0000000..39ec537 --- /dev/null +++ b/@A3XAI/addons/a3xai_config/config.cpp @@ -0,0 +1,765 @@ +class CfgPatches { + class A3XAI_config { + units[] = {}; + weapons[] = {}; + requiredVersion = 0.1; + A3XAIVersion = "0.2.1"; + requiredAddons[] = {}; + }; +}; + +class CfgA3XAISettings { + + /* A3XAI Settings + --------------------------------------------------------------------------------------------------------------------*/ + + //Enable or disable event logging to the server RPT file (named arma3server_[date]_[time].rpt). Debug level setting. 0: No debug output, 1: Basic Debug output, 2: Detailed Debug output. (Default: 0) + //Debug output may help finding additional information about A3XAI's background behavior. This output is helpful when asking for help regarding bugs or unexpected behaviors. + debugLevel = 0; + + //Frequency of server monitor update to RPT log in seconds. The monitor periodically reports number of max/current AI units and dynamically spawned triggers into RPT log. (Default: 300, 0 = Disable reporting) + monitorReportRate = 300; + + //Enable or disable verification and error-correction of classname tables used by A3XAI. If invalid entries are found, they are removed and logged into the RPT log. + //If disabled, any invalid classnames will not be removed and clients may crash if AI bodies with invalid items are looted. Only disable if a previous scan shows no invalid classnames (Default: 1). + verifyClassnames = 1; + + //Enables checking of all A3XAI config settings. (Default: 1) + verifySettings = 1; + + //Minimum seconds to pass until each dead AI body or destroyed vehicle can be cleaned up by A3XAI's task scheduler. A3XAI will not clean up a body/vehicle if there is a player close by (Default: 900). + cleanupDelay = 900; + + //Enabled: A3XAI will load custom spawn/blacklist definitions file on startup (A3XAI_config.pbo >> custom_defs.sqf) (Default: 0) + loadCustomFile = 0; + + + /* A3XAI HC Settings + --------------------------------------------------------------------------------------------------------------------*/ + + //Enables A3XAI headless client support. (Default: 0) + enableHC = 1; + + //If HC support enabled, A3XAI will pause during post-initialization until HC has successfully connected. (Default: 0) + //IMPORTANT: It is highly recommended to ensure that the HC is properly setup before enabling this option, otherwise A3XAI may be stuck waiting for HC to to connect. + waitForHC = 0; + + + /* Dynamic Classname Settings + + If a setting is disabled, A3XAI will use the corresponding classname table further below. See "AI clothing, weapon, loot, and equipment settings" section. + --------------------------------------------------------------------------------------------------------------------*/ + + //Purchase price limit for items generated by dynamic classname system as defined in CfgExileArsenal. Lowering this value may reduce variety of items carried by AI. (Default: 2000) + itemPriceLimit = 2000; + + //1: Generate AI weapons from Exile trader tables (Default) + //0: Weapons defined by pistolList, rifleList, machinegunList, sniperList + //dynamicWeaponBlacklist: Classnames of weapons to ignore from Exile trader tables + generateDynamicWeapons = 1; + dynamicWeaponBlacklist[] = {}; + + //1: Use Exile loot table data as whitelist for AI-usable weapon scopes (Default) + //0: Scopes defined by weaponOpticsList + //dynamicOpticsBlacklist: List of optics classnames to ignore from Exile trader tables. + generateDynamicOptics = 1; + dynamicOpticsBlacklist[] = {}; + + //1: Generate AI uniform types from Exile trader tables (Default) + //0: Uniforms defined by uniformTypes0, uniformTypes1, uniformTypes2, uniformTypes3 + //dynamicUniformBlacklist: List of uniform classnames to ignore from Exile trader tables. + generateDynamicUniforms = 1; + dynamicUniformBlacklist[] = {}; + + //1: Generate AI backpack types from Exile trader tables (Default) + //0: Backpacks defined by backpackTypes0, backpackTypes1, backpackTypes2, backpackTypes3 + //dynamicBackpackBlacklist: List of backpack classnames to ignore from Exile trader tables. + generateDynamicBackpacks = 1; + dynamicBackpackBlacklist[] = {}; + + //1: Generate AI backpack types from Exile trader tables (Default) + //0: Vests defined by vestTypes0, vestTypes1, vestTypes2, vestTypes3 + //dynamicVestBlacklist: List of vest classnames to ignore from Exile trader tables. + generateDynamicVests = 1; + dynamicVestBlacklist[] = {}; + + //1: Generate AI headgear types from Exile trader tables (Default) + //0: Headgear defined by headgearTypes0, headgearTypes1, headgearTypes2, headgearTypes3 + //dynamicHeadgearBlacklist: List of headgear classnames to ignore from Exile trader tables. + generateDynamicHeadgear = 1; + dynamicHeadgearBlacklist[] = {}; + + //1: Generate AI food types from Exile trader tables (Default) + //0: Food defined by foodLoot + //dynamicFoodBlacklist: List of food classnames to ignore from Exile trader tables. + generateDynamicFood = 1; + dynamicFoodBlacklist[] = {}; + + //1: Generate AI generic loot types from Exile trader tables. Includes "Hardware", "Smoke", "Flare" -class items. (Default) + //0: Loot defined by MiscLoot + //dynamicLootBlacklist: List of loot classnames to ignore from Exile trader tables. + generateDynamicLoot = 1; + dynamicLootBlacklist[] = {}; + + + //Enable or disable radio message receiving. Players with radios or part of a group with at least one radio will be able to intercept some AI communications. (Default: 0) + enableRadioMessages = 1; + + + /* Shared AI Unit Settings. These settings affect all AI spawned unless noted otherwise. + --------------------------------------------------------------------------------------------------------------------*/ + + //Sets side/faction for AI spawned by A3XAI. If A3XAI units are hostile with AI spawned from other install addons, consider changing this setting. Acceptable sides: east or west (Default: east) + side = EAST; + + //Number of online players required for maximum (or minimum) AI spawn chance. Affects Static, Dynamic, Random AI spawns. (Default: 10) + playerCountThreshold = 10; + + //1: Spawn chance multiplier scales upwards from value defined by chanceScalingThreshold to 1.00. 0: Spawn chance multiplier scales downwards from 1.00 to chanceScalingThreshold. + upwardsChanceScaling = 0; + + //If upwardsChanceScaling is 1: Initial spawn chance multiplier. If upwardsChanceScaling is 0: Final spawn chance multiplier. (Default: 0.50) + chanceScalingThreshold = 0.25; + + //(Static/Dynamic/Random Spawns) minAI: Minimum number of units. addAI: maximum number of additional units. unitLevel: Unit level (0-3) + minAI_village = 1; + addAI_village = 1; + unitLevel_village = 0; + spawnChance_village = 0.40; + + //(Static/Dynamic/Random Spawns) minAI: Minimum number of units. addAI: maximum number of additional units. unitLevel: Unit level (0-3) + minAI_city = 1; + addAI_city = 2; + unitLevel_city = 1; + spawnChance_city = 0.60; + + //(Static/Dynamic/Random Spawns) minAI: Minimum number of units. addAI: maximum number of additional units. unitLevel: Unit level (0-3) + minAI_capitalCity = 2; + addAI_capitalCity = 1; + unitLevel_capitalCity = 1; + spawnChance_capitalCity = 0.70; + + //(Static/Dynamic/Random Spawns) minAI: Minimum number of units. addAI: maximum number of additional units. unitLevel: Unit level (0-3) + minAI_remoteArea = 1; + addAI_remoteArea = 2; + unitLevel_remoteArea = 2; + spawnChance_remoteArea = 0.80; + + //(Static/Dynamic/Random Spawns) minAI: Minimum number of units. addAI: maximum number of additional units. unitLevel: Unit level (0-3) + minAI_wilderness = 1; + addAI_wilderness = 2; + unitLevel_wilderness = 1; + spawnChance_wilderness = 0.50; + + //(For dynamic and random spawns only) Defines amount of time to wait in seconds until cleaning up temporary blacklist area after dynamic/random spawn is deactivated (Default: 1200) + tempBlacklistTime = 1200; + + //Enable or disable AI death messages. Messages will be visible to all group members of player responsible for killing the AI unit. (Default: 1) + enableDeathMessages = 1; + + //If enabled, AI group will attempt to track down player responsible for killing a group member. (Default: 1) + enableFindKiller = 1; + + //If normal probability check for spawning NVGs fails, then give AI temporary NVGs during night hours. Temporary NVGs are unlootable and will be removed at death (Default: 0). + enableTempNVGs = 0; + + //Minimum AI unit level requirement to use underslung grenade launchers. Set to -1 to disable completely. (Default: 1) + levelRequiredGL = 1; + + //Minimum AI unit level requirement to use launcher weapons. Set to -1 to disable completely. Launchers are unlootable and will be removed at death (Default: -1) + levelRequiredLauncher = -1; + + //List of launcher-type weapons that AI can use. + launcherTypes[] = {/*"launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"*/}; + + //Maximum number of launcher weapons allowed per group (Default: 1) + launchersPerGroup = 0; + + //Enable or disable AI self-healing. Level 0 AI cannot self-heal. Affects: All AI infantry units (Default: 1). + enableHealing = 1; + + //If enabled, A3XAI will remove all explosive ammo (missiles, rockets, bombs - but not HE rounds) from spawned AI air vehicles. (Default: 1) + //Affects: All AI air vehicle types (patrols/custom/reinforcement). Does not affect UAV/UGVs. + removeExplosiveAmmo = 1; + + //if enabled, AI units suffer no damage from vehicle collisions. (Default: 1) + noCollisionDamage = 0; + + //If enabled, AI killed by vehicle collisions will have their gear removed (Default: 1) + roadKillPenalty = 0; + + //Array of positions defining trader locations. AI will be non-hostile and damage immune around this area. + //Use this if your server is not using the standard Exile trader markers or sensors in mission.sqm + //For performance reasons, do not add locations other than actual trader positions to this array. + //Example: traderAreaLocations[] = {{2998.06,18175.5,0},{14600,16797.2,0},{23334.6,24188.9,0}}; + traderAreaLocations[] = {}; + + + /* Static Infantry AI Spawning Settings + + A3XAI will spawn an AI group at various named locations on the map if players are nearby. + --------------------------------------------------------------------------------------------------------------------*/ + + //Enable or disable static AI spawns. If enabled, AI spawn points will be generated in cities, towns, and other named areas. + //Enabled: A3XAI automatically generates static spawns at named locations on map. Disabled: No static spawns will be generated. (Default: 1) + enableStaticSpawns = 1; + + //Set minimum and maximum wait time (seconds) to respawn an AI group after all units have been killed. Applies to both static AI and custom spawned AI (Default: Min 300, Max 600). + respawnTimeMin = 300; + respawnTimeMax = 600; + + //Time to allow spawned AI units to exist in seconds before being despawned when no players are present in a trigger area. Applies to both static AI and custom spawned AI (Default: 120) + despawnWait = 120; + + //Respawn Limits. Set to -1 for unlimited respawns. (Default: -1 for each). + respawnLimit_village = -1; + respawnLimit_city = -1; + respawnLimit_capitalCity = -1; + respawnLimit_remoteArea = -1; + + + /* Dynamic Infantry AI Spawning Settings. Probabilities should add up to 1.00 + + A3XAI will create ambient threat in the area for each player by periodically spawning AI to create unexpected ambush encounters. These AI may occasionally seek out and hunt a player. + --------------------------------------------------------------------------------------------------------------------*/ + + //Upper limit of dynamic spawns on map at once. Set to 0 to disable dynamic spawns (Default: 15) + maxDynamicSpawns = 15; + + //Minimum time (in seconds) that must pass between dynamic spawns for each player (Default: 900) + timePerDynamicSpawn = 900; + + //Players offline for this amount of time (seconds) will have their last spawn timestamp reset (Default: 3600) + purgeLastDynamicSpawnTime = 3600; + + //Probability for dynamic AI to actively hunt a targeted player. If probability check fails, dynamic AI will patrol the area instead of hunting (Default: 0.60) + spawnHunterChance = 0.60; + + //Time to wait (seconds) before despawning all AI units in dynamic spawn area when no players are present. (Default: 120) + despawnDynamicSpawnTime = 120; + + + /* Random Infantry AI Spawning Settings + + A3XAI will create spawns that are randomly placed around the map and are periodically relocated. These spawns are preferentially created in named locations, but may be also created anywhere in the world. + --------------------------------------------------------------------------------------------------------------------*/ + + //Maximum number of placed random spawns on map. Set to -1 for A3XAI to automatically adjust spawn limit according to map size. Set to 0 to disable random spawns. (Default: -1) + maxRandomSpawns = -1; + + //Time to wait (seconds) before despawning all AI units in random spawn area when no players are present. (Default: 120) + despawnRandomSpawnTime = 120; + + //Minimum distance between a random spawn location and other random spawns. (Default: 0) + distanceBetweenRandomSpawns = 0; + + + /* Shared AI Vehicle Settings + + These settings affect the following AI vehicle patrol types: Air, Land, UAV, UGV + --------------------------------------------------------------------------------------------------------------------*/ + + //Time to wait (seconds) before despawning disabled/destroyed AI vehicles. If vehiclesAllowedForPlayers is enabled, this timer is cleared once a player enters the vehicle. (Default: 600) + vehicleDespawnTime = 900; + + //Enable player use of AI vehicles. Players must either disable the vehicle or kill all units of the group in order to access the vehicle. (Default: 0) + vehiclesAllowedForPlayers = 1; + + //Add name of location as displayed on map prevent AI vehicle patrols from travelling to these locations. Location names are case-sensitive. Note: Vehicles may still pass through these areas + //Example: waypointBlacklistAir[] = {"Aggelochori","Panochori","Zaros"}; + waypointBlacklistAir[] = {}; //Affects Air vehicles (including UAVs) + waypointBlacklistLand[] = {}; //Affects Land vehicles (including UGVs) + + + /* AI Air Vehicle patrol settings. + + IMPORTANT: UAVs (Unmanned aerial vehicles) are not supported by this function. UAV spawns can be configured in the "UAV Patrol Settings" section further below. + + A3XAI will create AI vehicle patrols that will randomly travel between different cities and towns, and engage any players encountered. + Helicopters with available cargo space may also occasionally deploy an AI group by parachute. + --------------------------------------------------------------------------------------------------------------------*/ + + //Global maximum number of active AI air vehicle patrols. Set at 0 to disable (Default: 0). + maxAirPatrols = 3; + + //Probability of spawning Level 0/1/2/3 AI air vehicle patrol spawns. Probabilities should add up to 1.00 + levelChancesAir[] = {0.00,0.50,0.35,0.15}; + + //Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900). + respawnAirMinTime = 600; + respawnAirMaxTime = 900; + + //Classnames of air vehicle types to use, with the maximum amount of each type to spawn. + airVehicleList[] = { + {"B_Heli_Light_01_armed_F",5}, + {"B_Heli_Transport_01_F",5}, + {"B_Heli_Transport_03_F",2} + }; + + //Maximum number of gunner units per air vehicle. Limited by actual number of available gunner positions. (Default: 2) + //Affects: All AI air vehicle patrols, including custom and reinforcement. + airGunnerUnits = 2; + + //Probability of AI helicopter sucessfully detecting player if there is line-of-sight. AI helicopters will conduct a visual sweep upon arriving at each waypoint and some distance after leaving. (Default: 0.80) + //Affects: All AI air vehicle patrols, including custom and reinforcement. + airDetectChance = 0.80; + + //Probability of AI to deploy infantry units by parachute if players are nearby when helicopter is investigating a waypoint. (Default: 0.50) + //Affects: Air vehicle patrols. + paradropChance = 0.50; + + //Cooldown time for AI paradrop deployment in seconds. (Default: 1800). + //Affects: Air vehicle patrols. + paradropCooldown = 1800; + + //Number of infantry AI to paradrop if players are nearby when helicopter is investigating a waypoint, or if helicopter is reinforcing a dynamic AI spawn. Limited by number of cargo seats available in the vehicle. (Default: 3) + //Affects: Air vehicle patrols, air reinforcements. + paradropAmount = 3; + + + /* AI Land Vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns. + + IMPORTANT: UGVs (Unmanned ground vehicles) are not supported by this function. UGV spawns can be configured in the "UGV Patrol Settings" section further below. + + A3XAI will create AI vehicle patrols that will randomly travel between different cities and towns, and engage any players encountered. + --------------------------------------------------------------------------------------------------------------------*/ + + //Global maximum number of active AI land vehicle patrols. Set at 0 to disable (Default: 0). + maxLandPatrols = 15; + + //Probability of spawning Level 0/1/2/3 AI land vehicle spawns. Probabilities should add up to 1.00 + levelChancesLand[] = {0.00,0.50,0.35,0.15}; + + //Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900). + respawnLandMinTime = 600; + respawnLandMaxTime = 900; + + //Classnames of land vehicle types to use, with the maximum amount of each type to spawn. + landVehicleList[] = { + {"Exile_Car_Hatchback_Rusty1",5}, + {"Exile_Car_Hatchback_Rusty2",5}, + {"Exile_Car_Hatchback_Rusty3",5}, + {"Exile_Car_Hatchback_Sport_Red",5}, + {"Exile_Car_SUV_Red",5}, + {"Exile_Car_Offroad_Rusty1",5}, + {"Exile_Car_Offroad_Rusty2",5}, + {"Exile_Car_Offroad_Rusty3",5}, + {"Exile_Car_Offroad_Repair_Civillian",5}, + {"Exile_Car_Offroad_Armed_Guerilla01",5}, + {"Exile_Car_Strider",5}, + {"Exile_Car_Hunter",5}, + {"Exile_Car_Ifrit",5}, + {"Exile_Car_Van_Black",5}, + {"Exile_Car_Van_Box_Black",5}, + {"Exile_Car_Van_Fuel_Black",5}, + {"Exile_Car_Zamak",5}, + {"Exile_Car_Tempest",5}, + {"Exile_Car_HEMMT",5}, + + // Additional Vehicles + {"B_GEN_Offroad_01_gen_F",5}, + {"C_Offroad_02_unarmed_F",5}, + {"I_C_Offroad_02_unarmed_F",5}, + {"Exile_Car_LandRover_Green",5}, + {"Exile_Car_LandRover_Red",5}, + {"Exile_Car_LandRover_Urban",5}, + {"Exile_Car_LandRover_Desert",5}, + {"Exile_Bike_QuadBike_Black",5}, + {"Exile_Car_UAZ_Open_Green",5}, + {"Exile_Car_SUV_Black",5}, + {"Exile_Car_SUV_Orange",5}, + {"Exile_Car_SUV_Rusty1",5}, + {"Exile_Car_SUV_Rusty2",5}, + {"Exile_Car_SUV_Rusty3",5}, + {"Exile_Car_Offroad_Guerilla01",5}, + {"Exile_Car_Offroad_Guerilla02",5}, + {"Exile_Car_Offroad_Guerilla03",5}, + {"Exile_Car_Offroad_Guerilla04",5}, + {"Exile_Car_Offroad_Guerilla05",5}, + {"Exile_Car_Offroad_Guerilla06",5}, + {"Exile_Car_Offroad_Guerilla07",5}, + {"Exile_Car_Offroad_Guerilla08",5}, + {"Exile_Car_Offroad_Guerilla09",5}, + {"Exile_Car_Offroad_Guerilla10",5}, + {"Exile_Car_Offroad_Guerilla11",5}, + {"Exile_Car_Offroad_Guerilla12",5}, + {"B_LSV_01_unarmed_black_F",5}, + {"O_T_LSV_02_unarmed_black_F",5}, + {"O_T_Truck_03_device_ghex_F",5}, + {"Exile_Car_Offroad_Armed_Guerilla12",5}, + {"Exile_Car_Offroad_Armed_Guerilla03",5} + }; + + //Maximum number of gunner units per land vehicle. Limited by actual number of available gunner positions. (Default: 2) + landGunnerUnits = 2; + + //Maximum number of cargo units per land vehicle. Limited by actual number of available cargo positions. (Default: 3) + landCargoUnits = 3; + + + /* AI Air Reinforcement Settings + + Allowed types of AI groups (defined by airReinforcementAllowedTypes) may call for temporary air reinforcements if a player kills one of their units. + Probability to summon reinforcements determined by airReinforcementSpawnChance, where is the level of the calling group. + Once summoned, armed reinforcement vehicles will remain in the area for a duration determined by airReinforcementDuration and engage nearby players. + Unarmed reinforcement vehicles will deploy a paradrop group and exit the area. + + --------------------------------------------------------------------------------------------------------------------*/ + + //Maximum allowed number of simultaneous active reinforcements (Default: 5) + maxAirReinforcements = 5; + + //Air vehicles to use as reinforcement vehicles. Default: {"B_Heli_Transport_01_F","B_Heli_Light_01_armed_F"} + //Armed air vehicles will detect and engage players within reinforcement area. Unarmed air vehicles will deploy an AI paradrop group. + airReinforcementVehicles[] = { + "B_Heli_Transport_01_F", + "B_Heli_Light_01_armed_F" + }; + + //Probability to spawn reinforcements for each AI level. + airReinforcementSpawnChance0 = 0.00; + airReinforcementSpawnChance1 = 0.10; + airReinforcementSpawnChance2 = 0.20; + airReinforcementSpawnChance3 = 0.30; + + //AI types permitted to summon reinforcements. Default: airReinforcementAllowedFor[] = {"static","dynamic","random"}; + //Usable AI types: "static", "dynamic", "random", "air", "land", "staticcustom", "aircustom", "landcustom", "vehiclecrew" + airReinforcementAllowedFor[] = {"static","dynamic","random"}; + + //Maximum time for reinforcement for armed air vehicles in seconds. AI air vehicle will leave the area after this time if not destroyed. + airReinforcementDuration0 = 120; + airReinforcementDuration1 = 180; + airReinforcementDuration2 = 240; + airReinforcementDuration3 = 300; + + + /* UAV Patrol Settings + + IMPORTANT: UAV patrols are a feature in testing, and may undergo significant changes or possible removal in future versions. + + A3XAI can spawn UAVs that patrol between named locations, and deploy air reinforcements if players are found. + In order for air reinforcements to be deployed, maxAirReinforcements must be greater than zero and the current limit of air reinforcements has not been exceeded. + --------------------------------------------------------------------------------------------------------------------*/ + + //Global maximum number of active UAV patrols. Set at 0 to disable (Default: 0). + maxUAVPatrols = 2; + + //Classnames of UAV types to use, with the maximum amount of each type to spawn. + UAVList[] = { + {"I_UAV_02_CAS_F",5}, + {"I_UAV_02_F",5}, + {"B_UAV_02_CAS_F",5}, + {"B_UAV_02_F",5}, + {"O_UAV_02_CAS_F",5}, + {"O_UAV_02_F",5} + }; + + //Probability of spawning Level 0/1/2/3 UAV spawns. Probabilities should add up to 1.00 + levelChancesUAV[] = {0.35,0.50,0.15,0.00}; + + //Set minimum and maximum wait time in seconds to respawn a UAV after vehicle is destroyed or disabled. (Default: Min 600, Max 900). + respawnUAVMinTime = 600; + respawnUAVMaxTime = 900; + + //Set to '1' to set detection-only behavior (UAV will not directly engage enemies). (Default: 0) + detectOnlyUAVs = 0; + + //Cooldown required in between air reinforcement summons when detecting players. Value in seconds. (Default: 1800) + UAVCallReinforceCooldown = 1800; + + //Probability to successfully detect player if there is line-of-sight. If at least one player is detected, air reinforcements will be summoned to the area. (Default: 0.50) + UAVDetectChance = 0.80; + + + /* UGV Patrol Settings + + IMPORTANT: UGV patrols are a feature in testing, and may undergo significant changes or possible removal in future versions. + + A3XAI can spawn UGVs that patrol between named locations, and deploy air reinforcements if players are found. Damaged UGVs repair themselves over time if not engaging enemes. + In order for air reinforcements to be deployed, maxAirReinforcements must be greater than zero and the current limit of air reinforcements has not been exceeded. + --------------------------------------------------------------------------------------------------------------------*/ + + //Global maximum number of active UGV patrols. Set at 0 to disable (Default: 0). + maxUGVPatrols = 0; + + //Classnames of UGV types to use, with the maximum amount of each type to spawn. + UGVList[] = { + {"I_UGV_01_rcws_F",5}, + {"B_UGV_01_rcws_F",5}, + {"O_UGV_01_rcws_F",5} + }; + + //Probability of spawning Level 0/1/2/3 AI UGV spawns. Probabilities should add up to 1.00 + levelChancesUGV[] = {0.35,0.50,0.15,0.00}; + + //Set minimum and maximum wait time in seconds to respawn a UGV patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900). + respawnUGVMinTime = 600; + respawnUGVMaxTime = 900; + + //Set to '1' to set detection-only behavior (UGV will not directly engage enemies). (Default: 0) + detectOnlyUGVs = 0; + + //Cooldown required in between air reinforcement summons when detecting players. Value in seconds. (Default: 1800) + UGVCallReinforceCooldown = 1800; + + //Probability to successfully detect player if there is line-of-sight. If at least one player is detected, air reinforcements will be summoned to the area. (Default: 0.50) + UGVDetectChance = 0.80; + + + /* + AI skill settings. + + These settings affect all AI units spawned by A3XAI. + + Skill Level: Description + 0: Low-level AI found in villages + 1: Medium-level AI found in cities and capital cities + 2: High-level AI found in remote areas such as factories and military bases + 3: Expert-level AI. + + Valid skill range: 0.00 - 1.00. + Hint: For all skill types, higher number = better skill. For skill sub-type explanation, see: https://community.bistudio.com/wiki/AI_Sub-skills + */ + + //AI skill settings level 0 (Skill, Minimum skill, Maximum skill). Defaults: Accuracy 0.05-0.10, Others 0.30-0.50 + skill0[] = { + {"aimingAccuracy",0.05,0.10}, + {"aimingShake",0.30,0.50}, + {"aimingSpeed",0.30,0.50}, + {"spotDistance",0.30,0.50}, + {"spotTime",0.30,0.50}, + {"courage",0.30,0.50}, + {"reloadSpeed",0.30,0.50}, + {"commanding",0.30,0.50}, + {"general",0.30,0.50} + }; + + //AI skill settings level 1 (Skill, Minimum skill, Maximum skill). Defaults: Accuracy 0.10-0.15, Others 0.40-0.60 + skill1[] = { + {"aimingAccuracy",0.10,0.15}, + {"aimingShake",0.40,0.60}, + {"aimingSpeed",0.40,0.60}, + {"spotDistance",0.40,0.60}, + {"spotTime",0.40,0.60}, + {"courage",0.40,0.60}, + {"reloadSpeed",0.40,0.60}, + {"commanding",0.40,0.60}, + {"general",0.40,0.60} + }; + + //AI skill settings level 2 (Skill, Minimum skill, Maximum skill). Defaults: Accuracy 0.15-0.20, Others 0.50-0.70 + skill2[] = { + {"aimingAccuracy",0.15,0.20}, + {"aimingShake",0.50,0.70}, + {"aimingSpeed",0.50,0.70}, + {"spotDistance",0.50,0.70}, + {"spotTime",0.50,0.70}, + {"courage",0.50,0.70}, + {"reloadSpeed",0.50,0.70}, + {"commanding",0.50,0.70}, + {"general",0.50,0.70} + }; + + //AI skill settings level 3 (Skill, Minimum skill, Maximum skill). Defaults: Accuracy 0.20-0.25, Others 0.60-0.80 + skill3[] = { + {"aimingAccuracy",0.20,0.25}, + {"aimingShake",0.60,0.80}, + {"aimingSpeed",0.60,0.80}, + {"spotDistance",0.60,0.80}, + {"spotTime",0.60,0.80}, + {"courage",0.60,0.80}, + {"reloadSpeed",0.60,0.80}, + {"commanding",0.60,0.80}, + {"general",0.60,0.80} + }; + + + /* AI loadout probability settings. + --------------------------------------------------------------------------------------------------------------------*/ + + //Probabilities to equip backpack, according to AI level. + addBackpackChance0 = 0.60; + addBackpackChance1 = 0.70; + addBackpackChance2 = 0.80; + addBackpackChance3 = 0.90; + + //Probabilities to equip vest, according to AI level. + addVestChance0 = 0.60; + addVestChance1 = 0.70; + addVestChance2 = 0.80; + addVestChance3 = 0.90; + + //Probabilities to equip headgear, according to AI level. + addHeadgearChance0 = 0.60; + addHeadgearChance1 = 0.70; + addHeadgearChance2 = 0.80; + addHeadgearChance3 = 0.90; + + //Probabilities to equip level 0-3 AI with each weapon type. Order: {pistols, rifles, machineguns, sniper rifles}. Probabilities must add up to 1.00. + useWeaponChance0[] = {0.20,0.80,0.00,0.00}; + useWeaponChance1[] = {0.00,0.90,0.05,0.05}; + useWeaponChance2[] = {0.00,0.80,0.10,0.10}; + useWeaponChance3[] = {0.00,0.70,0.15,0.15}; + + //Probability to select a random optics attachment (ie: scopes) for level 0-3 AI + opticsChance0 = 0.00; + opticsChance1 = 0.30; + opticsChance2 = 0.60; + opticsChance3 = 0.90; + + //Probability to select a random pointer attachment (ie: flashlights) for level 0-3 AI + pointerChance0 = 0.00; + pointerChance1 = 0.30; + pointerChance2 = 0.60; + pointerChance3 = 0.90; + + //Probability to select a random muzzle attachment (ie: suppressors) for level 0-3 AI + muzzleChance0 = 0.00; + muzzleChance1 = 0.30; + muzzleChance2 = 0.60; + muzzleChance3 = 0.90; + + //Probability to select a random underbarrel attachment (ie: bipods) for level 0-3 AI + underbarrelChance0 = 0.00; + underbarrelChance1 = 0.30; + underbarrelChance2 = 0.60; + underbarrelChance3 = 0.90; + + + /* AI loot quantity settings + --------------------------------------------------------------------------------------------------------------------*/ + + //Maximum number of food loot items found on AI. (Default: 2) + foodLootCount = 2; + + //Maximum number of items to select from MiscLoot (generic loot) table. (Default: 2) + miscLootCount = 2; + + + /* AI loot probability settings. AI loot is pre-generated into a pool for each unit and randomly pulled to units as time passes. + --------------------------------------------------------------------------------------------------------------------*/ + + //Chance to add a single InstaDoc to group loot pool per unit (Default: 0.25) + firstAidKitChance = 0.25; + + //Probability to successfully pull a random item from loot pool for level 0-3 AI. Influences the rate at which loot items are added to units. + lootPullChance0 = 0.20; + lootPullChance1 = 0.40; + lootPullChance2 = 0.60; + lootPullChance3 = 0.80; + + + /* Respect rewards for AI kills. Note: This section only has effects if enableRespectRewards is enabled. + --------------------------------------------------------------------------------------------------------------------*/ + + //Enable Exile-style handling (ie: Respect rewards, kill-count tracking) for AI kills (Default: 1) + enableRespectRewards = 1; + + //Respect bonus for kills with Axe + respectHumiliation = 300; + + //Respect bonus for standard kills + respectFragged = 100; + + //Respect bonus for collision kills with parachute + respectChute = 600; + + //Respect bonus for collision kills with air vehicle + respectBigBird = 600; + + //Respect bonus for collision kills by vehicle driver + respectRoadkill = 500; + + //Respect bonus for kills with vehicle weapons + respectLetItRain = 150; + + //Respect bonus per kill streak + respectKillstreak = 50; + + //Respect bonus per 100m distance from target + respectPer100m = 10; + + + /* + AI skin, weapon, loot, and equipment settings + + Note: Some of the below tables may not be used by A3XAI if a dynamic classname setting is enabled. Check each section below for details. + */ + + //AI uniform classnames. Note: uniformTypes0-3 will not be read if generateDynamicUniforms is enabled. + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + uniformTypes0[] = {"U_C_Journalist","U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour","U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Scientist"}; + uniformTypes1[] = {"U_B_CombatUniform_mcam_worn","U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3","U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_OfficerUniform","U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo","U_C_HunterBody_grn","U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_BG_Guerilla2_1","U_IG_Guerilla3_2","U_BG_Guerrilla_6_1","U_BG_Guerilla1_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_leader","U_IG_leader","U_B_GhillieSuit","U_I_GhillieSuit","U_O_GhillieSuit","U_B_HeliPilotCoveralls","U_I_HeliPilotCoveralls","U_B_PilotCoveralls","U_I_pilotCoveralls"}; + uniformTypes2[] = {"U_OrestesBody","U_NikosAgedBody","U_NikosBody","U_B_CombatUniform_mcam","U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3","U_O_OfficerUniform_ocamo","U_B_SpecopsUniform_sgg","U_O_SpecopsUniform_blk","U_O_SpecopsUniform_ocamo","U_I_G_Story_Protagonist_F","U_IG_Guerilla2_1","U_BG_Guerrilla_6_1","U_I_G_resistanceLeader_F","U_B_FullGhillie_ard","U_B_FullGhillie_lsh","U_B_FullGhillie_sard","U_B_GhillieSuit","U_I_FullGhillie_ard","U_I_FullGhillie_lsh","U_I_FullGhillie_sard","U_I_GhillieSuit","U_O_FullGhillie_ard","U_O_FullGhillie_lsh","U_O_FullGhillie_sard","U_O_GhillieSuit","U_I_Wetsuit","U_O_Wetsuit","U_B_Wetsuit","U_B_survival_uniform"}; + uniformTypes3[] = {"U_OrestesBody","U_NikosAgedBody","U_NikosBody","U_O_OfficerUniform_ocamo","U_B_SpecopsUniform_sgg","U_O_SpecopsUniform_blk","U_O_SpecopsUniform_ocamo","U_I_G_Story_Protagonist_F","U_I_G_resistanceLeader_F","U_B_FullGhillie_ard","U_B_FullGhillie_lsh","U_B_FullGhillie_sard","U_I_FullGhillie_ard","U_I_FullGhillie_lsh","U_I_FullGhillie_sard","U_O_FullGhillie_ard","U_O_FullGhillie_lsh","U_O_FullGhillie_sard","U_I_Wetsuit","U_O_Wetsuit","U_B_Wetsuit","U_B_survival_uniform"}; + + //AI weapon classnames. Note: pistolList, rifleList, machinegunList, sniperList will not be read if generateDynamicWeapons is enabled. + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + pistolList[] = {"hgun_ACPC2_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Rook40_F"}; + rifleList[] = {"arifle_Katiba_C_F","arifle_Katiba_F","arifle_Katiba_GL_F","arifle_Mk20_F","arifle_Mk20_GL_F","arifle_Mk20_GL_plain_F","arifle_Mk20_plain_F","arifle_Mk20C_F","arifle_Mk20C_plain_F","arifle_MX_Black_F","arifle_MX_F","arifle_MX_GL_Black_F","arifle_MX_GL_F","arifle_MXC_Black_F","arifle_MXC_F","arifle_SDAR_F","arifle_TRG20_F","arifle_TRG21_F","arifle_TRG21_GL_F"}; + machinegunList[] = {"arifle_MX_SW_Black_F","arifle_MX_SW_F","LMG_Mk200_F","LMG_Zafir_F","MMG_01_hex_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F","MMG_02_sand_F"}; + sniperList[] = {"arifle_MXM_Black_F","arifle_MXM_F","srifle_DMR_01_F","srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_khaki_F","srifle_DMR_03_multicam_F","srifle_DMR_03_tan_F","srifle_DMR_03_woodland_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_f","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F","srifle_EBR_F","srifle_GM6_camo_F","srifle_GM6_F","srifle_LRR_camo_F","srifle_LRR_F"}; + + //AI weapon scope attachment settings. Note: weaponOpticsList will not be read if generateDynamicOptics is enabled. + weaponOpticsList[] = {"optic_NVS","optic_SOS","optic_LRPS","optic_AMS","optic_AMS_khk","optic_AMS_snd","optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan","optic_DMS","optic_Arco","optic_Hamr","Elcan_Exile","Elcan_reflex_Exile","optic_MRCO","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Yorris","optic_MRD"}; + + //AI backpack types (for AI levels 0-3). Note: backpackTypes0-3 will not be read if generateDynamicBackpacks is enabled. + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + backpackTypes0[] = {"B_AssaultPack_blk","B_AssaultPack_cbr","B_AssaultPack_dgtl","B_AssaultPack_khk","B_AssaultPack_mcamo","B_AssaultPack_rgr","B_AssaultPack_sgg","B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan"}; + backpackTypes1[] = {"B_Bergen_blk","B_Bergen_mcamo","B_Bergen_rgr","B_Bergen_sgg","B_FieldPack_blk","B_FieldPack_cbr","B_FieldPack_ocamo","B_FieldPack_oucamo","B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan","B_TacticalPack_blk","B_TacticalPack_mcamo","B_TacticalPack_ocamo","B_TacticalPack_oli","B_TacticalPack_rgr"}; + backpackTypes2[] = {"B_Bergen_blk","B_Bergen_mcamo","B_Bergen_rgr","B_Bergen_sgg","B_Carryall_cbr","B_Carryall_khk","B_Carryall_mcamo","B_Carryall_ocamo","B_Carryall_oli","B_Carryall_oucamo","B_FieldPack_blk","B_FieldPack_cbr","B_FieldPack_ocamo","B_FieldPack_oucamo","B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg"}; + backpackTypes3[] = {"B_Carryall_cbr","B_Carryall_khk","B_Carryall_mcamo","B_Carryall_ocamo","B_Carryall_oli","B_Carryall_oucamo","B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg"}; + + //AI vest types (for AI levels 0-3). Note: vestTypes0-3 will not be read if generateDynamicVests is enabled. + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + vestTypes0[] = {"V_Press_F","V_Rangemaster_belt","V_BandollierB_blk","V_BandollierB_cbr","V_BandollierB_khk","V_BandollierB_oli","V_BandollierB_rgr","V_Chestrig_blk","V_Chestrig_khk","V_Chestrig_oli","V_Chestrig_rgr"}; + vestTypes1[] = {"V_Chestrig_blk","V_Chestrig_khk","V_Chestrig_oli","V_Chestrig_rgr","V_HarnessO_brn","V_HarnessO_gry","V_HarnessOGL_brn","V_HarnessOGL_gry","V_HarnessOSpec_brn","V_HarnessOSpec_gry","V_PlateCarrier1_blk","V_PlateCarrier1_rgr","V_PlateCarrier2_rgr","V_PlateCarrier3_rgr","V_PlateCarrierH_CTRG","V_PlateCarrierIA1_dgtl","V_PlateCarrierIA2_dgtl","V_PlateCarrierL_CTRG"}; + vestTypes2[] = {"V_TacVest_blk","V_TacVest_blk_POLICE","V_TacVest_brn","V_TacVest_camo","V_TacVest_khk","V_TacVest_oli","V_TacVestCamo_khk","V_TacVestIR_blk","V_I_G_resistanceLeader_F","V_PlateCarrier2_rgr","V_PlateCarrier3_rgr","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierGL_rgr","V_PlateCarrierH_CTRG","V_PlateCarrierIA1_dgtl","V_PlateCarrierIA2_dgtl","V_PlateCarrierIAGL_dgtl","V_PlateCarrierIAGL_oli","V_PlateCarrierL_CTRG","V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierSpec_rgr"}; + vestTypes3[] = {"V_TacVest_blk_POLICE","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierGL_rgr","V_PlateCarrierIAGL_dgtl","V_PlateCarrierIAGL_oli","V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierSpec_rgr"}; + + //AI head gear types. Note: headgearTypes0-3 will not be read if generateDynamicHeadgear is enabled. + headgearTypes0[] = {"H_Cap_blk","H_Cap_blk_Raven","H_Cap_blu","H_Cap_brn_SPECOPS","H_Cap_grn","H_Cap_headphones","H_Cap_khaki_specops_UK","H_Cap_oli","H_Cap_press","H_Cap_red","H_Cap_tan","H_Cap_tan_specops_US","H_Watchcap_blk","H_Watchcap_camo"}; + headgearTypes1[] = {"H_Beret_02","H_Beret_blk","H_Beret_blk_POLICE","H_Beret_brn_SF","H_Beret_grn","H_Beret_grn_SF","H_Beret_ocamo","H_Beret_red","H_Shemag_khk","H_Shemag_olive","H_Shemag_olive_hs","H_Shemag_tan"}; + headgearTypes2[] = {"H_Beret_Colonel","H_HelmetB","H_HelmetB_black","H_HelmetB_camo","H_HelmetB_desert","H_HelmetB_grass","H_HelmetB_paint","H_HelmetB_plain_blk","H_HelmetB_sand","H_HelmetB_snakeskin","H_HelmetLeaderO_ocamo","H_HelmetLeaderO_oucamo","H_HelmetO_ocamo","H_HelmetO_oucamo","H_HelmetSpecB","H_HelmetSpecB_blk","H_HelmetSpecB_paint1","H_HelmetSpecB_paint2","H_HelmetSpecO_blk","H_HelmetSpecO_ocamo","H_CrewHelmetHeli_B","H_CrewHelmetHeli_I","H_CrewHelmetHeli_O","H_PilotHelmetHeli_B","H_PilotHelmetHeli_I","H_PilotHelmetHeli_O"}; + headgearTypes3[] = {"H_Beret_Colonel","H_HelmetB_camo","H_HelmetLeaderO_ocamo","H_HelmetLeaderO_oucamo","H_HelmetO_ocamo","H_HelmetO_oucamo","H_HelmetSpecO_blk","H_HelmetSpecO_ocamo","H_PilotHelmetHeli_B","H_PilotHelmetHeli_I","H_PilotHelmetHeli_O"}; + + + //AI Food/Loot item types. + // Note: foodLoot will not be read if generateDynamicFood is enabled. + // Note: miscLoot will not be read if generateDynamicLoot is enabled. + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + foodLoot[] = {"Exile_Item_GloriousKnakworst","Exile_Item_SausageGravy","Exile_Item_ChristmasTinner","Exile_Item_BBQSandwich","Exile_Item_Surstromming","Exile_Item_Catfood","Exile_Item_PlasticBottleFreshWater","Exile_Item_Beer","Exile_Item_Energydrink"}; + miscLoot[] = {"Exile_Item_Rope","Exile_Item_DuctTape","Exile_Item_ExtensionCord","Exile_Item_FuelCanisterEmpty","Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_MetalBoard","Exile_Item_MetalPole","Exile_Item_CamoTentKit"}; + + + //AI toolbelt item types. Toolbelt items are added to AI inventory upon death. Format: [item classname, item probability] + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + toolsList0[] = { + {"Exile_Item_XM8",0.90},{"ItemCompass",0.30},{"ItemMap",0.30},{"ItemGPS",0.00},{"ItemRadio",0.00} + }; + toolsList1[] = { + {"Exile_Item_XM8",0.90},{"ItemCompass",0.50},{"ItemMap",0.50},{"ItemGPS",0.10},{"ItemRadio",0.10} + }; + toolsList2[] = { + {"Exile_Item_XM8",0.90},{"ItemCompass",0.70},{"ItemMap",0.70},{"ItemGPS",0.20},{"ItemRadio",0.20} + }; + toolsList3[] = { + {"Exile_Item_XM8",0.90},{"ItemCompass",0.90},{"ItemMap",0.90},{"ItemGPS",0.30},{"ItemRadio",0.30} + }; + + + //AI-useable toolbelt item types. These items are added to AI inventory at unit creation and may be used by AI. Format: {item classname, item probability} + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + gadgetsList0[] = { + {"binocular",0.30},{"NVGoggles",0.00} + }; + gadgetsList1[] = { + {"binocular",0.50},{"NVGoggles",0.10} + }; + gadgetsList2[] = { + {"binocular",0.70},{"NVGoggles",0.15} + }; + gadgetsList3[] = { + {"binocular",0.90},{"NVGoggles",0.20} + }; +}; diff --git a/@A3XAI_HC/Keys/a3xai.bikey b/@A3XAI_HC/Keys/a3xai.bikey new file mode 100644 index 0000000..a7bd534 Binary files /dev/null and b/@A3XAI_HC/Keys/a3xai.bikey differ diff --git a/@A3XAI_HC/addons/a3xai.pbo b/@A3XAI_HC/addons/a3xai.pbo new file mode 100644 index 0000000..0094c2e Binary files /dev/null and b/@A3XAI_HC/addons/a3xai.pbo differ diff --git a/@A3XAI_HC/addons/a3xai.pbo.a3xai.bisign b/@A3XAI_HC/addons/a3xai.pbo.a3xai.bisign new file mode 100644 index 0000000..b5239a6 Binary files /dev/null and b/@A3XAI_HC/addons/a3xai.pbo.a3xai.bisign differ diff --git a/@ExileServer/ExileLootDrop.cfg b/@ExileServer/ExileLootDrop.cfg new file mode 100644 index 0000000..db78e27 --- /dev/null +++ b/@ExileServer/ExileLootDrop.cfg @@ -0,0 +1,1167 @@ +/* + /////////////////////////////////////////////////////////////////////////////// + // Class Names + /////////////////////////////////////////////////////////////////////////////// + + Remember that item class names, group names and loot table names cannot + contain spaces. Also be 100% sure to have the exact same name as in Arma, + as they are *case sensive*. + + /////////////////////////////////////////////////////////////////////////////// + // Item Groups + /////////////////////////////////////////////////////////////////////////////// + + You can link one group of items to loot tables. + One item should only be in one group. + + Syntax: + = + , + + /////////////////////////////////////////////////////////////////////////////// + // Propability + /////////////////////////////////////////////////////////////////////////////// + + , + + 10, Banana + 20, Tomato + 30, Cherry + + Sum of chances: + 10 + 20 + 30 = 60 = 100% + + Spawn chances: + Banana 10 : 60 = 10 * 100 / 60 = 16.67% + Tomato 20 : 60 = 20 * 100 / 60 = 33.33% + Cherry 30 : 60 = 30 * 100 / 60 = 50% + + In words: + If Exile should spawn an item of the above group, it has a 33.33% + chance to spawn a Banana. + + /////////////////////////////////////////////////////////////////////////////// + // Loot Tables + /////////////////////////////////////////////////////////////////////////////// + + Defines which item group spawns in which building type. The loot table itself + is linked with a building in exile_server_config.pbo/config/CfgBuildings. Spawn + chances work like for items. + + Syntax: + > + , +*/ + + + +/* + Loot Tables +*/ + +/////////////////////////////////////////////////////////////////////////////// +// Slums/Ghetto, Farms, Village Houses, Castle etc. +// Spawn Guerilla things :) +/////////////////////////////////////////////////////////////////////////////// +> CivillianLowerClass +30, Trash +28, Food +10, Drinks +8, Pistols +5, PistolAmmo +3, PistolAttachments +4, Shotguns +3, ShotgunAmmo +4, SMG +3, SMGAmmo +3, SMGAttachments +20, CivilianClothing +11, CivilianBackpacks +5, CivilianVests +20, CivilianHeadgear +10, CivilianItems +1, Restraints +10, Chemlights +10, RoadFlares + +/////////////////////////////////////////////////////////////////////////////// +// Apartments, Offices etc. +/////////////////////////////////////////////////////////////////////////////// +> CivillianUpperClass +30, Trash +28, Food +10, Drinks +8, Pistols +5, PistolAmmo +3, PistolAttachments +4, Shotguns +3, ShotgunAmmo +4, SMG +3, SMGAmmo +3, SMGAttachments +3, Rifles +3, RifleAmmo +3, RifleAttachments +20, CivilianClothing +11, CivilianBackpacks +5, CivilianVests +20, CivilianHeadgear +10, CivilianItems +10, Chemlights +10, RoadFlares +1, Restraints + +/////////////////////////////////////////////////////////////////////////////// +// Kiosks, Supermarkets etc. +/////////////////////////////////////////////////////////////////////////////// +> Shop +30, Trash +15, Food +15, Drinks +10, Pistols +2, PistolAmmo +1, PistolAttachments +4, Shotguns +1, ShotgunAmmo +5, SMG +1, SMGAmmo +1, SMGAttachments +5, CivilianBackpacks +1, CivilianClothing +3, CivilianHeadgear +1, CivilianVests +7, CivilianItems +5, Chemlights +5, RoadFlares +4, SmokeGrenades +3, IndustrialItems +3, Restraints +3, MedicalItems + +/////////////////////////////////////////////////////////////////////////////// +// Construction Sites, Warehouses, Research etc. +/////////////////////////////////////////////////////////////////////////////// +> Industrial +30, Trash +40, IndustrialItems +25, Vehicle +15, RoadFlares +5, Restraints + +/////////////////////////////////////////////////////////////////////////////// +// Factories +/////////////////////////////////////////////////////////////////////////////// +> Factories +10, Electronics +40, Trash +50, IndustrialItems + +/////////////////////////////////////////////////////////////////////////////// +// Fuel Stations, Garages, Workshops etc. +/////////////////////////////////////////////////////////////////////////////// +> VehicleService +30, Trash +25, IndustrialItems +40, Vehicle +15, RoadFlares +5, Restraints + +/////////////////////////////////////////////////////////////////////////////// +// Towers, Barracks, Hangars etc. +/////////////////////////////////////////////////////////////////////////////// +> Military +100, Trash +4, CivilianItems +4, GuerillaItems +3, HEGrenades +3, UGLFlares +3, UGLSmokes +3, HandGrenades +3, SmokeGrenades +2, Restraints +2, MedicalItems +5, GuerillaClothing +5, MilitaryClothing +4, GuerillaBackpacks +3, MilitaryBackpacks +3, GuerillaVests +3, MilitaryVests +3, DLCVests +3, GuerillaHeadgear +3, MilitaryHeadgear +1, Ghillies +1, DLCGhillies +1, Rebreathers +5, Rifles +3, RifleAmmo +3, RifleAttachments +4, LMG +2, LMGAmmo +3, Snipers +2, SniperAmmo +2, SniperAttachments +3, DLCRifles +2, DLCAmmo +2, DLCOptics +2, DLCSupressor +2, Bipods +5, Explosives + +/////////////////////////////////////////////////////////////////////////////// +// Hospital, Medevac etc. (Does not spawn on Altis!) +/////////////////////////////////////////////////////////////////////////////// +> Medical +30, Trash +70, MedicalItems + +/////////////////////////////////////////////////////////////////////////////// +// Light Houses + Life Guard Towers + Castles +/////////////////////////////////////////////////////////////////////////////// +> Tourist +10, MilitaryBackpacks +10, MilitaryHeadgear +5, Ghillies +5, DLCGhillies +20, Snipers +2, SniperAmmo +2, SniperAttachments +20, DLCRifles +2, DLCAmmo +2, DLCOptics +2, DLCSupressor +4, CivilianItems +4, HandGrenades +4, Restraints +4, MedicalItems +4, Explosives + +/////////////////////////////////////////////////////////////////////////////// +// Ghost Hotel Buildings +/////////////////////////////////////////////////////////////////////////////// +> Radiation +10, MilitaryBackpacks +10, MilitaryHeadgear +5, Ghillies +5, DLCGhillies +30, Snipers +2, SniperAmmo +2, SniperAttachments +30, DLCRifles +2, DLCAmmo +2, DLCOptics +2, DLCSupressor +4, HandGrenades +4, Restraints +4, MedicalItems +10, Explosives +4, EpicWeapons + +/* + Item Groups +*/ + +/////////////////////////////////////////////////////////////////////////////// +// Food & Drinks +/////////////////////////////////////////////////////////////////////////////// + +> Food +3, Exile_Item_CookingPot +5, Exile_Item_CanOpener +5, Exile_Item_Matches +3, Exile_Item_EMRE // 75% Hunger +6, Exile_Item_GloriousKnakworst // 60% Hunger +7, Exile_Item_Surstromming // 55% Hunger +7, Exile_Item_SausageGravy // 50% Hunger +7, Exile_Item_ChristmasTinner // 40% Hunger +7, Exile_Item_MacasCheese // 40% Hunger +7, Exile_Item_BBQSandwich // 40% Hunger +7, Exile_Item_CatFood // 40% Hunger +7, Exile_Item_Dogfood // 30% Hunger +7, Exile_Item_BeefParts // 30% Hunger +7, Exile_Item_Cheathas // 30% Hunger +7, Exile_Item_DsNuts // 30% Hunger +7, Exile_Item_Noodles // 25% Hunger +8, Exile_Item_CockONut // 20% Hunger +8, Exile_Item_SeedAstics // 20% Hunger +9, Exile_Item_Raisins // 15% Hunger +9, Exile_Item_Moobar // 10% Hunger +11, Exile_Item_InstantCoffee // 5% Hunger + +> Drinks +7, Exile_Item_PowerDrink // +95% Thirst +12, Exile_Item_PlasticBottleFreshWater // +80% Thirst +14, Exile_Item_Beer // +75% Thirst +17, Exile_Item_EnergyDrink // +75% Thirst +20, Exile_Item_MountainDupe // +50% Thirst, spawns always twice! +25, Exile_Item_ChocolateMilk // +35% Thirst +30, Exile_Item_PlasticBottleDirtyWater // +10% Thirst + + +/////////////////////////////////////////////////////////////////////////////// +// Weapons & Attachments +/////////////////////////////////////////////////////////////////////////////// + +> Pistols +20, hgun_ACPC2_F // ACP-C2 .45 +21, hgun_P07_F // P07 9 mm +20, hgun_Rook40_F // Rook-40 9 mm +13, hgun_Pistol_heavy_01_F // 4-five .45 +13, hgun_Pistol_heavy_02_F // Zubr .45 +13, hgun_Pistol_Signal_F // Starter Pistol +13, Exile_Weapon_Colt1911 // Colt 1911 +13, Exile_Weapon_Makarov // Makarov +13, Exile_Weapon_Taurus // Taurus +13, Exile_Weapon_TaurusGold // Taurus (Gold) +13, hgun_Pistol_01_F // PM 9 mm +13, hgun_P07_khk_F // P07 9 mm (Khaki) + +> PistolAmmo +20, 11Rnd_45ACP_Mag // 4-five +10, 16Rnd_9x21_Mag // PDW2000, P07, ROOK-40 +20, 30Rnd_9x21_Mag // Sting, PDW2000, P07, ROOK-40 +16, 6Rnd_45ACP_Cylinder // Zubr +7, 6Rnd_GreenSignal_F // Starter Pistol +7, 6Rnd_RedSignal_F // Starter Pistol +20, 9Rnd_45ACP_Mag // ACP-C2 +20, Exile_Magazine_7Rnd_45ACP // Colt 1911 +20, Exile_Magazine_8Rnd_9x18 // Makarov +20, Exile_Magazine_6Rnd_45ACP // Taurus +20, 10Rnd_9x21_Mag // PM 9 mm + +> PistolAttachments +36, muzzle_snds_L +36, muzzle_snds_acp +14, optic_Yorris // No one needs this crap +14, optic_MRD + +> Shotguns +1, Exile_Weapon_M1014 //M1014 + +> ShotgunAmmo +1, Exile_Magazine_8Rnd_74Slug //M1014 + +> SMG +34, SMG_01_F // Vermin SMG .45 ACP +33, SMG_02_F // Sting 9 mm +33, SMG_05_F // Protector 9mm +33, hgun_PDW2000_F // PDW2000 9 mm + +> SMGAmmo +50, 30Rnd_45ACP_Mag_SMG_01 // Vermin SMG +50, 30Rnd_45ACP_Mag_SMG_01_Tracer_Green // Vermin SMG +50, 30Rnd_9x21_Mag_SMG_02 // Sting, Protector +50, 30Rnd_9x21_Mag_SMG_02_Tracer_Red // Sting, Protector +50, 30Rnd_9x21_Mag_SMG_02_Tracer_Yellow // Sting, Protector +50, 30Rnd_9x21_Mag_SMG_02_Tracer_Green // Sting, Protector + +> SMGAttachments +20, optic_Holosight_smg +20, optic_Holosight_smg_blk_F +20, optic_ACO_grn_smg +20, optic_Aco_smg +20, optic_ACO_grn +20, optic_Aco + +> Rifles +10, arifle_Katiba_F // Katiba 6.5 mm +8, arifle_Katiba_GL_F // Katiba GL 6.5 mm +8, arifle_MXC_F // MXC 6.5 mm +8, arifle_MX_F // MX 6.5 mm +4, arifle_MX_GL_F // MX 3GL 6.5 mm +6, arifle_MXM_F // MXM 6.5 mm +3, arifle_MXM_Black_F // MXM 6.5 mm (Black) +6, arifle_SDAR_F // SDAR 5.56 mm +8, arifle_TRG21_F // TRG-21 5.56 mm +8, arifle_TRG20_F // TRG-20 5.56 mm +4, arifle_TRG21_GL_F // TRG-21 EGLM 5.56 mm +7, arifle_Mk20_F // Mk20 5.56 mm +7, arifle_Mk20C_F // Mk20C 5.56 mm +4, arifle_Mk20_GL_F // Mk20 EGLM 5.56 mm +3, arifle_MXC_Black_F // MXC 6.5 mm (Black) +3, arifle_MX_Black_F // MX 6.5 mm (Black) +3, arifle_MX_GL_Black_F // MX 3GL 6.5 mm (Black) +10, Exile_Weapon_AK107 +10, Exile_Weapon_AK107_GL +10, Exile_Weapon_AK74_GL +10, Exile_Weapon_AK74 +10, Exile_Weapon_AK47 +10, Exile_Weapon_AKS_Gold +10, Exile_Weapon_DMR +10, Exile_Weapon_LeeEnfield +10, Exile_Weapon_CZ550 +10, Exile_Weapon_SVD +10, Exile_Weapon_SVDCamo +10, Exile_Weapon_VSSVintorez +8, arifle_MX_khk_F // MX 6.5 mm (Khaki) +4, arifle_MX_GL_khk_F // MX 3GL 6.5 mm (Khaki) +8, arifle_MXC_khk_F // MXC 6.5 mm (Khaki) +3, arifle_MXM_khk_F // MXM 6.5 mm (Khaki) +5, arifle_AK12_F // AK-12 7.62 mm +5, arifle_AK12_GL_F // AK-12 GL 7.62 mm +5, arifle_AKM_F // AKM 7.62 mm +5, arifle_AKM_FL_F // AKM 7.62 mm +5, arifle_AKS_F // AKS +5, arifle_ARX_blk_F // Type 115 6.5 mm (Black) +5, arifle_ARX_ghex_F // Type 115 6.5 mm (Green Hex) +5, arifle_ARX_hex_F // Type 115 6.5 mm (Hex) +5, arifle_CTAR_blk_F // CAR-95 5.8 mm (Black) +5, arifle_CTAR_hex_F // CAR-95 5.8 mm (Hex) +5, arifle_CTAR_ghex_F // CAR-95 5.8 mm (Green Hex) +5, arifle_CTAR_GL_blk_F // CAR-95 GL 5.8 mm (Black) +5, arifle_CTARS_blk_F // CAR-95-1 5.8mm (Black) +5, arifle_CTARS_ghex_F // CAR-95-1 5.8mm (Green Hex) +5, arifle_CTARS_hex_F // CAR-95-1 5.8mm (Hex) +5, arifle_SPAR_01_blk_F // SPAR-16 5.56 mm (Black) +5, arifle_SPAR_01_khk_F // SPAR-16 5.56 mm (Khaki) +5, arifle_SPAR_01_snd_F // SPAR-16 5.56 mm (Sand) +5, arifle_SPAR_01_GL_blk_F // SPAR-16 GL 5.56 mm (Black) +5, arifle_SPAR_01_GL_khk_F // SPAR-16 GL 5.56 mm (Khaki) +5, arifle_SPAR_01_GL_snd_F // SPAR-16 GL 5.56 mm (Sand) +5, arifle_SPAR_02_blk_F // SPAR-16S 5.56 mm (Black) +5, arifle_SPAR_02_khk_F // SPAR-16S 5.56 mm (Khaki) +5, arifle_SPAR_02_snd_F // SPAR-16S 5.56 mm (Sand) +5, arifle_SPAR_03_blk_F // SPAR-17 7.62 mm (Black) +5, arifle_SPAR_03_khk_F // SPAR-17 7.62 mm (Khaki) +5, arifle_SPAR_03_snd_F // SPAR-17 7.62 mm (Sand) + +> RifleAmmo +11, 20Rnd_556x45_UW_mag // SDAR +15, 30Rnd_556x45_Stanag // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +15, 30Rnd_556x45_Stanag_green // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +15, 30Rnd_556x45_Stanag_red // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +9, 30Rnd_556x45_Stanag_Tracer_Green // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +9, 30Rnd_556x45_Stanag_Tracer_Red // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +9, 30Rnd_556x45_Stanag_Tracer_Yellow // TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR, SPAR-16 +15, 30Rnd_65x39_caseless_green // Katiba, Type 115 +9, 30Rnd_65x39_caseless_green_mag_Tracer // Katiba, Type 115 +9, 30Rnd_65x39_caseless_mag // MX/C/M/SW/3GL +9, 30Rnd_65x39_caseless_mag_Tracer // MX/C/M/SW/3GL +8, Exile_Magazine_10Rnd_303 // Lee-Enfield +9, Exile_Magazine_30Rnd_762x39_AK // AK +9, Exile_Magazine_30Rnd_545x39_AK // AK +9, Exile_Magazine_30Rnd_545x39_AK_Green // AK +9, Exile_Magazine_30Rnd_545x39_AK_Red // AK +9, Exile_Magazine_30Rnd_545x39_AK_White // AK +9, Exile_Magazine_30Rnd_545x39_AK_Yellow // AK +9, Exile_Magazine_20Rnd_762x51_DMR // DMR +9, Exile_Magazine_20Rnd_762x51_DMR_Yellow // DMR +9, Exile_Magazine_20Rnd_762x51_DMR_Red // DMR +9, Exile_Magazine_20Rnd_762x51_DMR_Green // DMR +9, Exile_Magazine_20Rnd_762x51_DMR_White // DMR +9, Exile_Magazine_5Rnd_22LR // CZ550 +9, Exile_Magazine_10Rnd_762x54 // SVD +9, Exile_Magazine_10Rnd_9x39 // VSS +9, Exile_Magazine_20Rnd_9x39 // VSS +9, 30Rnd_762x39_Mag_F // AK-12, AKM +9, 30Rnd_762x39_Mag_Green_F // AK-12, AKM +9, 30Rnd_762x39_Mag_Tracer_F // AK-12, AKM +9, 30Rnd_762x39_Mag_Tracer_Green_F // AK-12, AKM +9, 30Rnd_762x39_AK47_M // AKS +9, 30Rnd_545x39_Mag_F // AKS +9, 30Rnd_545x39_Mag_Green_F // AKS +9, 30Rnd_545x39_Mag_Tracer_F // AKS +9, 30Rnd_545x39_Mag_Tracer_Green_F // AKS +5, 10Rnd_50BW_Mag_F // Type 115 +9, 30Rnd_580x42_Mag_F // CAR-95 +9, 30Rnd_580x42_Mag_Tracer_F // CAR-95 +9, 100Rnd_580x42_Mag_F // CAR-95-1 +9, 100Rnd_580x42_Mag_Tracer_F // CAR-95-1 +9, 150Rnd_556x45_Drum_Mag_F // SPAR-16S +9, 150Rnd_556x45_Drum_Mag_Tracer_F // SPAR-16S +9, 20Rnd_762x51_Mag // SPAR-17 + +> RifleAttachments +10, muzzle_snds_M +10, muzzle_snds_H +10, muzzle_snds_H_khk_F +10, muzzle_snds_H_snd_F +10, muzzle_snds_58_blk_F +10, muzzle_snds_m_khk_F +10, muzzle_snds_m_snd_F +10, muzzle_snds_58_wdm_F +10, muzzle_snds_65_TI_blk_F +10, muzzle_snds_65_TI_hex_F +10, muzzle_snds_65_TI_ghex_F +10, muzzle_snds_H_MG_blk_F +10, muzzle_snds_H_MG_khk_F +10, optic_Arco +10, optic_Arco_blk_F +10, optic_Arco_ghex_F +10, optic_Hamr +10, optic_Hamr_khk_F +10, optic_Holosight +10, optic_Holosight_blk_F +10, optic_Holosight_khk_F +14, acc_flashlight +10, acc_pointer_IR +10, optic_MRCO +10, optic_DMS +10, optic_DMS_ghex_F +10, optic_ERCO_blk_F +10, optic_ERCO_khk_F +10, optic_ERCO_snd_F +5, optic_NVS +//1, optic_tws + +> LMG +25, arifle_MX_SW_Black_F // MX SW 6.5 mm (Black) +25, arifle_MX_SW_F // MX SW 6.5 mm +25, LMG_Mk200_F // Mk200 6.5 mm +25, LMG_Zafir_F // Zafir 7.62 mm +25, Exile_Weapon_RPK +25, Exile_Weapon_PK +25, Exile_Weapon_PKP +25, LMG_03_F //= LIM-85 5.56 mm + +> LMGAmmo +12, 100Rnd_65x39_caseless_mag // MX SW +10, 100Rnd_65x39_caseless_mag_Tracer // MX SW +12, 150Rnd_762x54_Box // Zafir +10, 150Rnd_762x54_Box_Tracer // Zafir +5, 130Rnd_338_Mag +51, 150Rnd_93x64_Mag +10, Exile_Magazine_45Rnd_545x39_RPK_Green +10, Exile_Magazine_75Rnd_545x39_RPK_Green +10, Exile_Magazine_100Rnd_762x54_PK_Green +//10, 200Rnd_65x39_Belt // Mk200 +//10, 200Rnd_65x39_Belt_Tracer_Green // Mk200 +//10, 200Rnd_65x39_Belt_Tracer_Red // Mk200 +//10, 200Rnd_65x39_Belt_Tracer_Yellow // Mk200 +10, 200Rnd_556x45_Box_F // LIM-85 +10, 200Rnd_556x45_Box_Red_F // LIM-85 +10, 200Rnd_556x45_Box_Tracer_F // LIM-85 +10, 200Rnd_556x45_Box_Tracer_Red_F // LIM-85 + +> Snipers +28, srifle_DMR_01_F // Rahim 7.62 mm +28, srifle_EBR_F // Mk18 ABR 7.62 mm +22, srifle_GM6_F // GM6 Lynx 12.7 mm +22, srifle_LRR_F // M320 LRR .408 +22, srifle_LRR_tna_F // M320 LRR .408 (Tropic) +22, srifle_GM6_ghex_F // GM6 Lynx 12.7 mm (Green Hex) +22, srifle_DMR_07_blk_F // CMR-76 6.5 mm (Black) +22, srifle_DMR_07_hex_F // CMR-76 6.5 mm (Hex) +22, srifle_DMR_07_ghex_F // CMR-76 6.5 mm (Green Hex) + +> SniperAmmo +10, 5Rnd_127x108_Mag // GM6 Lynx +10, 7Rnd_408_Mag // M320 LRR +17, 10Rnd_762x54_Mag // Rahim +19, 20Rnd_762x51_Mag // Mk18 ABR +8, 5Rnd_127x108_APDS_Mag // GM6 Lynx +21, 20Rnd_650x39_Cased_Mag_F // CMR-76 +2, Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag // GM6 Lynx 12.7 mm +5, Exile_Magazine_10Rnd_93x64_DMR_05_Bullet_Cam_Mag // Cyrus 9.3mm +3, Exile_Magazine_7Rnd_408_Bullet_Cam_Mag // M320 LRR .408 +5, Exile_Magazine_10Rnd_338_Bullet_Cam_Mag // MAR-10 .338 + +> SniperAttachments +19, muzzle_snds_B +10, muzzle_snds_B_khk_F +10, muzzle_snds_B_snd_F +//1, optic_tws +//1, optic_tws_mg +27, optic_DMS +26, optic_SOS +26, optic_SOS_khk_F +26, optic_LRPS +26, optic_LRPS_tna_F +26, optic_LRPS_ghex_F + +> DLCRifles +// To overpowered. Do not use in vanilla Exile +//4, MMG_01_hex_F //Navid +//4, MMG_01_tan_F //Navid +//6, MMG_02_black_F //SPMG +//6, MMG_02_camo_F //SPMG +//6, MMG_02_sand_F //SPMG +6, srifle_DMR_02_camo_F //MAR10 +6, srifle_DMR_02_F //MAR10 +6, srifle_DMR_02_sniper_F //MAR10 +3, srifle_DMR_03_F //MK1EMR +3, srifle_DMR_03_khaki_F //MK1EMR +3, srifle_DMR_03_tan_F //MK1EMR +3, srifle_DMR_03_woodland_F //MK1EMR +7, srifle_DMR_04_F //ASP1KIR +7, srifle_DMR_04_Tan_F //ASP1KIR +8, srifle_DMR_05_blk_F //CYRUS +8, srifle_DMR_05_hex_F //CYRUS +8, srifle_DMR_05_tan_F //CYRUS +3, srifle_DMR_06_camo_F //Mk14 +3, srifle_DMR_06_olive_F //Mk14 + +> DLCAmmo +//18, 150Rnd_93x64_Mag //Navid +//25, 130Rnd_338_Mag //SPMG +16, 10Rnd_338_Mag //MAR10 +11, 20Rnd_762x51_Mag //MK1EMR +14, 10Rnd_127x54_Mag //ASP1KIR +16, 10Rnd_93x64_DMR_05_Mag //CYRUS + +> DLCOptics +14, optic_AMS +14, optic_AMS_khk +14, optic_AMS_snd +14, optic_KHS_blk +14, optic_KHS_hex +14, optic_KHS_old +14, optic_KHS_tan + +> DLCSupressor +40, muzzle_snds_338_black +40, muzzle_snds_338_green +40, muzzle_snds_338_sand +40, muzzle_snds_93mmg +40, muzzle_snds_93mmg_tan +40, muzzle_snds_B + +> EpicWeapons +4, MMG_01_hex_F //Navid +4, MMG_01_tan_F //Navid +6, MMG_02_black_F //SPMG +6, MMG_02_camo_F //SPMG +6, MMG_02_sand_F //SPMG + +> Bipods +17, bipod_03_F_oli +17, bipod_03_F_blk +17, bipod_02_F_tan +16, bipod_02_F_hex +17, bipod_02_F_blk +17, bipod_01_F_snd +16, bipod_01_F_mtp +17, bipod_01_F_blk +17, bipod_01_F_khk + +> HEGrenades +67, 1Rnd_HE_Grenade_shell +33, 3Rnd_HE_Grenade_shell + +> UGLFlares +8, 3Rnd_UGL_FlareGreen_F +8, 3Rnd_UGL_FlareRed_F +8, 3Rnd_UGL_FlareWhite_F +8, 3Rnd_UGL_FlareYellow_F +17, UGL_FlareGreen_F +17, UGL_FlareRed_F +17, UGL_FlareWhite_F +17, UGL_FlareYellow_F +// No Infrared for now +//UGL_FlareCIR_F +//3Rnd_UGL_FlareCIR_F + +> UGLSmokes +10, 1Rnd_Smoke_Grenade_shell +10, 1Rnd_SmokeBlue_Grenade_shell +10, 1Rnd_SmokeGreen_Grenade_shell +10, 1Rnd_SmokeOrange_Grenade_shell +10, 1Rnd_SmokePurple_Grenade_shell +10, 1Rnd_SmokeRed_Grenade_shell +10, 1Rnd_SmokeYellow_Grenade_shell +4, 3Rnd_Smoke_Grenade_shell +4, 3Rnd_SmokeBlue_Grenade_shell +4, 3Rnd_SmokeGreen_Grenade_shell +4, 3Rnd_SmokeOrange_Grenade_shell +4, 3Rnd_SmokePurple_Grenade_shell +4, 3Rnd_SmokeRed_Grenade_shell +4, 3Rnd_SmokeYellow_Grenade_shell + +> HandGrenades +50, HandGrenade +50, MiniGrenade + +> Explosives +12, DemoCharge_Remote_Mag +12, IEDUrbanSmall_Remote_Mag +12, IEDLandSmall_Remote_Mag +20, APERSMine_Range_Mag +20, APERSBoundingMine_Range_Mag +20, APERSTripMine_Wire_Mag +4, SatchelCharge_Remote_Mag + +/////////////////////////////////////////////////////////////////////////////// +// Clothing & Gear +/////////////////////////////////////////////////////////////////////////////// + +//Civilian + +> CivilianItems +30, ItemWatch +30, ItemRadio +20, ItemGPS +20, Binocular +40, Exile_Item_Heatpack +35, ItemMap +5, Exile_Item_MobilePhone + +> CivilianClothing +9, U_C_Poor_1 +9, U_C_Poor_2 +9, U_C_Poor_shorts_1 +9, U_C_HunterBody_grn +7, U_C_Poloshirt_salmon +7, U_C_Poloshirt_tricolour +7, U_C_Poloshirt_stripped +7, U_C_Poloshirt_burgundy +7, U_C_Poloshirt_blue +9, U_C_Journalist +9, U_C_Scientist +9, U_Rangemaster +1, U_OrestesBody +1, U_NikosBody +1, U_NikosAgedBody +5, U_I_C_Soldier_Bandit_1_F // Bandit Clothes (Polo Shirt) +5, U_I_C_Soldier_Bandit_2_F // Bandit Clothes (Skull) +5, U_I_C_Soldier_Bandit_3_F // Bandit Clothes (Tee) +5, U_I_C_Soldier_Bandit_4_F // Bandit Clothes (Checkered) +5, U_I_C_Soldier_Bandit_5_F // Bandit Clothes (Tank Top) +5, U_C_man_sport_1_F // Sport Clothes (Beach) +5, U_C_man_sport_2_F // Sport Clothes (Orange) +5, U_C_man_sport_3_F // Sport Clothes (Blue) +5, U_C_Man_casual_1_F // Casual Clothes (Navy) +5, U_C_Man_casual_2_F // Casual Clothes (Blue) +5, U_C_Man_casual_3_F // Casual Clothes (Green) +5, U_C_Man_casual_4_F // Summer Clothes (Sky) +5, U_C_Man_casual_5_F // Summer Clothes (Yellow) +5, U_C_Man_casual_6_F // Summer Clothes (Red) + +> CivilianBackpacks +10, B_OutdoorPack_blk +9, B_OutdoorPack_tan +9, B_OutdoorPack_blu +8, B_HuntingBackpack +7, B_AssaultPack_khk +7, B_AssaultPack_dgtl +7, B_AssaultPack_rgr +7, B_AssaultPack_sgg +7, B_AssaultPack_blk +7, B_AssaultPack_cbr +7, B_AssaultPack_mcamo +5, B_Kitbag_mcamo +5, B_Kitbag_sgg +5, B_Kitbag_cbr +7, B_AssaultPack_tna_F + +> CivilianVests +50, V_Rangemaster_belt +25, V_Press_F +25, V_TacVest_blk_POLICE + +> CivilianHeadgear +5, H_Bandanna_surfer +5, H_Beret_blk_POLICE +5, H_Cap_blk +5, H_Cap_blk_Raven +5, H_Cap_blu +5, H_Cap_grn +5, H_Cap_headphones +5, H_Cap_oli +6, H_Cap_press +6, H_Cap_red +6, H_Cap_tan +6, H_Hat_blue +6, H_Hat_brown +6, H_Hat_checker +6, H_Hat_grey +6, H_Hat_tan +6, H_StrawHat +6, H_StrawHat_dark + +//Guerilla + +> GuerillaItems +25, Rangefinder +8, NVGoggles +8, O_NVGoggles_hex_F +8, O_NVGoggles_urb_F +8, O_NVGoggles_ghex_F +8, NVGoggles_tna_F +50, ItemCompass + +> GuerillaClothing +16, U_IG_Guerilla1_1 +16, U_IG_Guerilla2_1 +16, U_IG_Guerilla2_2 +16, U_IG_Guerilla2_3 +15, U_IG_Guerilla3_1 +15, U_IG_Guerilla3_2 +4, U_IG_leader +2, U_I_G_resistanceLeader_F +5, U_I_C_Soldier_Para_1_F // Paramilitary Garb (Tee) +5, U_I_C_Soldier_Para_2_F // Paramilitary Garb (Jacket) +5, U_I_C_Soldier_Para_3_F // Paramilitary Garb (Shirt) +5, U_I_C_Soldier_Para_4_F // Paramilitary Garb (Tank Top) +5, U_I_C_Soldier_Para_5_F // Paramilitary Garb (Shorts) +5, U_I_C_Soldier_Camo_F // Syndikat Uniform + +> GuerillaBackpacks +14, B_FieldPack_blk +14, B_FieldPack_ocamo +14, B_FieldPack_oucamo +14, B_FieldPack_cbr +11, B_Bergen_sgg +11, B_Bergen_mcamo +11, B_Bergen_rgr +11, B_Bergen_blk +11, B_FieldPack_ghex_F +11, B_ViperHarness_base_F +11, B_ViperHarness_blk_F +11, B_ViperHarness_ghex_F +11, B_ViperHarness_hex_F +11, B_ViperHarness_khk_F +11, B_ViperHarness_oli_F +11, B_ViperLightHarness_base_F +11, B_ViperLightHarness_blk_F +11, B_ViperLightHarness_ghex_F +11, B_ViperLightHarness_hex_F +11, B_ViperLightHarness_khk_F +11, B_ViperLightHarness_oli_F + +> GuerillaVests +7, V_BandollierB_khk +7, V_BandollierB_cbr +7, V_BandollierB_rgr +7, V_BandollierB_blk +7, V_BandollierB_oli +5, V_Chestrig_khk +5, V_Chestrig_rgr +5, V_Chestrig_blk +5, V_Chestrig_oli +7, V_HarnessO_brn +7, V_HarnessOGL_brn +7, V_HarnessO_gry +7, V_HarnessOGL_gry +7, V_HarnessOSpec_brn +7, V_HarnessOSpec_gry +3, V_I_G_resistanceLeader_F + +> GuerillaHeadgear +4, Exile_Headgear_GasMask +4, H_Booniehat_khk +4, H_Booniehat_indp +4, H_Booniehat_mcamo +4, H_Booniehat_grn +4, H_Booniehat_tan +4, H_Booniehat_dirty +4, H_Booniehat_dgtl +4, H_Booniehat_khk_hs +3, H_Bandanna_khk +3, H_Bandanna_khk_hs +3, H_Bandanna_cbr +3, H_Bandanna_sgg +3, H_Bandanna_gry +3, H_Bandanna_camo +3, H_Bandanna_mcamo +3, H_BandMask_blk +1, H_Beret_blk +1, H_Beret_red +1, H_Beret_grn +1, H_Beret_grn_SF +1, H_Beret_brn_SF +1, H_Beret_ocamo +1, H_Beret_02 +1, H_Beret_Colonel +3, H_Hat_camo +3, H_Cap_brn_SPECOPS +3, H_Cap_tan_specops_US +3, H_Cap_khaki_specops_UK +3, H_Watchcap_blk +3, H_Watchcap_khk +2, H_Watchcap_camo +2, H_Watchcap_sgg +2, H_TurbanO_blk +2, H_Shemag_khk +2, H_Shemag_tan +2, H_Shemag_olive +2, H_Shemag_olive_hs +2, H_ShemagOpen_khk +2, H_ShemagOpen_tan +2, H_MilCap_tna_F +2, H_MilCap_ghex_F +2, H_Booniehat_tna_F +2, H_MilCap_gen_F +2, H_Cap_oli_Syndikat_F +2, H_Cap_tan_Syndikat_F +2, H_Cap_blk_Syndikat_F +2, H_Cap_grn_Syndikat_F +2, H_FakeHeadgear_Syndikat_F + +//Military + +> MilitaryClothing +5, U_B_CTRG_1 // CTRG Combat Uniform (UBACS) +5, U_B_CTRG_2 // CTRG Combat Uniform (UBACS2) +5, U_B_CTRG_3 // CTRG Combat Uniform (Tee) +5, U_B_CombatUniform_mcam // Combat Fatigues (MTP) +5, U_B_CombatUniform_mcam_tshirt // Combat Fatigues (MTP) (Tee) +5, U_B_CombatUniform_mcam_vest // Recon Fatigues (MTP) +5, U_B_CombatUniform_mcam_worn // Worn Combat Fatigues (MTP) +3, U_B_SpecopsUniform_sgg // Specop Fatigues (Sage) +2, U_O_OfficerUniform_ocamo // Officer Fatigues (Hex) +2, U_I_OfficerUniform // Combat Fatigues [AAF] (Tee) +4, U_I_CombatUniform // Combat Fatigues [AAF] +4, U_I_CombatUniform_tshirt // Combat Fatigues [AAF] (Tee) +4, U_I_CombatUniform_shortsleeve // Combat Fatigues [AAF] +4, U_B_HeliPilotCoveralls // Heli Pilot Coveralls +4, U_O_PilotCoveralls // Pilot Coveralls [CSAT] +4, U_B_PilotCoveralls // Pilot Coveralls [NATO] +4, U_I_pilotCoveralls // Pilot Coveralls [AAF] +4, U_I_HeliPilotCoveralls // Heli Pilot Coveralls +2, U_B_Wetsuit // Wetsuit [NATO] +2, U_O_Wetsuit // Wetsuit [CSAT] +2, U_I_Wetsuit // Wetsuit [AAF] +2, U_O_CombatUniform_ocamo // Heli Pilot Coveralls +2, U_O_CombatUniform_oucamo // Fatigues (Urban) [CSAT] +2, U_O_SpecopsUniform_ocamo // Recon Fatigues (Hex) +2, U_O_SpecopsUniform_blk // Recon Fatigues (Black) +2, U_O_V_Soldier_Viper_F // Special Purpose Suit (Green Hex) +2, U_O_V_Soldier_Viper_hex_F // Special Purpose Suit (Hex) +5, U_B_T_Soldier_AR_F // Combat Fatigues (Tropic, Tee) +5, U_B_T_Soldier_SL_F // Recon Fatigues (Tropic) +5, U_B_CTRG_Soldier_F // CTRG Stealth Uniform +5, U_B_CTRG_Soldier_2_F // CTRG Stealth Uniform (Tee) +5, U_B_CTRG_Soldier_3_F // CTRG Stealth Uniform (Rolled-up) +5, U_B_CTRG_Soldier_urb_1_F // CTRG Urban Uniform +5, U_B_CTRG_Soldier_urb_2_F // CTRG Urban Uniform (Tee) +5, U_B_CTRG_Soldier_urb_3_F // CTRG Urban Uniform (Rolled-up) +5, U_B_GEN_Soldier_F // Gendarmerie Uniform +5, U_B_GEN_Commander_F // Gendarmerie Commander Uniform +5, U_O_T_Soldier_F // Fatigues (Green Hex) [CSAT] +5, U_O_T_Officer_F // Officer Fatigues (Green Hex) [CSAT] + +> MilitaryBackpacks +15, B_Carryall_ocamo +15, B_Carryall_oucamo +15, B_Carryall_mcamo +18, B_Carryall_oli +18, B_Carryall_khk +19, B_Carryall_cbr +19, B_Carryall_ghex_F +6, B_Bergen_Base_F +6, B_Bergen_mcamo_F +6, B_Bergen_dgtl_F +6, B_Bergen_hex_F +6, B_Bergen_tna_F + +> MilitaryVests +10, V_PlateCarrier1_blk +10, V_PlateCarrier1_rgr +10, V_PlateCarrier2_rgr +10, V_PlateCarrier3_rgr +10, V_PlateCarrierGL_rgr +10, V_PlateCarrierIA1_dgtl +10, V_PlateCarrierIA2_dgtl +10, V_PlateCarrierIAGL_dgtl +10, V_PlateCarrierSpec_rgr +5, V_PlateCarrierL_CTRG +5, V_PlateCarrierH_CTRG + +> MilitaryHeadgear +4, Exile_Headgear_GasMask +4, H_MilCap_ocamo +4, H_MilCap_mcamo +4, H_MilCap_oucamo +4, H_MilCap_blue +4, H_MilCap_rucamo +4, H_MilCap_dgtl +3, H_HelmetB +3, H_HelmetB_paint +3, H_HelmetB_light +3, H_HelmetB_plain_blk +3, H_HelmetSpecB +3, H_HelmetSpecB_paint1 +3, H_HelmetSpecB_paint2 +3, H_HelmetSpecB_blk +3, H_HelmetIA +2, H_HelmetIA_net +2, H_HelmetIA_camo +2, H_HelmetB_grass +2, H_HelmetB_snakeskin +2, H_HelmetB_desert +2, H_HelmetB_black +2, H_HelmetB_sand +2, H_HelmetB_light_grass +2, H_HelmetB_light_snakeskin +2, H_HelmetB_light_desert +2, H_HelmetB_light_black +2, H_HelmetB_light_sand +1, H_HelmetCrew_B +1, H_HelmetCrew_O +1, H_HelmetCrew_I +1, H_PilotHelmetFighter_B +1, H_PilotHelmetFighter_O +1, H_PilotHelmetFighter_I +1, H_PilotHelmetHeli_B +1, H_PilotHelmetHeli_O +1, H_PilotHelmetHeli_I +1, H_HelmetB_camo +1, H_CrewHelmetHeli_B +1, H_CrewHelmetHeli_O +1, H_CrewHelmetHeli_I +2, H_BandMask_khk +2, H_BandMask_reaper +2, H_BandMask_demon +1, H_HelmetO_oucamo +1, H_HelmetLeaderO_oucamo +1, H_HelmetSpecO_ocamo +1, H_HelmetSpecO_blk +1, H_HelmetO_ocamo +1, H_HelmetLeaderO_ocamo +1, H_HelmetO_ghex_F +2, H_Helmet_Skate +2, H_HelmetB_Enh_tna_F +2, H_HelmetB_Light_tna_F +2, H_Beret_gen_F +2, H_HelmetB_tna_F +2, H_HelmetSpecO_ghex_F +2, H_HelmetLeaderO_ghex_F +2, H_HelmetCrew_O_ghex_F +2, H_HelmetB_TI_tna_F + +> Ghillies +1, U_B_GhillieSuit // Ghillie Suit [NATO] +1, U_O_GhillieSuit // Ghillie Suit [CSAT] +1, U_I_GhillieSuit // Ghillie Suit [AAF] + +> DLCGhillies +1, U_B_FullGhillie_ard +1, U_B_FullGhillie_lsh +1, U_B_FullGhillie_sard +1, U_O_FullGhillie_ard +1, U_O_FullGhillie_lsh +1, U_O_FullGhillie_sard +1, U_I_FullGhillie_ard +1, U_I_FullGhillie_lsh +1, U_I_FullGhillie_sard +5, U_B_T_Sniper_F // Ghillie Suit (Tropic) [NATO] +5, U_B_T_Soldier_F // Ghillie Suit (Tropic) [NATO] +5, U_B_T_FullGhillie_tna_F // Full Ghillie (Jungle) [NATO] +5, U_O_T_Sniper_F // Ghillie Suit (Green Hex) [CSAT] +5, U_O_T_FullGhillie_tna_F // Full Ghillie (Jungle) [CSAT] + +> DLCVests +1, V_PlateCarrierGL_blk +1, V_PlateCarrierGL_mtp +1, V_PlateCarrierGL_rgr +1, V_PlateCarrierIAGL_dgtl +1, V_PlateCarrierIAGL_oli +1, V_PlateCarrierSpec_blk +1, V_PlateCarrierSpec_mtp +1, V_PlateCarrierSpec_rgr +1, V_TacChestrig_grn_F +1, V_TacChestrig_oli_F +1, V_TacChestrig_cbr_F +1, V_PlateCarrier1_tna_F +1, V_PlateCarrier2_tna_F +1, V_PlateCarrierSpec_tna_F +1, V_PlateCarrierGL_tna_F +1, V_HarnessO_ghex_F +1, V_HarnessOGL_ghex_F +1, V_BandollierB_ghex_F +1, V_TacVest_gen_F +1, V_PlateCarrier1_rgr_noflag_F +1, V_PlateCarrier2_rgr_noflag_F + +> Rebreathers +1, V_RebreatherB +1, V_RebreatherIR +1, V_RebreatherIA + +/////////////////////////////////////////////////////////////////////////////// +// Other Items +/////////////////////////////////////////////////////////////////////////////// + +> MedicalItems +2, Exile_Item_InstaDoc +5, Exile_Item_Bandage +5, Exile_Item_Defibrillator //We're using this +10, Exile_Item_Vishpirin +10, Exile_Item_Heatpack + + +> IndustrialItems +1, Exile_Item_ThermalScannerPro +2, Exile_Item_Knife +3, Exile_Item_Cement +3, Exile_Item_FloodLightKit +3, Exile_Item_PortableGeneratorKit +3, Exile_Item_CordlessScrewdriver //We're using this +4, Exile_Item_CamoTentKit +4, Exile_Item_MetalBoard +4, Exile_Item_Foolbox +4, Exile_Item_Sand +4, Exile_Item_Rope //We're Using this +5, Exile_Item_Grinder +5, Exile_Item_MetalScrews +5, Exile_Melee_SledgeHammer +5, Exile_Item_Wrench //We're Using this +8, Exile_Item_ExtensionCord +9, Exile_Item_LightBulb +10, Exile_Item_WaterCanisterEmpty +10, Exile_Melee_Shovel +11, Exile_Item_JunkMetal +13, Exile_Item_Handsaw +13, Exile_Item_Pliers +13, Exile_Item_ScrewDriver +14, Exile_Item_Hammer // We're Using this +22, Exile_Melee_Axe + + +> Vehicle +5, Exile_Item_Carwheel //We're Using this +40, Exile_Item_FuelCanisterFull +50, Exile_Item_FuelCanisterEmpty +10, Exile_Item_DuctTape +10, Exile_Item_OilCanister // We're using this + +// Throwables + +> Chemlights +1, Chemlight_blue +1, Chemlight_green +1, Chemlight_red +1, Chemlight_yellow + +> RoadFlares +1, FlareGreen_F +1, FlareRed_F +1, FlareWhite_F +1, FlareYellow_F + +> SmokeGrenades +1, SmokeShell +1, SmokeShellRed +1, SmokeShellGreen +1, SmokeShellYellow +1, SmokeShellPurple +1, SmokeShellBlue +1, SmokeShellOrange + +> Restraints +1, Exile_Item_ZipTie + +> Electronics +1, Exile_Item_Laptop +1, Exile_Item_BaseCameraKit + + // Trash or items not currently being used + +> Trash +4, Exile_Item_Can_Empty +4, Exile_Item_ToiletPaper +4, Exile_Item_PlasticBottleEmpty // Nothing :) +1, Exile_Item_Magazine01 +1, Exile_Item_Magazine02 +1, Exile_Item_Magazine03 +1, Exile_Item_Magazine04 + +> Unused +//3, Exile_Item_CordlessScrewdriver //We're using this +3, Exile_Item_FireExtinguisher +//10, Exile_Item_OilCanister //We're using this +//14, Exile_Item_Hammer //We're Using this +//5, Exile_Item_Carwheel //We're Using This +5, Exile_Item_SleepingMat +//5, Exile_Item_Defibrillator // We're using this +//5, Exile_Item_Wrench //We're Using this +//4, Exile_Item_Rope \ No newline at end of file diff --git a/@ExileServer/ExileLootDrop.dll b/@ExileServer/ExileLootDrop.dll new file mode 100644 index 0000000..ec98aa6 Binary files /dev/null and b/@ExileServer/ExileLootDrop.dll differ diff --git a/@ExileServer/ExileLootDrop.ini b/@ExileServer/ExileLootDrop.ini new file mode 100644 index 0000000..0ff42f3 --- /dev/null +++ b/@ExileServer/ExileLootDrop.ini @@ -0,0 +1,3 @@ +[General] +LootCfg=ExileLootDrop.cfg +CacheItems=10000 \ No newline at end of file diff --git a/@ExileServer/ExileLootDropTester.exe b/@ExileServer/ExileLootDropTester.exe new file mode 100644 index 0000000..d36fcd5 Binary files /dev/null and b/@ExileServer/ExileLootDropTester.exe differ diff --git a/@ExileServer/ExileLootDrop_x64.dll b/@ExileServer/ExileLootDrop_x64.dll new file mode 100644 index 0000000..3188c26 Binary files /dev/null and b/@ExileServer/ExileLootDrop_x64.dll differ diff --git a/@ExileServer/addons/ExileLootDrop.pbo b/@ExileServer/addons/ExileLootDrop.pbo new file mode 100644 index 0000000..5dc94ec Binary files /dev/null and b/@ExileServer/addons/ExileLootDrop.pbo differ diff --git a/@ExileServer/addons/a3_infiSTAR_Exile.pbo b/@ExileServer/addons/a3_infiSTAR_Exile.pbo new file mode 100644 index 0000000..3d5eb0d Binary files /dev/null and b/@ExileServer/addons/a3_infiSTAR_Exile.pbo differ diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/$PREFIX$ b/@ExileServer/addons/a3_infiSTAR_Exile/$PREFIX$ new file mode 100644 index 0000000..ff4d4d3 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/$PREFIX$ @@ -0,0 +1 @@ +a3_infiSTAR_Exile \ No newline at end of file diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/CUSTOM_FUNCTIONS.hpp b/@ExileServer/addons/a3_infiSTAR_Exile/CUSTOM_FUNCTIONS.hpp new file mode 100644 index 0000000..25705a1 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/CUSTOM_FUNCTIONS.hpp @@ -0,0 +1,47 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + + Copyright infiSTAR - 2011 - 2018. All rights reserved. + Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR + + Description: + Arma AntiHack & AdminTools - infiSTAR.de + + + READ: + type 0 = just execute + type 1 = toggleable function + type 2 = function targets the selected player (it will be _this) + + name = name shown in the admin menu (this is also what has to be put in the EXILE_AHAT_CONFIG.sqf as Admin Power!) + + code = code to execute - if you have a linebreak within the code, you need to put a \ at the end of each line! +*/ +class CfgCustomFunctions { + class custom1 { + type = 0; // just execute + name = "custom1: type = 0"; + code = "systemChat 'custom1';"; + }; + class custom2 { + type = 1; // toggle on/off + name = "custom2: type = 1"; + code = "if(isNil'custom2toggled')then{systemChat 'custom2 toggled on';custom2toggled=true;}else{systemChat 'custom2 toggled off';custom2toggled=nil;};"; + }; + class custom3 { + type = 2; // targets selected player (_this) + name = "custom3: type = 2"; + code = "systemChat format['custom3 -> selected player: %1',name _this];"; + }; + class custom4 { + type = 2; // targets selected player (_this) + name = "custom4: type = 2"; + code = "[_this] call fnc_TP2ME;"; + }; + class custom5 { + type = 0; // just execute + name = "custom5: type = 0"; + code = "systemChat 'custom5';"; + }; +}; diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AH.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AH.sqf new file mode 100644 index 0000000..e62cd4b --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AH.sqf @@ -0,0 +1,7003 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + Copyright infiSTAR. All rights reserved. + + Description: + Arma AntiHack & AdminTools - infiSTAR.de +*/ +comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de'; +UPDATEEMAIL='zepheris.craty@gmail.com'; +INFISTARVERSION='10-02-2018 12-02-40 - v90'; +if((toLower UPDATEEMAIL) in [""])exitWith{ + diag_log " Please go to update.infistar.de and download the latest version of infiSTAR!"; + diag_log " The current version is not licensed to you."; + diag_log " infiSTAR will NOT START if it is licensed to that email address!"; +}; +diag_log format[' %1 - VERSION: 10-02-2018 12-02-40 - v90',time]; +{ + _x params ['_uids']; + { + private _uid = _x; + if(!isNil'_uid')then + { + _uidarray = toArray _x; + if(39 in _uidarray)then + { + _uidarray = _uidarray - [39]; + _uid = toString _uidarray; + diag_log format[' %1 - validated admin uid (do not use single quotes!) %2 should be %3',time,_x,_uid]; + }; + if(count _uid > 5)then + { + _admins pushBackUnique _uid; + diag_log format[' %1 - adding valid admin uid %2',time,_uid]; + } + else + { + diag_log format[' %1 - removing invalid admin uid %2',time,_uid]; + }; + }; + } forEach _uids; +} forEach _adminUIDandAccess; + +if!(isClass (missionconfigfile >> 'RscListBox_infiSTAR'))exitWith{ + _log = format[' %1 - infiSTAR_defines.hpp is not in your MPMission or you forgot to #include it within your description.ext [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log _log; + ['MPMission_ERROR',_log] call FNC_A3_CUSTOMLOG; +}; +if!(isClass (missionconfigfile >> 'infiSTAR_AdminMenu'))exitWith{ + _log = format[' %1 - infiSTAR_AdminMenu.hpp is not in your MPMission or you forgot to #include it within your description.ext [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log _log; + ['MPMission_ERROR',_log] call FNC_A3_CUSTOMLOG; +}; +if!(isClass (missionconfigfile >> 'infiSTAR_CHAT'))exitWith{ + _log = format[' %1 - infiSTAR_chat.hpp is not in your MPMission or you forgot to #include it within your description.ext [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log _log; + ['MPMission_ERROR',_log] call FNC_A3_CUSTOMLOG; +}; +if!(isClass (missionconfigfile >> 'RscListBox_infiSTAR'))exitWith{ + _log = format[' %1 - infiSTAR_KeyBinds.hpp is not in your MPMission or you forgot to #include it within your description.ext [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log _log; + ['MPMission_ERROR',_log] call FNC_A3_CUSTOMLOG; +}; +if!(getNumber(missionconfigfile >> 'infiSTAR_AdminMenu' >> 'version') isEqualTo 2)exitWith{ + _log = format[' %1 - infiSTAR_AdminMenu.hpp in your MPMission is outdated. Update it or infiSTAR will not load. [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log _log; + ['MPMission_ERROR',_log] call FNC_A3_CUSTOMLOG; +}; + + +_test = [0,{}] execFSM 'call.fsm'; +_test = [0,{}] execFSM 'call.fsm'; +if(_test isEqualTo 0)exitWith +{ + _log = format[' %1 - call.fsm missing in your MPmission! [32200x2 - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + for '_i' from 0 to 30 do + { + diag_log _log; + diag_log format[' %1 - infiSTAR will NOT START if files are not in place!',time]; + }; +}; +_FN_infiSTAR_S_STRING = " +params [['_input',''],['_code',{}],['_id',0],['_jip',false]]; +if(_id isEqualTo 0)exitWith{false}; +if(_code isEqualType '')then{_code=compile _code;}; +if(_id isEqualTo 2)exitWith{_input call _code}; +[_input,_code] remoteExecCall ['call',_id,_jip] +"; +_test_FN_infiSTAR_S = compile _FN_infiSTAR_S_STRING; +FN_infiSTAR_S = compileFinal _FN_infiSTAR_S_STRING; +if!(str FN_infiSTAR_S isEqualTo str _test_FN_infiSTAR_S)exitWith{ diag_log format[' %1 - FN_infiSTAR_S has been changed..!',time]; }; +FN_CHECK_CHARACTERS = compileFinal " + _allowedCharacters = [48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90]; + _upper = toUpper(_this select [0,10]); + _array = toArray _upper; + _tmparray = []; + {if(_x in _allowedCharacters)then{_tmparray pushBack _x;};} forEach _array; + toString _tmparray +"; +CUSTOM_briefingName = briefingName call FN_CHECK_CHARACTERS; +CUSTOM_worldName = worldName call FN_CHECK_CHARACTERS; +FNC_A3_CUSTOMLOG = " + params[['_logname',''],['_logentry','']]; +"; +if(_USE_LOG_TO_DATABASE)then{ + fn_cleanDbLog = { + private '_return'; + _return = _this; + _return = _return splitString ':' joinString ' '; + _return = _return splitString '#' joinString ''; + _return + }; + CLEAN_SERVERNAME = serverName call fn_cleanDbLog; + FNC_A3_CUSTOMLOG = FNC_A3_CUSTOMLOG + " + format['insert_infiSTARLog:%1:%2:%3', CLEAN_SERVERNAME, _logname call fn_cleanDbLog, _logentry call fn_cleanDbLog] call ExileServer_system_database_query_fireAndForget; + "; +}; +FNC_A3_CUSTOMLOG = FNC_A3_CUSTOMLOG + " + [_logname,_logentry] call FN_CALL_LOG_DLL; +"; +FNC_A3_CUSTOMLOG = compileFinal FNC_A3_CUSTOMLOG; + +if(_armalog)then{ + FN_ARMA_LOG = " + params[['_logname',''],['_logentry','']]; + _this call FNC_A3_CUSTOMLOG; + _this call FN_ARMA_REMOTELOG; + "; + FN_ARMA_LOG = compileFinal FN_ARMA_LOG; +}else{ + FN_ARMA_LOG = { + _this call FNC_A3_CUSTOMLOG; + }; +}; + + + +_UVC = ((_VehicleWhiteList_check)||(_ForbiddenVehicles_check)); +_allRandomGenVars = []; +_counts = []; +{ + _counts pushBack (count _x); +} forEach (allVariables missionNamespace); +_num = 0; +{ + _num = _num + _x; +} forEach _counts; +_count = count _counts; +_average = ceil(_num / _count); +_randminval = (_average/3); +_randmaxval = (_average/1.5); +_fnc_RandomGen = +{ + private '_gen'; + _fnc_actualGen = { + _start = ['z','y','x','w','v','u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a']; + _main = ['a','e','5','6','2','9','f','f','8','2','6','f','f','1','3','6','5','c','d','8','5','5','1','4','3','6','8','f','a','a','2','b','d']; + _filler = ['1','2','3','4','5','6','7','8','9','0','_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; + _gen = selectRandom _start; + _randmax = {((round(random _randminval)) + (round(random _randmaxval))) max _randminval}; + for '_i' from 0 to (call _randmax)do + { + _gen = _gen + (selectRandom _filler) + (selectRandom _main); + }; + _gen + }; + for '_i' from 0 to 10000 do + { + _gen = call _fnc_actualGen; + _index = _allRandomGenVars pushBackUnique _gen; + if(_index > -1)exitWith{_gen}; + }; + _gen +}; +diag_log format[' _fnc_RandomGen: %1',_fnc_RandomGen]; +_fnc_server_handle_mpmessage = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_server_handle_mpmessage: %1',_fnc_server_handle_mpmessage]] call FNC_A3_CUSTOMLOG; +_fnc_AdminReqReal = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_AdminReqReal: %1',_fnc_AdminReqReal]] call FNC_A3_CUSTOMLOG; +_playerobj_check_loops1 = call _fnc_RandomGen;['RANDOMVAR',format['_playerobj_check_loops1: %1',_playerobj_check_loops1]] call FNC_A3_CUSTOMLOG; +_playerobj_check_loops2 = call _fnc_RandomGen;['RANDOMVAR',format['_playerobj_check_loops2: %1',_playerobj_check_loops2]] call FNC_A3_CUSTOMLOG; +_token_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_token_by_uid: %1',_token_by_uid]] call FNC_A3_CUSTOMLOG; +_uid_by_token = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_token: %1',_uid_by_token]] call FNC_A3_CUSTOMLOG; +_name_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_name_by_uid: %1',_name_by_uid]] call FNC_A3_CUSTOMLOG; +_owner_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_owner_by_uid: %1',_owner_by_uid]] call FNC_A3_CUSTOMLOG; +_uid_by_owner = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_owner: %1',_uid_by_owner]] call FNC_A3_CUSTOMLOG; +_fn_playerConnected = call _fnc_RandomGen;['RANDOMVAR',format['_fn_playerConnected: %1',_fn_playerConnected]] call FNC_A3_CUSTOMLOG; +_server_setTokenR = call _fnc_RandomGen;['RANDOMVAR',format['_server_setTokenR: %1',_server_setTokenR]] call FNC_A3_CUSTOMLOG; +_FN_INJECT_ON_CLIENT = call _fnc_RandomGen;['RANDOMVAR',format['_FN_INJECT_ON_CLIENT: %1',_FN_INJECT_ON_CLIENT]] call FNC_A3_CUSTOMLOG; +_fnc_l_on_c = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_l_on_c: %1',_fnc_l_on_c]] call FNC_A3_CUSTOMLOG; +_adminStartupCode = call _fnc_RandomGen;['RANDOMVAR',format['_adminStartupCode: %1',_adminStartupCode]] call FNC_A3_CUSTOMLOG; +_AHKickOFF = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickOFF: %1',_AHKickOFF]] call FNC_A3_CUSTOMLOG; +_AHKickLog = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickLog: %1',_AHKickLog]] call FNC_A3_CUSTOMLOG; +_AH_RunCheckENDVAR = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheckENDVAR: %1',_AH_RunCheckENDVAR]] call FNC_A3_CUSTOMLOG; +_AH_RunCheck = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheck: %1',_AH_RunCheck]] call FNC_A3_CUSTOMLOG; +_AH_HackLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_HackLogArrayRND: %1',_AH_HackLogArrayRND]] call FNC_A3_CUSTOMLOG; +_AH_SurvLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_SurvLogArrayRND: %1',_AH_SurvLogArrayRND]] call FNC_A3_CUSTOMLOG; +_AH_AdmiLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_AdmiLogArrayRND: %1',_AH_AdmiLogArrayRND]] call FNC_A3_CUSTOMLOG; +_TMPBAN = call _fnc_RandomGen;['RANDOMVAR',format['_TMPBAN: %1',_TMPBAN]] call FNC_A3_CUSTOMLOG; +_fn_getTempBans = call _fnc_RandomGen;['RANDOMVAR',format['_fn_getTempBans: %1',_fn_getTempBans]] call FNC_A3_CUSTOMLOG; +_fnc_addTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_addTempBan: %1',_fnc_addTempBan]] call FNC_A3_CUSTOMLOG; +_fnc_removeTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_removeTempBan: %1',_fnc_removeTempBan]] call FNC_A3_CUSTOMLOG; +_AHpos = call _fnc_RandomGen;['RANDOMVAR',format['_AHpos: %1',_AHpos]] call FNC_A3_CUSTOMLOG; +_adminsA = call _fnc_RandomGen;['RANDOMVAR',format['_adminsA: %1',_adminsA]] call FNC_A3_CUSTOMLOG; +_vehicle_needs_check = call _fnc_RandomGen;['RANDOMVAR',format['_vehicle_needs_check: %1',_vehicle_needs_check]] call FNC_A3_CUSTOMLOG; +_fnc_infiSTAR_PlayerLog = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_infiSTAR_PlayerLog: %1',_fnc_infiSTAR_PlayerLog]] call FNC_A3_CUSTOMLOG; +_antidupePVResVar = call _fnc_RandomGen;['RANDOMVAR',format['_antidupePVResVar: %1',_antidupePVResVar]] call FNC_A3_CUSTOMLOG; +_runcheck_thread = call _fnc_RandomGen;['RANDOMVAR',format['_runcheck_thread: %1',_runcheck_thread]] call FNC_A3_CUSTOMLOG; +_livestarted = call _fnc_RandomGen;['RANDOMVAR',format['_livestarted: %1',_livestarted]] call FNC_A3_CUSTOMLOG; +_fnc_check_type_allowed = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_check_type_allowed: %1',_fnc_check_type_allowed]] call FNC_A3_CUSTOMLOG; +_fnc_remove_badvehicle = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_remove_badvehicle: %1',_fnc_remove_badvehicle]] call FNC_A3_CUSTOMLOG; +_fnc_vehicle_check = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_vehicle_check: %1',_fnc_vehicle_check]] call FNC_A3_CUSTOMLOG; +_rcheckclient = call _fnc_RandomGen;['RANDOMVAR',format['_rcheckclient: %1',_rcheckclient]] call FNC_A3_CUSTOMLOG; +_rcheckserver = call _fnc_RandomGen;['RANDOMVAR',format['_rcheckserver: %1',_rcheckserver]] call FNC_A3_CUSTOMLOG; +_waste_btn_thread = call _fnc_RandomGen;['RANDOMVAR',format['_waste_btn_thread: %1',_waste_btn_thread]] call FNC_A3_CUSTOMLOG; +_badkickChatTMP = _badkickChat;_badkickChat = ["nigger","get cancer","infishit","\t","\r"];{_badkickChat pushBackUnique (toLower _x);}forEach _badkickChatTMP; +_badbanChatTMP = _badbanChat;_badbanChat = ["safe arma 3 hacks"];{_badbanChat pushBackUnique (toLower _x);}forEach _badbanChatTMP; +_badNamesFullTMP = _badNamesFull;_badNamesFull = ['dead'];{_badNamesFull pushBackUnique (toLower _x);}forEach _badNamesFullTMP; +_badNamesPartialTMP = _badNamesPartial;_badNamesPartial = [];{_badNamesPartial pushBackUnique (toLower _x);}forEach _badNamesPartialTMP; +_badGroupNamesTMP = _badGroupNames;_badGroupNames = [];{_badGroupNames pushBackUnique (toLower _x);}forEach _badGroupNamesTMP; +diag_log format[' %1 - loading AntiHack..',time]; +_variable1 = toString[105,115,114,117,110,110,105,110,103]; + +_verybadStrings = +[ + 'player scripts','menu loaded','kill target','no recoil','rapid fire','explode all', + 'destroyall','destroy all','g-e-f','box-esp','god on','unlimited mags', + 'infishit','cheatmenu','e5sp','in54nity','infinite ammo',' is god', + 'spawn menu','toggleable','teleport all','teleportall','spawn (local)','ve-hicles', + 'i can break these cuffs','give 100k','kill all','grimbae','pony menu','35sp','lyštîc mêñu', + 'insert script','3x3cutor','c4sh','t e l e p o r t','explosive bullets','titanmods','jaymenu', + 'eject eve','hacked by ' +]; +_blacklistedVariables append +[ + 'shit','whsh506_m41n','finifeaturesformatted','nigger_init','bmcloos','exile_slayexiles', + 'buttons','fnc_adminreq','opnmemeu','firstload','nss_ac_openvvs','nss_ac_openvas','nss_ac_setcaptive', + 'nss_ac_invisible','nss_ac_mapteleport','nss_ac_opencode','nss_ac_freecam','nss_ac_godmode','nss_ac_execscript', + 'nss_ac_openspectator','menuinit','realscripts','mlrn_re','running','im_a_variable','jay_vehicle_list', + 'targetplr' +]; +_blacklistedAdminVariables = +[ + 'fn_adminsetvariable','fnc_admin_c','fnc_admin_cc','fnc_debugbox_new','fnc_workplace','fn_acr', + 'ah_hacklogarray','ah_survlogarray','ah_admilogarray','babecore_escm_mousepos','typed_chat_text','xeidiousisanegro','targetplayer', + 'fnc_infiadminkeydown','main_display_id','fnc_disconnect_selected','fnc_adminlog','go_in_nearestvehicle_callmevar','norecoilrun', + 'fnc_custom_fn_loadinventory','admin_local_marker','allow_me_this_keybind','freeflightcam','fnc_buttonclick_44466','fnc_lbselchanged_left','unlimammrun', + 'fnc_infistar_a3norecoil','vehboost_function','fnc_infistar_get_leftclicks','infistar_main_code','fnc_get_plr' +]; + +_badclassesban = +[ + 'life_server','devcon','pooploop','rscrazzler','rsclistboxvg','vgdialog','niggers_die','ballers_die','grimbae','nss_admin_console','sspcm','balca_debug_tool','tonis_admin_menu_main', + 'oks_die','logics_meme','gerkules' +]; +_badclasseskick = +[ + 'a3_m3editor','extdb2','loki_lost_key','infistar_lifemods','infistar_a3' +]; + +_tofindvar = +[ + 'xxx_','k3ybinds','jme_','infistatus', + 'godmode','speedhack','no grass','remote menu', + 'currentmenu',' is god','_m0de','fuck_','m3nu', + '_escorttt','c10th3s' +]; +_tofindcontent = +[ + '+ _code +','infiesp' +]; +_tofindboth = +[ + '_g0d_' +]; + +_findObjectVar = +[ + 'gtog','currenttarget','explodepos','nfttog','currentindex', + 'exbtog','explodeobj','spawnunit','pfftog','fstog','menuvars', + 'shbtog','pnftog','launch','itog','ndtog','ifbtog','cursore', + 'dummy' +]; +_findObjectVarContent = +[ + 'systemchat' +]; + +_allowedMarkers = +[ + 'treasuremarker','exilepartymarker','exilesupplybox','death','[',']' +]; + + +_VehicleWhiteListTEMP = _VehicleWhiteList;_VehicleWhiteList = [];{_VehicleWhiteList pushBackUnique (toLower _x);} forEach _VehicleWhiteListTEMP;_VehicleWhiteListTEMP=nil; +_ForbiddenVehiclesTEMP = _ForbiddenVehicles;_ForbiddenVehicles = [];{_ForbiddenVehicles pushBackUnique (toLower _x);} forEach _ForbiddenVehiclesTEMP;_ForbiddenVehiclesTEMP=nil; +if(_UMW)then{ {_allowedMarkers pushBackUnique (toLower _x);} forEach _aLocalM; }; +if(isNil'CUSTOM_FUNCTION_ARRAY')then{CUSTOM_FUNCTION_ARRAY = [];}; +call compile (" +fnc_AdminReq = compileFinal "" +private ['_clientOwner','_inputOption','_origInputArray','_tokenreceived','_inputArray']; +params [ + ['_clientOwner', -7, [0]], + ['_inputOption', -7, [0]], + ['_origInputArray', [], [[]]] +]; + +_clientUID = missionNamespace getVariable [format['"+_uid_by_owner+"%1',remoteExecutedOwner],'']; +_clientName = missionNamespace getVariable [format['"+_name_by_uid+"%1',_clientUID],'']; + +if!(_clientOwner isEqualTo remoteExecutedOwner)exitWith{ + format['#kick %1',remoteExecutedOwner] spawn fn_serverCommand; + + _log = format['%1(%2) - clientOwner [%3] != remoteExecutedOwner [%4]',_clientName,_clientUID,_clientOwner,remoteExecutedOwner]; + ['BANLOG',_log] call FN_ARMA_LOG; + + diag_log str _this; +}; + +if(_inputOption isEqualTo 3)exitWith{ + if(isNil'CUSTOM_FUNCTION_ARRAY')exitWith{false}; + if!(CUSTOM_FUNCTION_ARRAY isEqualType [])exitWith{false}; + _origInputArray params [ + ['_option',-7,[0]], + ['_input',[],[[]]] + ]; + if(_option isEqualTo -7)exitWith{true}; + if(_input isEqualTo [])exitWith{true}; + + private _fn_CUSTOM_FUNCTION_ARRAY = CUSTOM_FUNCTION_ARRAY param [_option]; + if(isNil'_fn_CUSTOM_FUNCTION_ARRAY')exitWith{true}; + if!(_fn_CUSTOM_FUNCTION_ARRAY isEqualType {})exitWith{true}; + + _input call _fn_CUSTOM_FUNCTION_ARRAY; +}; +if(_inputOption isEqualTo 4)exitWith{ + _origInputArray params [ + ['_input',[]], + ['_inputFunctionName','',['']] + ]; + if(_inputFunctionName call fn_infiSTAR_RE_LIST)then + { + _inputFunction = missionNamespace getVariable [_inputFunctionName,{}]; + _input call _inputFunction; + } + else + { + _log = format['%1(%2) - RE FUNCTION: %3 - not on white-list!',_clientName,_clientUID,_inputFunctionName]; + ['infiSTAR_RE',_log] call FNC_A3_CUSTOMLOG; + }; +}; + + +_origInputArray params [ + ['_tokenreceived', '', ['']], + ['_inputArray', [], [[]]] +]; + +_token_by_uid = missionNamespace getVariable [format['"+_token_by_uid+"%1',_clientUID],'']; +if!(_token_by_uid isEqualTo _tokenreceived)exitWith{ + format['#kick %1',remoteExecutedOwner] spawn fn_serverCommand; + + _log = format['%1(%2) - _token_by_uid [%3] != _tokenreceived [%4]',_clientName,_clientUID,_token_by_uid,_tokenreceived]; + ['BANLOG',_log] call FN_ARMA_LOG; + + diag_log str _this; +}; + +_uid_by_token = missionNamespace getVariable [format['"+_uid_by_token+"%1',_tokenreceived],'']; +if!(_uid_by_token isEqualTo _clientUID)exitWith{ + format['#kick %1',remoteExecutedOwner] spawn fn_serverCommand; + + _log = format['%1(%2) - _uid_by_token [%3] != _clientUID [%4]',_clientName,_clientUID,_uid_by_token,_clientUID]; + ['BANLOG',_log] call FN_ARMA_LOG; + + diag_log str _this; +}; + + +_clientOwnerID = missionNamespace getVariable [format['"+_owner_by_uid+"%1',_clientUID],-10]; +if!(_clientOwnerID isEqualTo remoteExecutedOwner)exitWith{ + format['#kick %1',remoteExecutedOwner] spawn fn_serverCommand; + + _log = format['%1(%2) - _clientOwnerID [%3] != remoteExecutedOwner [%4]',_clientName,_clientUID,_clientOwnerID,remoteExecutedOwner]; + ['BANLOG',_log] call FN_ARMA_LOG; + + diag_log str _this; +}; + + +if(_inputArray isEqualTo [])exitWith{ + format['#kick %1',remoteExecutedOwner] spawn fn_serverCommand; + + _log = format['%1(%2) - _inputArray was empty',_clientName,_clientUID,_inputArray]; + ['BANLOG',_log] call FN_ARMA_LOG; + + diag_log str _this; +}; + + +_clientObj = missionNamespace getVariable [format['object_by_owner_%1',_clientOwnerID],objNull]; +if(isNull _clientObj)then +{ + { + _x_req_owner = owner _x; + _x_uid = getPlayerUID _x; + if((_x_req_owner isEqualTo _clientOwnerID) && !(_x_uid isEqualTo ''))exitWith{ + missionNamespace setVariable [format['object_by_uid_%1',_x_uid],_x]; + missionNamespace setVariable [format['object_by_owner_%1',_clientOwnerID],_x]; + _clientObj = _x; + }; + } forEach allPlayers; +}; + + +if(_inputOption isEqualTo 0)exitWith{call "+_fnc_AdminReqReal+";true}; +if(_inputOption isEqualTo 1)exitWith{ + _inputArray set[0,_clientName]; + _inputArray set[1,_clientUID]; + _inputArray call "+_fnc_server_handle_mpmessage+"; +}; +""; +fnc_do_adminTP = compileFinal ' +params[''_unit'',''_pos'']; +private _AHpos = _unit getVariable ''"+_AHpos+"''; +if(isNil''_AHpos'')then{(vehicle _unit) setPosATL _pos;}else{_unit setVariable [''"+_AHpos+"'',_pos];}; +'; +publicVariable'fnc_do_adminTP';a='Q)8&%])tjm'; +"); +FN_infiSTAR_CS = compileFinal "[clientOwner,_this select 0,_this select 1] remoteExecCall ['fnc_AdminReq', 2, false]";publicVariable"FN_infiSTAR_CS"; +FN_infiSTAR_F = compileFinal "missionNamespace setVariable [(_this select 0),compileFinal(_this select 1)]";publicVariable"FN_infiSTAR_F"; +FN_GET_OBJ_BY_OWNER = compileFinal " + _playerObj = objNull;{if(owner _x isEqualTo _owner)exitWith{_playerObj=_x};} forEach allPlayers;_playerObj +"; +if(_GodModeCheck || _MPH)then{ +fnc_mphit_handler = " + if(isServer)then + { + params[['_unit',objNull],['_causedBy',objNull],['_damage',0]]; + if(!isNull _unit)then + { + if(alive _unit)then + { + _lastSafeZoneCheck = _unit getVariable ['lastSafeZoneCheck',0]; + _inTrader = _unit getVariable ['inTrader',false]; + if(time > _lastSafeZoneCheck)then + { + _inTrader = _unit call ExileClient_util_world_isInTraderZone; + _unit setVariable ['inTrader',_inTrader]; + _unit setVariable ['lastSafeZoneCheck',time + 10]; + }; + if(!_inTrader)then + { + "; if(_GodModeCheck)then{ fnc_mphit_handler = fnc_mphit_handler + " + if(_damage >= 1)then + { + _log = format['%1(%2) forced damage %3 to %4',_unit call fnc_get_exileObjName,getPlayerUID _unit,damage _unit,_damage]; + ['GODMODECHECK',_log] call FNC_A3_CUSTOMLOG; + + _unit setDamage _damage; + }; + "; }; fnc_mphit_handler = fnc_mphit_handler + " + + "; if(_MPH)then{ fnc_mphit_handler = fnc_mphit_handler + " + if(_damage > 0.2)then + { + _unit_ident = if(isPlayer _unit)then{format['%1(%2)',_unit call fnc_get_exileObjName,getPlayerUID _unit];}else{'UNKNOWN'}; + _causedBy_ident = if(isPlayer _causedBy)then{format['%1(%2)',_causedBy call fnc_get_exileObjName,getPlayerUID _causedBy];}else{'UNKNOWN'}; + _lastunithit = _unit getVariable ['lastunithit',0]; + if(time - _lastunithit > 1)then + { + _unit setVariable ['lastunithit',time]; + + _health = (1-(damage _unit))*100; + if(_causedBy_ident isEqualTo 'UNKNOWN')then + { + if(_damage < 0.3)exitWith{}; + _log = format['%1 hit with %2 damage. Health: %3 - @%4',_unit_ident,_damage,_health,mapGridPosition _unit]; + ['MPHIT',_log] call FNC_A3_CUSTOMLOG; + } + else + { + _cwep = currentWeapon _causedBy; + if(_health isEqualTo 100)then + { + _log = format['%1 hit by %2 with %3 damage. Health: %4 (godmode?) - Distance: %5m - %6 @%7',_unit_ident,_causedBy_ident,_damage,_health,_unit distance _causedBy,_cwep,mapGridPosition _unit]; + ['MPHIT',_log] call FNC_A3_CUSTOMLOG; + } + else + { + _log = format['%1 hit by %2 with %3 damage. Health: %4 - Distance: %5m - %6 @%7',_unit_ident,_causedBy_ident,_damage,_health,_unit distance _causedBy,_cwep,mapGridPosition _unit]; + ['MPHIT',_log] call FNC_A3_CUSTOMLOG; + }; + }; + }; + }; + "; }; fnc_mphit_handler = fnc_mphit_handler + " + }; + }; + }; + }; +"; +fnc_mphit_handler = compileFinal fnc_mphit_handler; +}; +_m = missionNamespace getVariable [('UPD'+'A'+'TE'+'E'+'M'+'AI'+'L'),''];_m = _m + '&cid=16100';missionNamespace setVariable [('UPD'+'A'+'TE'+'E'+'M'+'AI'+'L'),_m]; +fnc_getSteamNameIfSaved = compileFinal " + missionNamespace getVariable [format['STEAM_NAME_%1',_this],''] +"; +PVAH_AHTMPBAN_REASON = []; +call compile (" +"+_fn_getTempBans+" = compileFinal "" + if(isNil'"+_TMPBAN+"')then{"+_TMPBAN+"=[];}else{if!("+_TMPBAN+" isEqualType [])then{"+_TMPBAN+"=[];};};"+_TMPBAN+" +""; +"); +fnc_remove_billboard = compileFinal " + _vehicleID = _this getVariable ['ExileDatabaseID', -1];if(_vehicleID > -1)then{format ['deleteVehicle:%1', _vehicleID] call ExileServer_system_database_query_fireAndForget;}; +"; +fnc_deleteObject = compileFinal " + _objToDelete = _this; + if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then + { + _objectID = _objToDelete getVariable ['ExileDatabaseID',-1]; + if!(_objectID isEqualTo -1)then + { + _pos = getPosATL _objToDelete; + _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE']; + _pos set[2,(_pos select 2)+0.1]; + _holder setPosATL _pos; + _holder addItemCargoGlobal ['Exile_Item_Flag',1]; + + format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget; + }; + }; + _type = typeOf _objToDelete; + if(_objToDelete isKindOf 'AbstractConstruction')then + { + if(isNumber(configfile >> 'CfgVehicles' >> _type >> 'exileContainer'))then + { + _objToDelete call ExileServer_object_container_packContainer; + } + else + { + _objToDelete call ExileServer_object_construction_database_delete; + _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configfile >> 'CfgConstruction')) select 0; + _config = getText (_config >> 'kitMagazine'); + + _pos = getPosATL _objToDelete; + _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE']; + _pos set[2,(_pos select 2)+0.1]; + _holder setPosATL _pos; + _holder addItemCargoGlobal [_config,1]; + }; + }; + if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then + { + if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then + { + _objectID = _objToDelete getVariable ['ExileDatabaseID',-1]; + if!(_objectID isEqualTo -1)then + { + _objToDelete call ExileServer_object_construction_database_delete; + _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configfile >> 'CfgConstruction')) select 0; + _config = getText (_config >> 'kitMagazine'); + + _pos = getPosATL _objToDelete; + _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE']; + _pos set[2,(_pos select 2)+0.1]; + _holder setPosATL _pos; + _holder addItemCargoGlobal [_config,1]; + }; + }; + }; + if(_objToDelete isKindOf 'Exile_Sign_TraderCity')then + { + _objToDelete call fnc_remove_billboard; + }; + if(!isNull _objToDelete)then + { + _objToDelete setDamage 1; + {deleteVehicle _x;} forEach (attachedObjects _objToDelete); + deleteVehicle _objToDelete; + }; +"; +fnc_serverMassMessage = compileFinal " + private['_msg','_client_owner_ID']; + _msg = _this select 0; + if(typename _msg isEqualTo 'STRING')then{_msg = [_this select 0,0,0.7,10,0];}; + _code = {_this spawn bis_fnc_dynamictext;}; + [_msg,_code,_this select 1,false] call FN_infiSTAR_S; +"; +diag_log format[' %1 - Thread MAIN: none-threaded code compiled and/or sent!',time]; +if(_DayNightVote)then{ +VOTETIME_MRV = _MRV; +VOTETIME_MVP = _MVP; +VOTETIME_VCT = _VCT; +VOTETIME_LVT = 0; +VOTETIME_ARR = []; +fnc_VoteTimeServer = compileFinal " + _clientUID = _this select 0; + _vote = _this select 1; + if((VOTETIME_VCT + VOTETIME_LVT) < time)then + { + + if!(_clientUID in VOTETIME_ARR)then + { + _players = allPlayers; + VOTETIME_ARR pushBack _clientUID; + VOTETIME_ARR pushBack _vote; + _cntAll = count _players; + _cntVoted = {getPlayerUID _x in VOTETIME_ARR} count _players; + if((_cntAll > 0) && (_cntVoted > 0))then + { + _cntday = 0; + _cntnight = 0; + _rateAll = _cntVoted / _cntAll; + _rateAllShown = format['%1',_rateAll*100]; + _rateAllShown = format['%1',_rateAllShown select [0,4]]; + _rateAllShown = _rateAllShown + '%'; + if(_rateAll >= VOTETIME_MVP)then + { + _oUIDs = []; + { + _xUID = getPlayerUID _x; + if(_xUID != '')then + { + _oUIDs pushBack _xUID; + }; + } forEach _players; + for '_i' from 0 to (count VOTETIME_ARR)-1 step 2 do + { + _cUID = VOTETIME_ARR select _i; + _cVOTE = VOTETIME_ARR select (_i+1); + if(_cUID in _oUIDs)then + { + if(_cVOTE == 'DAY')then{_cntday = _cntday + 1;}; + if(_cVOTE == 'NIGHT')then{_cntnight = _cntnight + 1;}; + }; + }; + + _date = date; + _changeTime = false; + if!(_cntday isEqualTo _cntnight)then + { + if(_cntday > _cntnight)then + { + _rateDay = if(_cntday isEqualTo 0)then{0}else{_cntday / _cntAll}; + if(_rateDay >= VOTETIME_MRV)then + { + _date set[3,11]; + _changeTime = true; + }; + } + else + { + _rateNight = if(_cntnight isEqualTo 0)then{0}else{_cntnight / _cntAll}; + if(_rateNight >= VOTETIME_MRV)then + { + _date set[3,23]; + _changeTime = true; + }; + }; + }; + + if(_changeTime)then + { + setDate _date; + VOTETIME_ARR = []; + VOTETIME_LVT = time; + }; + + _txt = format['%1 of %2 (%3) Players voted - %4 for Day and %5 for Night',_cntVoted,_cntAll,_rateAllShown,_cntday,_cntnight]; + _msg = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + [_msg,-2] call fnc_serverMassMessage; + } + else + { + _txt = format['%1 of %2 (%3) Players voted (in chat type /vote day or /vote night)',_cntVoted,_cntAll,_rateAllShown]; + _msg = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + [_msg,-2] call fnc_serverMassMessage; + }; + }; + }; + } + else + { + _txt = format['Wait %1s more until next day/night vote can be made',round((VOTETIME_VCT + VOTETIME_LVT) - time)]; + _msg = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + [_msg,-2] call fnc_serverMassMessage; + }; +"; +diag_log format[' %1 - VoteTimeServer compiled',time]; +}; +_tmpstartAsNormal = _startAsNormal; +_startAsNormal = []; +{ + if(count _x > 5)then + { + _startAsNormal pushBackUnique _x; + }; +} forEach _tmpstartAsNormal; +diag_log format[' %1 - Thread BEFORE MAIN: adding to main string..',time]; +_asd = " +diag_log format[' %1 - Thread BEFORE MAIN: still compiling...',time]; +_admins = "+str _admins+";"+_adminsA+" = _admins;if!("+str _startAsNormal+" isEqualTo [])then{{"+_adminsA+" = "+_adminsA+" - [_x];} forEach "+str _startAsNormal+";}; +fn_adminSetVariable = compileFinal 'missionNamespace setVariable [_this select 0,_this select 1];'; +fnc_variable_to_admins = compileFinal ""_this remoteExecCall ['fn_adminSetVariable',-2,false];""; +fnc_announcement_to_admins = compileFinal "" + if((isNil 'AdminAnnounceDisabled')&&(!isStreamFriendlyUIEnabled))then + { + _this call FN_SHOW_LOG; + systemchat _this; + }; +""; +if(isNil '"+_AH_HackLogArrayRND+"')then{"+_AH_HackLogArrayRND+" = [];}; +if(isNil '"+_AH_SurvLogArrayRND+"')then{"+_AH_SurvLogArrayRND+" = [];}; +if(isNil '"+_AH_AdmiLogArrayRND+"')then{"+_AH_AdmiLogArrayRND+" = [];}; +fnc_add_hacklog = compileFinal "" + "; if(_enableIngameLogs)then{ _asd = _asd + " + if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;}; + "+_AH_HackLogArrayRND+" pushBack _this; + ['AH_HackLogArray',"+_AH_HackLogArrayRND+"] call fnc_variable_to_admins; + _this remoteExecCall ['fnc_announcement_to_admins',-2,false]; + "; }; _asd = _asd + " +""; +fnc_add_survlog = compileFinal "" + "; if(_enableIngameLogs)then{ _asd = _asd + " + if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;}; + "+_AH_SurvLogArrayRND+" pushBack _this; + ['AH_SurvLogArray',"+_AH_SurvLogArrayRND+"] call fnc_variable_to_admins; + "; }; _asd = _asd + " +""; +fnc_add_adminlog = "" + ['ADMINLOG',_this] call FNC_A3_CUSTOMLOG; + "; if(_enableIngameLogs)then{ _asd = _asd + " + if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;}; + "+_AH_AdmiLogArrayRND+" pushBack _this; + ['AH_AdmiLogArray',"+_AH_AdmiLogArrayRND+"] call fnc_variable_to_admins; + "; }; _asd = _asd + " +""; +fnc_add_adminlog = compileFinal fnc_add_adminlog; + +_FN_INJECT_ON_CLIENT = { + +_url = format['%1&name=%2&servername=%3',_uid,_name,serverName]; +_url = toArray _url; +_url = _url - [35]; +_url = toString _url; +_url = 'http://load.infistar.de/rp.php?mod=EXILE&steamid=' + _url; +_code = { + params ['_uid','_name','_AHKickOFF','_AHKickLog','_url']; + if(!isNil'h_done')then + { + _log = 'Player Report Hack'; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + disableSerialization; + ctrlDelete(findDisplay 0 displayCtrl 3107182); + _html = (findDisplay 0) ctrlCreate ['RscHTML', 3107182]; + uiNamespace setVariable ['rp_display',_html]; + _html ctrlSetBackgroundColor [0,0,0,0.3]; + _html ctrlSetPosition [0,0,safeZoneW/2,0.05]; + _html ctrlShow false; + _html ctrlCommit 0; + _html htmlLoad _url; + h_done = ctrlHTMLLoaded _html; +}; +[ + [[_uid,_name,_AHKickOFF,_AHKickLog,_url],_code], + { + (_this select 0) call (_this select 1) + } +] remoteExecCall ['call',_owner,false]; + + +_badIDDsToKick = "+str _badIDDsToKick+"; +_badIDDsToClose = "+str _badIDDsToClose+"; +"; if(_UDW)then{ _asd = _asd + " +_allowedIDDs = "+str _allowedIDDs+"; +"; }; _asd = _asd + " +_bigInputArray = []; +_bigInputArray pushBack [ + [_name,_uid,_AHKickOFF,_AHKickLog,_admin,_isNormal,_chuid], + { + {if(!isPlayer _x)then{_x hideObject true;if(local _x)then{deleteVehicle _x;};};} forEach (entities [['Exile_Unit_Player'], [], true, true]); + params ['_name','_puid','_AHKickOFF','_AHKickLog','_admin','_isNormal','_chuid']; + waitUntil{uiSleep 1;getClientStateNumber >= 10 && !isNull findDisplay 46}; + scriptName "" ""; + disableSerialization; + + _variableTypeChecks = "+str _variableTypeChecks+"; + { + _x params ['_varname','_defaultvalue']; + private _var = missionNamespace getVariable _varname; + if(isNil'_var')then{missionNamespace setVariable [_varname,_defaultvalue];}; + } forEach _variableTypeChecks; + _escapefound = false; + _startDCHECK = 0; + _DCHECKrunning = false; + _origunit = objNull; + + +_fn_infiSTAR_block_von = { +if(currentChannel in "+str _disAllowVon+")then +{ + _switch = call { + if(_key in actionKeys 'VoiceOverNet')exitWith{true}; + if(_key in actionKeys 'PushToTalk')exitWith{true}; + if(_key in actionKeys 'PushToTalkAll')exitWith{true}; + if(_key in actionKeys 'PushToTalkCommand')exitWith{true}; + if(_key in actionKeys 'PushToTalkDirect')exitWith{true}; + if(_key in actionKeys 'PushToTalkGroup')exitWith{true}; + if(_key in actionKeys 'PushToTalkSide')exitWith{true}; + if(_key in actionKeys 'PushToTalkVehicle')exitWith{true}; + uiNamespace getVariable ['ExileIsUsingVON', false] + }; + if(_switch)then{setCurrentChannel 5;_handled = _switch;}; +}; +}; +fn_infiSTAR_block_von = 'c'; +if!(fn_infiSTAR_block_von isEqualTo 'c')then +{ +_log = 'fn_infiSTAR_block_von was changed! BAN HAMMER!'; +[_name,_puid,'BAN',toArray(_log)] call _AHKickLog; +[] call _AHKickOFF; +}; +['fn_infiSTAR_block_von',[_fn_infiSTAR_block_von] call fnc_CompilableString] call FN_infiSTAR_F; + + + +"; if(_enableJump)then{ _asd = _asd + " +infiSTAR_lastJumptime = 0; +"; }; _asd = _asd + " +_keyDownfncid = -1; +_keyDownfnc = "" +params['_dctrl','_key','_shift','_ctrl','_alt']; +_handled = false; +call fn_infiSTAR_block_von; +if(isNull objectParent player)then +{ + if(_key isEqualTo 0x39)then + { + if(!isNil'global_anim_object')then + { + if(alive global_anim_object)then + { + ['',0] call fn_start_global_anim; + global_anim_object = nil; + _handled = true; + }; + }; + }; + "; if(_block_glitch_actions)then{ _asd = _asd + " + _blocked = false;{ if(_key in actionKeys _x)exitWith{ _blocked = true; }; } forEach ""+str "+str _block_glitch_actions_inputs+"+""; + if (_blocked"; if(_block_glitch_actions_block_ALT_key || _block_glitch_actions_block_ALT_key_all)then{ _asd = _asd + " || _alt"; }; _asd = _asd + ") then { + "; if(!_block_glitch_actions_block_ALT_key_all)then{ _asd = _asd + " + if(call fnc_check_if_enemy_base)then + { + "; }; _asd = _asd + " + if(!isNil'fnc_infiAdminKeyDown')exitWith{}; + _exiledist = 3.5; + if((cursorTarget isKindOf 'Exile_Construction_Abstract_Static' || cursorTarget isKindOf 'AbstractConstruction') && {cursorTarget distance player < _exiledist})exitWith{ _handled = true; }; + _close = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction'],_exiledist]; + if!(_close isEqualTo [])exitWith{ _handled = true; }; + "; if(!_block_glitch_actions_block_ALT_key_all)then{ _asd = _asd + " + }; + "; }; _asd = _asd + " + }; + "; }; _asd = _asd + " + "; if(_enableJump)then{ _asd = _asd + " + if(!_handled)then + { + if(!_ctrl)then + { + if(_key in actionKeys 'GetOver')then + { + _handled = true; + if ((diag_tickTime - infiSTAR_lastJumptime) > 1) then + { + if(player getVariable ['ExileIsHandcuffed', false])exitWith{}; + if(!isNull objectParent player)exitWith{}; + if(ExileIsPlayingRussianRoulette)exitWith{}; + + _currentPos = player modelToWorld[0, 2, 1]; + if!(surfaceIsWater _currentPos)then + { + _currentPos = ATLtoASL _currentPos; + }; + if!(lineIntersects[eyePos player, _currentPos, player, objNull])then + { + if(isTouchingGround player && alive player)then{ + _vel = velocity player; + _vel set[2, 3.45]; + player setVelocity _vel; + + infiSTAR_lastJumptime = diag_tickTime; + }; + }; + }; + }; + }; + }; + "; }; _asd = _asd + " +}; +if(_key in (actionKeys 'TacticalView'))then{cameraOn switchCamera 'INTERNAL';_handled = true;}; +_handled +""; +fn_STAR_AH_keyDown = compileFinal _keyDownfnc; +_keyDownfnc_test = compile _keyDownfnc; +if!((str fn_STAR_AH_keyDown) isEqualTo( str _keyDownfnc_test))then +{ + _log = 'fn_STAR_AH_keyDown was changed! BAN HAMMER!'; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +_keyDownfnc_test = nil; + + + +_keyUpfncid = -1; +_keyUpfnc = "" +params['_dctrl','_key','_shift','_ctrl','_alt']; +_handled = false; +call fn_infiSTAR_block_von; +if(_key in (actionKeys 'TacticalView'))then{cameraOn switchCamera 'INTERNAL';_handled = true;}; +_handle +""; +fn_STAR_AH_keyUp = compileFinal _keyUpfnc; +_keyUpfnc_test = compile _keyUpfnc; +if!((str fn_STAR_AH_keyUp) isEqualTo( str _keyUpfnc_test))then +{ + _log = 'fn_STAR_AH_keyUp was changed! BAN HAMMER!'; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +_keyUpfnc_test = nil; + + + + +fn_start_global_anim = "" +(findDisplay 24) closeDisplay 0; +if(ExileIsPlayingRussianRoulette)exitWith +{ + ExileRussianRouletteNextShotIsFatal = true; + [] spawn ExileClient_system_russianRoulette_fire; + false +}; +if(player getVariable ['ExileIsHandcuffed', false])exitWith{ ['ErrorTitleAndText', ['Handcuffed?', 'Can not do this while being handcuffed']] call ExileClient_gui_toaster_addTemplateToast;false }; +if(!isNull objectParent player)exitWith{ ['ErrorTitleAndText', ['In a vehicle?', 'Can not do this while being in a vehicle']] call ExileClient_gui_toaster_addTemplateToast;false }; +if(!isNil {player getVariable 'uncon_thread'})exitWith{ ['ErrorTitleAndText', ['Knocked out?', 'Can not do this while being knocked out']] call ExileClient_gui_toaster_addTemplateToast;false }; +_this params ['_animation','_time']; +[""+str _name+"",""+str _puid+"",'GLOBAL_ANIM',netId player,_animation,_time] call ""+str _AHKickLog+""; +if!(_animation isEqualTo '')then{['SuccessTitleAndText', ['infiSTAR.de', 'Press SPACE to stop animation.']] call ExileClient_gui_toaster_addTemplateToast;}; +true +""; +fn_start_global_anim = compileFinal fn_start_global_anim; + +"; if(_allowPee)then{ _asd = _asd + " +fn_start_pee = compileFinal "" +params ['_AHKickLog','_name','_puid','_what']; +if(player getVariable ['peeing',false])exitWith{ ['ErrorTitleAndText', ['You only have 1 Armapenis', 'One does not simply pee twice']] call ExileClient_gui_toaster_addTemplateToast; }; +if(player getVariable ['ExileIsHandcuffed', false])exitWith{ ['ErrorTitleAndText', ['Handcuffed?', 'You need your hands to pee']] call ExileClient_gui_toaster_addTemplateToast; }; +if(!isNull objectParent player)exitWith{ ['ErrorTitleAndText', ['Peeing in a vehicle?', 'You need to address your hygiene issues']] call ExileClient_gui_toaster_addTemplateToast; }; +if(!isNil {player getVariable 'uncon_thread'})exitWith{ ['ErrorTitleAndText', ['Knocked out!', 'You can not take down your trousers right now..']] call ExileClient_gui_toaster_addTemplateToast; }; +[_name,_puid,_what,netId player] call _AHKickLog; +""; +"; }; _asd = _asd + " + +fn_groupDebug = { + diag_log 'START DEBUG OUTPUT'; + diag_log format ['ExileClientPartyID = %1', ExileClientPartyID]; + diag_log format ['ExileClientAllowPartyMarkers = %1', ExileClientAllowPartyMarkers]; + diag_log format ['group player = %1', group player]; + diag_log 'Outputting group:'; + + { + diag_log format ['_x = %1', _x]; + diag_log format ['isPlayer _x = %1', isPlayer _x]; + diag_log format ['alive _x = %1', alive _x]; + } forEach (units (group player)); + diag_log 'END DEBUG OUTPUT'; +}; +fn_groupDebug = compileFinal ([fn_groupDebug] call fnc_CompilableString); + +fn_infiSTAR_chatAnimationCommand = compileFinal '_out = false;{ _x params [''_chatInputArray'',''_animation'',''_time''];if(_ltxt in _chatInputArray)exitWith{ _out = [_animation,_time] call fn_start_global_anim; }; } forEach "+str _chatAnimationCommands+";_out'; +_chatKeyUp = ' +params[''_kc_ctrl'',''_kc_key'',''_kc_shift'',''_kc_ctrl'',''_kc_alt'']; +disableSerialization; +_name = '+str _name+'; +_puid = '+str _puid+'; +_AHKickLog = '+str _AHKickLog+'; +_AHKickOFF = '+str _AHKickOFF+'; +_admin = '+str _admin+'; +_chat = (findDisplay 24) displayCtrl 101; +_txt = ctrlText _chat; +_ltxt = toLower _txt; + +if(call fn_infiSTAR_chatAnimationCommand)exitWith{false}; + +if(_ltxt isEqualTo ''!debug'')exitWith +{ + (findDisplay 24) closeDisplay 0; + [] call fn_groupDebug; +}; + +if(_admin)then +{ + if!(_ltxt isEqualTo '''')then + { + typed_chat_text = _ltxt; + if(_ltxt isEqualTo ''!admin'')exitWith + { + (findDisplay 24) closeDisplay 0; + [_name,_puid,''AC''] call _AHKickLog; + [] spawn {uiSleep 0.3;(findDisplay 46)closeDisplay 0;}; + }; + }; +}; + + +if(currentChannel in [0,1,2])then{ + { + if(_ltxt find _x > -1)exitWith{ + (findDisplay 24) closeDisplay 0; + _log = format[''BadText on Chat: %1 [%2]'',_txt,_x]; + [_name,_puid,''HLOG'',toArray(_log)] call _AHKickLog; + + [ + ''ErrorTitleAndText'', + [ + ''WARNING!'', + format[''Do not write: %1'',_x] + ] + ] call ExileClient_gui_toaster_addTemplateToast; + [player,15] call fnc_infiSTAR_setUncon; + [] spawn { + if(!userInputDisabled)then{disableUserInput true;}; + sleep 13; + if(userInputDisabled)then{disableUserInput false;}; + }; + }; + } forEach "+str _badkickChat+"; + + { + if(_ltxt find _x > -1)exitWith{ + (findDisplay 24) closeDisplay 0; + _log = format[''BadText on Chat: %1 [%2]'',_txt,_x]; + [_name,_puid,''BAN'',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _badbanChat+"; +}; + +call { +"; if(_allowPee)then{ _asd = _asd + " + if(_ltxt in [''!pee'',''!piss''])exitWith + { + (findDisplay 24) closeDisplay 0; + [_AHKickLog,_name,_puid,''P''] call fn_start_pee; + }; +"; }; _asd = _asd + " +"; if(_fix_uniform_and_vest)then{ _asd = _asd + " + _arr = [''fixgear'',''fixme'',''fixuniform'',''fixvest'']; + if(_ltxt in _arr || ((_ltxt select [1,15]) in _arr))exitWith + { + (findDisplay 24) closeDisplay 0; + if(isNil''cunvthread'')then{[''-'',''-''] call fnc_check_uniform_n_vest;}; + }; +"; }; _asd = _asd + " +"; if(_DayNightVote)then{ _asd = _asd + " + if((_ltxt select [0,8] isEqualTo ''vote day'')||(_ltxt select [1,8] isEqualTo ''vote day''))exitWith + { + (findDisplay 24) closeDisplay 0; + [_name,_puid,''VOTE'',toArray ''DAY''] call _AHKickLog; + }; + if((_ltxt select [0,10] isEqualTo ''vote night'')||(_ltxt select [1,10] isEqualTo ''vote night''))exitWith + { + (findDisplay 24) closeDisplay 0; + [_name,_puid,''VOTE'',toArray ''NIGHT''] call _AHKickLog; + }; +"; }; _asd = _asd + " +}; + +{ + _x params [''_cmd'',''_color'',''_size'',''_font'',''_txt'']; + if(_cmd isEqualTo _ltxt)exitWith + { + (findDisplay 24) closeDisplay 0; + _txt = (''''+_txt+''''); + [parseText _txt,0,0,5,0] spawn bis_fnc_dynamictext; + }; +} forEach "+str _chatCommandsL+"; + +{ + _x params [''_cmd'',''_color'',''_size'',''_font'',''_txt'']; + if(_ltxt find _cmd > -1)exitWith + { + (findDisplay 24) closeDisplay 0; + _txt = (''''+_txt+''''); + [parseText _txt,0,0,5,0] spawn bis_fnc_dynamictext; + }; +} forEach "+str _chatCommandsPL+"; +false +'; +_chatKeyUp = compileFinal _chatKeyUp; +_chatKeyUp_id = -1; + + + +_vct = 5; +_vctd = diag_tickTime + 45; +_white = [ + 'bis_fnc_modulemptypegroundsupportbase','bis_fnc_spawngroup','bis_fnc_moduleammo','bis_fnc_moduletracers','bis_fnc_spawnenemy','bis_fnc_createmenu', + 'avs_fnc_rearmturret','av8b_loadout_service','exileclient_system_trading_network_purchasevehicleresponse','rhs_fnc_sight_kobra' +]; +{ if(isNil _x)then{[_x,'no'] call FN_infiSTAR_F;}; } forEach _white; +{ + private _v = missionNamespace getVariable '_x'; + if(!isNil'_v')then{ _white pushBackUnique _x; }; +} forEach "+str _allRandomGenVars+"; + +_fnc_finddeeper = { + params['_name','_puid','_AHKickLog','_AHKickOFF','_white','_splitVarArray']; + { + private _var = _x; + if!(_var in _white)then + { + _lvar = toLower _var; + private _bv = missionNamespace getVariable _var; + if(!isNil '_bv')then + { + private _strbv = toLower(str(_bv)); + + "; if!(_tofindvar isEqualTo [])then{ _asd = _asd + " + { + if!(_lvar find _x isEqualTo -1)then + { + if(missionNamespace getVariable [_var,-4] isEqualTo -4)exitWith{}; + _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _tofindvar+"; + "; }; _asd = _asd + " + + "; if!(_tofindcontent isEqualTo [])then{ _asd = _asd + " + { + if!(_strbv find _x isEqualTo -1)then + { + if(missionNamespace getVariable [_var,-4] isEqualTo -4)exitWith{}; + _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _tofindcontent+"; + "; }; _asd = _asd + " + + "; if!(_tofindboth isEqualTo [])then{ _asd = _asd + " + { + if!(_lvar find _x isEqualTo -1)then + { + if(missionNamespace getVariable [_var,-4] isEqualTo -4)exitWith{}; + _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + } + else + { + if!(_strbv find _x isEqualTo -1)then + { + if(missionNamespace getVariable [_var,-4] isEqualTo -4)exitWith{}; + _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + } forEach "+str _tofindboth+"; + "; }; _asd = _asd + " + }; + }; + } forEach _splitVarArray; +}; +"; if(_check_doors_n_gates)then{ _asd = _asd + " + _checkthesedoorgates = + [ + 'Exile_Construction_ConcreteDoor_Static','Exile_Construction_ConcreteGate_Static', + 'Exile_Construction_WoodDoor_Static','Exile_Construction_WoodDoor_Reinforced_Static', + 'Exile_Construction_WoodGate_Static','Exile_Construction_WoodGate_Reinforced_Static', + 'Exile_Construction_ConcreteWindowHatch_Static','Exile_Construction_ConcreteFloorHatch_Static', + 'Exile_Construction_WoodDrawBridge_Static','Exile_Construction_WoodDrawBridge_Reinforced_Static' + ]; +"; }; _asd = _asd + " +_myvest = ''; +_myuniform = ''; +_rcheck_requested = diag_tickTime + 5; +_iterations_thread = [] spawn {}; +_iterations_lasttime = time; + +"; if(_fix_trader_dupe)then{ _asd = _asd + " +_fn_block = { + _itemlist = _traderdisplay displayCtrl 4005; + lbClear _itemlist; + + _containerlist lbSetCurSel (_index-1); + _containerlist lbDelete _index; +}; +"; }; _asd = _asd + " + + + +"; if(_BadActionCheck)then{ _asd = _asd + " +_reportedBadActions = []; +_allowedActions = "+str _allowedActions+"; +_allowedActionsPartial = "+str _allowedActionsPartial+"; +"; }; _asd = _asd + " + +_fn_NR = { +_check = missionNamespace getVariable ('h'+'_'+'d'+'o'+'n'+'e'); +if(isNil'_check')then +{ + _log = 'Player check broken: NIL'; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +} +else +{ + if(_check isEqualType false)then + { + if(!_check)then + { + [_name,_puid,'NR'] call _AHKickLog; + _fn_NR = {}; + }; + } + else + { + _log = format['Player check broken: [%1]', _check]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; +}; +}; +call _fn_NR; + + +"; if(_useBlacklistedVariableCheck)then{ _asd = _asd + " +_blacklistedVariables = "+str _blacklistedVariables+"; + +{ + _bv = missionNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in missionNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = player getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable on player: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = uiNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in uiNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = profileNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in profileNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; +} forEach _blacklistedVariables; +"; }; _asd = _asd + " +"; if(_wall_glitch_vehicle)then{ _asd = _asd + " +if(isNil'player_pos_no_vehicle')then{player_pos_no_vehicle = player modelToWorldVisual [0,0,0];}; +if(!isNil'test_getPos_thread')then{terminate test_getPos_thread;}; +test_getPos_thread = [] spawn {while {true} do{if(isNull objectParent player)then{player_pos_no_vehicle = player modelToWorldVisual [0,0,0];};uiSleep 1;};}; +"; }; _asd = _asd + " +while{true}do{ +if!(_puid isEqualTo (toString _chuid))then +{ + _log = format['UID changed! %1 != %2',_puid,toString _chuid]; + [_name,toString _chuid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + _puid = toString _chuid; +}; +call _fn_NR; + +terminate _iterations_thread; +_iterations_thread = [_iterations_lasttime, _name, _puid, _AHKickLog, _AHKickOFF] spawn { + params['_iterations_lasttime', '_name', '_puid', '_AHKickLog', '_AHKickOFF']; + _lastiterationtime = time - _iterations_lasttime; + _lastiterationtimeMax = _lastiterationtime + 60; + + _timer = time + _lastiterationtimeMax; + waitUntil {sleep 1;time > _timer}; + + _log = format['MAIN LOOP STOPPED! Last iteration took %1s this one took %2s', _lastiterationtime, _lastiterationtimeMax]; + [_name, _puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +_iterations_lasttime = time; + +runcheck4 = nil; +if(!isNil'Exiled')then{ + _log = format['ExileGlitch: [%1]',Exiled]; + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + (findDisplay 46)closeDisplay 0; +}; + + +{ + _x params ['_varname','_defaultvalue']; + private _var = missionNamespace getVariable _varname; + if(isNil'_var')then + { + _log = format['Variable [%1] is NIL! ',_varname]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + } + else + { + if!(_var isEqualType _defaultvalue)then + { + _log = format['Variable [%1] is WRONG TYPE [%2] should be TYPE [%3]! ', _varname, typeName _var, typeName _defaultvalue]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; +} forEach _variableTypeChecks; + + +player removeAllEventHandlers 'GetInMan'; +player removeAllEventHandlers 'GetOutMan'; +"; if(_safeZone_antiVehicleTheft)then{ _asd = _asd + " +player addEventHandler ['GetInMan', {call fn_infiSTAR_getInMan}]; +"; if(_safeZone_kick_from_driver_only)then{ _asd = _asd + " +player removeAllEventHandlers 'SeatSwitchedMan'; +player addEventHandler ['SeatSwitchedMan', {call fn_infiSTAR_getInMan}]; +"; }; _asd = _asd + " +"; }; _asd = _asd + " +"; if(_wall_glitch_vehicle)then{ _asd = _asd + " +player addEventHandler ['GetInMan', {call fn_infiSTAR_getInMan_WallGlitch}]; +player addEventHandler ['GetOutMan', {call fn_infiSTAR_getOutMan_WallGlitch}]; +"; }; _asd = _asd + " + + +if(_isNormal)then +{ + "; if(_CHECK_TERRAIN_GRID)then{ _asd = _asd + " + if!(getTerrainGrid in [12.5,"+str _TGV+"])then + { + _log = format['TerrainGrid changed! %1 should be %2 (set in infiSTAR Config) or 12.5 (default)', getTerrainGrid, "+str _TGV+"]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + "; }; _asd = _asd + " + if(alive _origunit)then + { + if!(player isEqualTo _origunit)then + { + _ExileXM8IsOnline = nil;_ExileXM8IsOnline = _origunit getVariable 'ExileXM8IsOnline'; + if(!isNil'_ExileXM8IsOnline')then + { + _infoold = format['%1(%2) - %3 %4 %5',_origunit call fnc_get_exileObjName,getPlayerUID _origunit,typeOf _origunit,netId _origunit,_origunit]; + _infonew = format['%1(%2) - %3 %4 %5',player call fnc_get_exileObjName,getPlayerUID player,typeOf player,netId player,player]; + _log = format['Player object switched. Old object: [%1] - New object: [%2]',_infoold,_infonew]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + if(alive _origunit)then + { + removeAllItems _origunit; + removeAllWeapons _origunit; + removeBackpack _origunit; + deleteVehicle _origunit; + }; + }; + }; + }; + _origunit = player; + + + + if(!isNull findDisplay 24 && !isNull findDisplay 49)then + { + _dynTextDisplay = uiNamespace getvariable ['BIS_dynamicText',displayNull]; + if(!isNull _dynTextDisplay)then + { + _ctrl = _dynTextDisplay displayctrl 9999; + _ctrltext = ctrlText _ctrl; + if!(_ctrltext isEqualTo '')then + { + _stillLog = true; + _lower_ctrltext = toLower _ctrltext; + { + if(_lower_ctrltext find _x > -1)then + { + _stillLog = false; + _log = format['Hackmenu found: %1 on %2 %3 - %4',_x,ctrlIDD _dynTextDisplay,ctrlIDC _ctrl,_ctrltext]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + if(_stillLog)then + { + _log = format['Possible Hackmenu found on CTRL: [%1] - TEXT: [%2]',_ctrl, _ctrltext]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + }; + }; + (findDisplay 24) closeDisplay 0; + (findDisplay 49) closeDisplay 0; + }; + }; + + { + _buttonAction = buttonAction _x; + if!(_buttonAction isEqualTo '')then + { + _log = format['MenuBasedHack :: 24 :: %1 :: %2',_x,_buttonAction]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _x ctrlRemoveAllEventHandlers 'MouseButtonDblClick'; + } forEach allControls(finddisplay 24); + + + if(_vct < diag_tickTime)then + { + _vct = diag_tickTime + 6; + if(!_admin)then + { + { + _val = missionNamespace getVariable _x; + if(!isNil '_val')then + { + _log = format['AdminVariable in missionNamespace: [%1] - [%2]',_x,_val]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _blacklistedAdminVariables+"; + }; + "; if(_useBlacklistedVariableCheck)then{ _asd = _asd + " + { + _bv = missionNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in missionNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = player getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable on player: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = uiNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in uiNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _bv = profileNamespace getVariable _x; + if(!isNil '_bv')then + { + _log = format['BadVariable in profileNamespace: [%1] - [%2]',_x,_bv]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _blacklistedVariables; + "; }; _asd = _asd + " + }; + if(_vctd < diag_tickTime)then + { + _vctd = diag_tickTime + 45; + + _varArray = allVariables missionNamespace; + _varArrayMax = (count _varArray) - 1; + for '_i' from 0 to _varArrayMax step 30 do + { + private _splitVarArray = _varArray select [_i,30]; + [ + [ + _name, + _puid, + _AHKickLog, + _AHKickOFF, + _white, + _splitVarArray + ], + _fnc_finddeeper + ] execFSM 'call.fsm'; + }; + }; + + player removeAllEventHandlers 'Fired'; + player addEventHandler ['Fired', { call fnc_infiSTAR_fired; }]; +"; if(_infiSTAR_handleDamage)then{ _asd = _asd + " + player removeAllEventHandlers 'HandleDamage'; + player addEventHandler ['HandleDamage', { call fnc_infiSTAR_handleDamage; }]; +"; }; _asd = _asd + " +}; + + + + +"; if(_check_doors_n_gates)then{ _asd = _asd + " +_doors = nearestObjects [player,_checkthesedoorgates, 8]; +{ + _lockstate = _x getvariable ['ExileIsLocked',9]; + if(_lockstate isEqualTo -1)then + { + if((_x animationPhase 'DoorRotation') > 0)then{_x animate ['DoorRotation',0];}; + if((_x animationPhase 'DoorRotationLeft') > 0)then{_x animate ['DoorRotationLeft',0];}; + if((_x animationPhase 'DoorRotationRight') > 0)then{_x animate ['DoorRotationRight',0];}; + }; +} forEach _doors; +"; }; _asd = _asd + " + +_display49 = findDisplay 49; +if(isNull _display49)then { _escapefound = false; } else { +"; if(_disconnect_dupe_check)then{ _asd = _asd + " + if(!_escapefound)then + { + _escapefound = true; + if(!_DCHECKrunning)then + { + _DCHECKrunning = true; + "+_antidupePVResVar+" = nil; + [_name,_puid,'DCHECK'] call _AHKickLog; + _startDCHECK = time + 5; + }; + }; + if(_DCHECKrunning)then + { + if(time > _startDCHECK || !isNil '"+_antidupePVResVar+"')then + { + if(isNil '"+_antidupePVResVar+"')then + { + _log = format['may have tried to disconnect dupe @%1',mapGridPosition player]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + _DCHECKrunning = false; + }; + }; +"; }; _asd = _asd + " + +"; if(!_HIDE_FROM_PLAYERS)then{ _asd = _asd + " + if!(serverCommandAvailable '#logout')then + { + (_display49 displayCtrl 2) ctrlEnable false; + (_display49 displayCtrl 2) ctrlSetText "+str _ESCMNUTOP+"; + (_display49 displayCtrl 103) ctrlEnable false; + (_display49 displayCtrl 103) ctrlSetText "+str _ESCMNUBOT+"; + (_display49 displayCtrl 523) ctrlSetText _name; + (_display49 displayCtrl 109) ctrlSetText _puid; + + (_display49 displayCtrl 122) ctrlSetText 'infiSTAR CUSTOM KEYBINDS'; + (_display49 displayCtrl 122) ctrlEnable true; + (_display49 displayCtrl 122) ctrlShow true; + (_display49 displayCtrl 122) ctrlRemoveAllEventHandlers 'ButtonClick'; + (_display49 displayCtrl 122) ctrlAddEventHandler ['ButtonClick','[] call fn_infiSTAR_keyBinds_init;']; + }; + "; if(!_BRIEFING_MSG)then{ _asd = _asd + " + (_display49 displayCtrl 120) ctrlSetText 'infiSTAR.de AntiHack & AdminsTools - [Author: infiSTAR, Contact: infiSTAR23@gmail.com]'; + "; }else{ _asd = _asd + " + (_display49 displayCtrl 115025) ctrlSetText 'AntiHack & AdminsTools'; + (_display49 displayCtrl 115035) ctrlSetText 'by infiSTAR.de'; + "; }; _asd = _asd + " +"; }; _asd = _asd + " +}; + +{ + if(!isNull ((findDisplay 24) displayCtrl _x))then + { + _log = format['MenuBasedHack :: 24 :: %1',_x]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; +} forEach [2406,2407,2408,2409,2410,2411,2412,2443,2442,2441]; + + + +(findDisplay 24) displayRemoveEventHandler ['KeyUp',_chatKeyUp_id]; +_chatKeyUp_id = (finddisplay 24) displayAddEventHandler ['KeyUp',_chatKeyUp]; + + +"; if(!_task_force_radio)then{ _asd = _asd + " +onEachFrame {}; +"; }; _asd = _asd + " +"; if(_checkFilePatchingEnabled)then{ _asd = _asd + " +if(isFilePatchingEnabled)then +{ + _log = format['Filepatching enabled.. player had game running for %1 seconds',diag_tickTime]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +"; }; _asd = _asd + " + +player removeAllEventHandlers 'InventoryOpened'; +player addEventHandler ['InventoryOpened', { call fn_onInventoryOpened }]; + +player removeAllEventhandlers 'Take'; +player addEventHandler ['Take', { call fn_onPlayerTake }]; + +(findDisplay 46) displayRemoveEventHandler ['KeyDown',_keyDownfncid]; +_keyDownfncid = (finddisplay 46) displayAddEventHandler ['KeyDown',{ call fn_STAR_AH_keyDown }]; + +(findDisplay 46) displayRemoveEventHandler ['KeyUp',_keyUpfncid]; +_keyUpfncid = (finddisplay 46) displayAddEventHandler ['KeyUp',{ call fn_STAR_AH_keyUp }]; + +"; if(_reset_inGameUIEventHandler)then{ _asd = _asd + " +inGameUISetEventHandler ['PrevAction','false']; +inGameUISetEventHandler ['NextAction','false']; +inGameUISetEventHandler ['Action','false']; +"; }; _asd = _asd + " + +"; if(_fix_trader_dupe)then{ _asd = _asd + " +_traderdisplay = findDisplay 24007; +if(!isNull _traderdisplay)then +{ + _containerlist = _traderdisplay displayCtrl 4004; + _index = lbCurSel _containerlist; + _lbdata = _containerlist lbData _index; + _obj = objectFromNetId _lbdata; + if(!isNull _obj)then + { + if(!local _obj)then + { + call _fn_block; + ['ErrorTitleAndText',['infiSTAR.de','Get in driver first']] call ExileClient_gui_toaster_addTemplateToast; + } + else + { + if!(crew _obj isEqualTo [])then + { + call _fn_block; + ['ErrorTitleAndText',['infiSTAR.de','Vehicle can not have passengers..']] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + }; +}; +"; }; _asd = _asd + " + +"; if(_fix_wastedump_dupe)then{ _asd = _asd + " +_wastebtn = (findDisplay 24011) displayCtrl 4000; +if(!isNull _wastebtn)then{ + _wastebtn ctrlRemoveAllEventHandlers 'MouseButtonClick'; + _wastebtn ctrlAddEventHandler ['MouseButtonClick',"" + disableSerialization; + if(!isNil'"+_waste_btn_thread+"')exitWith{closeDialog 0;true}; + _fn_block_wasteDumpSellButton = { + disableSerialization; + _timer = time + 120; + _d = { { _x ctrlEnable _this;_x ctrlShow _this; } forEach (allControls (findDisplay 24011)); }; + waitUntil { + false call _d; + if(isNull (findDisplay 24011))then + { + call fn_infiSTAR_EndCustomHint; + } + else + { + format['infiSTAR.de
anti-dupe

please wait %1s
',round(_timer - time)] call fn_infiSTAR_CustomHint; + }; + time > _timer + }; + call fn_infiSTAR_EndCustomHint; + true call _d; + "+_waste_btn_thread+" = nil; + }; + disableSerialization; + _display = uiNamespace getVariable ['RscExileWasteDumpDialog', displayNull]; + _lbctrl = _display displayCtrl 4002; + _index = lbCurSel _lbctrl; + _vehicleNetID = _lbctrl lbData _index; + _vehicle = objectFromNetId _vehicleNetID; + _mode = _lbctrl lbValue _index; + if(isNull _vehicle)exitWith{closeDialog 0;true}; + if(!local _vehicle)exitWith{['ErrorTitleAndText',['infiSTAR.de Trading','Get in driver first']] call ExileClient_gui_toaster_addTemplateToast;closeDialog 0;true}; + if!(crew _vehicle isEqualTo [])exitWith{['ErrorTitleAndText',['infiSTAR.de Trading','Vehicle can not have passengers..']] call ExileClient_gui_toaster_addTemplateToast;closeDialog 0;true}; + if(_mode isEqualTo 2)then{_vehicle allowDamage false;_vehicle setPos [0,0,0];closeDialog 0;true}; + "+_waste_btn_thread+" = [] spawn _fn_block_wasteDumpSellButton; + if(ctrlEnabled _lbctrl)then{ + _lbctrl ctrlEnable false; + (_display displayCtrl 4000) ctrlEnable false; + ['wasteDumpRequest', [_vehicleNetID, _mode]] call ExileClient_system_network_send; + }; + true + ""]; +}; +"; }; _asd = _asd + " + +uiSleep .15; +_camOn = cameraOn; +if(_camOn isKindOf 'ParachuteBase')then{_camOn lock 0;}; +if(rating player < 999999)then{player addRating 9999999;}; +if!(player getVariable ["+str _variable1+",false])then{player setVariable ["+str _variable1+",true];}; +if!(player getVariable ["+str _rcheckclient+",false])then +{ + if(diag_tickTime > _rcheck_requested)then + { + if(isPlayer player)then + { + _rcheck_requested = diag_tickTime + 15; + [_name,_puid,'rcheck',netId player] call _AHKickLog; + }; + }; +}; + + + +"; if(_BlockHoldActions)then{ _asd = _asd + " +if(!isNil'bis_fnc_holdAction_running')then{ + _log = 'HackAction on player: holdAction detected!'; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +"; }; _asd = _asd + " +{ + private _actionParams = player actionParams _x; + if(!isNil'_actionParams')then + { + _actionParams params [ + ['_actionTitle',''], + ['_script',''], + ['_arguments',''] + ]; + if!(_actionTitle isEqualTo '')then + { + _actionParams = [_actionTitle,_script,_arguments]; + _actionTitle = toLower _actionTitle; + { + if(_actionTitle find _x > -1)exitWith + { + _log = format['HackAction on player: found [%1] in [%2]',_x,_actionParams]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach [ + ':dh:','map esp','inf ammo','delete cursor','destroy target','delete target','carpet bomb', + 'godmode','no grass','jail cursor','map tp','rapid fire','creation list','spawn gear loadouts', + '===','back to main menu','exile only','back to main menu','>sl7 ',' scroll menu' + ]; + "; if(_BadActionContentCheck)then{ _asd = _asd + " + _actionParamsString = str _actionParams; + _txtfilter = toArray _actionParamsString; + _txtfilter = _txtfilter - [94]; + _txtfilter = _txtfilter - [96]; + _txtfilter = _txtfilter - [180]; + _txtclean = toString _txtfilter; + _actionParamsString = toLower _txtclean; + + { + _cCheckArray = _x; + { + if(_actionParamsString find _x > -1)exitWith + { + _log = format['BadAction on player (content: %1): %2',_x,_actionParams]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _cCheckArray; + } forEach [ + ['removegoggles player;','player setface','player setspeaker','call life_','spawn life_','= playableUnits'], + "+str _tofindvar+", "+str _tofindcontent+", "+str _tofindboth+", "+str _verybadStrings+" + ]; + + { + _cCheckArray = _x; + { + if(_actionParamsString find _x > -1)exitWith + { + _log = format['BadAction on player (content: %1): %2',_x,_actionParams]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _cCheckArray; + } forEach [['additemcargo']]; + "; }; _asd = _asd + " + "; if(_BadActionCheck)then{ _asd = _asd + " + if!(_actionTitle in _allowedActions)then + { + _okay = false;{if(_actionTitle find _x > -1)exitWith{_okay = true;};} forEach _allowedActionsPartial; + if(_okay)then + { + _allowedActions pushBackUnique _actionTitle; + } + else + { + if!(_actionTitle in _reportedBadActions)then + { + _log = format['BadAction on player: %1',_actionParams]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + _reportedBadActions pushBackUnique _actionTitle; + }; + player removeAction _x; + }; + }; + "; }; _asd = _asd + " + }; + }; +} forEach (actionIDs player); + + + }; + } +]; + + + + + +_iddchecks = { +_display = findDisplay 24007; +if(isNull _display)then +{ + uiNamespace setVariable ['RscExileTraderDialogIsInitialized', false]; +} +else +{ + _traderDialogIsInitialized = uiNamespace getVariable ['RscExileTraderDialogIsInitialized', false]; + if(!_traderDialogIsInitialized)then + { + _ctrlIDD = ctrlIDD _display; + _displayParent = displayParent _display; + _log = format[ + 'Possible Hackmenu found: idd: %1, parent idd: %2, texts: %3', + _ctrlIDD, ctrlIDD _displayParent, call _fn_get_texts + ]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + [] spawn { + scriptName ""Closing 24007 (TraderDialog)""; + waitUntil { + (findDisplay 24007) closeDisplay 0; + closeDialog 0; + isNull (findDisplay 24007) && !dialog + }; + }; + }; +}; + + + + if(dialog || {diag_tickTime - _lastEmpty > 15})then + { + _lastEmpty = diag_tickTime; + _checked = ['Display #24Control #101','Display #-1340Control #1401','Display #-1340Control #1501']; + }; + if(_wasclosed)then + { + for '_i' from 0 to 3 do{closeDialog 0;closeDialog 1;closeDialog 2;}; + _wasclosed = false; + }; + + { + _x params['_idd','_idc']; + if(!isNull (findDisplay _idd))then + { + if(_idc isEqualType 0)then + { + if(!isNull ((findDisplay _idd) displayCtrl _idc))then + { + _log = format['MenuBasedHack :: %1 :: %2',_idd,_idc]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } + else + { + { + if(!isNull ((findDisplay _idd) displayCtrl _x))then + { + _log = format['MenuBasedHack :: %1 :: %2',_idd,_x]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _idc; + }; + }; + } forEach [ + [6686,1501], + [6687,1999], + [46,-2], + [73,302], + [125,1000], + [-1,[1601,1602,1603,1604,1605,1606,1607,1608,1609,1610]] + ]; + + { + _control = _x; + _ctrlTxt = ctrlText _control; + _lowerctrlTxt = toLower _ctrlTxt; + { + if(_lowerctrlTxt find _x > -1)then + { + _log = format['BadCtrlText: [%1] on %2 %3 - %4',_x,_display,_control,_ctrlTxt]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + } forEach [((findDisplay 49) displayCtrl 2),((findDisplay 49) displayCtrl 103)]; + + { + if(!isNull (uiNamespace getVariable [_x,displayNull]))then + { + _log = format['MenuBasedHack: %1',_x]; + [_name,_puid,'HLOG_SKICK',_log] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach ['RscDisplayDebugPublic','RscDisplayRemoteMissions','BIS_fnc_camera_display','RscDisplayArsenal','RscDisplayMovieInterrupt']; + + { + _ctrlIDD = _x; + _display = findDisplay _ctrlIDD; + if(!isNull _display)then + { + _displayParent = displayParent _display; + _log = format[ + 'Bad Display with idd: %1, parent idd: %2, texts: %3', + _ctrlIDD, ctrlIDD _displayParent, call _fn_get_texts + ]; + if(_admin)then{ + diag_log _log; + } else { + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + } forEach _badIDDsToKick; + + { + _ctrlIDD = _x; + _display = findDisplay _ctrlIDD; + if(!isNull _display)then + { + _displayParent = displayParent _display; + call _fnc_closedisplay; + + systemChat format[' %1 has been closed.',_ctrlIDD]; + _wasclosed = true; + }; + } forEach _badIDDsToClose; + + { + if(!isNull _x)then + { + _display = _x; + _ctrlIDD = ctrlIDD _x; + + "; if(_UDW)then{ _asd = _asd + " + if!(_ctrlIDD in _allowedIDDs)then + { + _index = _announceDisplayIddOnce pushBackUnique _ctrlIDD; + if(_index > -1)then + { + _displayParent = displayParent _x; + _log = format[ + 'Not Allowed Display with idd: %1, parent idd: %2, texts: %3', + _ctrlIDD, ctrlIDD _displayParent, call _fn_get_texts + ]; + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + }; + call _fnc_closedisplay; + }; + "; }; _asd = _asd + " + + if(!isNull _display)then + { + { + _control = _x; + _checkifIn = format['%1%2',_display,_control]; + _index = _checked pushBackUnique _checkifIn; + if(_index > -1)then + { + _controltype = ctrlType _control; + if(_controltype isEqualTo 5)then + { + _size = lbSize _control; + if(_size > 0)then + { + for '_i' from 0 to (_size-1) do + { + _lbtxt = _control lbText _i; + _txtfilter = toArray _lbtxt; + _txtfilter = _txtfilter - [94]; + _txtfilter = _txtfilter - [96]; + _txtfilter = _txtfilter - [180]; + _txtclean = toString _txtfilter; + _lowerlbtxt = toLower _txtclean; + { + if(_lowerlbtxt find _x > -1)then + { + _log = format['BadlbText: [%1] on %2 %3 - %4',_x,_display,_control,_lbtxt]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + }; + }; + } + else + { + if(_controltype isEqualTo 12)then + { + _curTV = tvCurSel _control; + _tvtxt = _control tvText _curTV; + _txtfilter = toArray _tvtxt; + _txtfilter = _txtfilter - [94]; + _txtfilter = _txtfilter - [96]; + _txtfilter = _txtfilter - [180]; + _txtclean = toString _txtfilter; + _lowertvtxt = toLower _txtclean; + { + if(_lowertvtxt find _x > -1)then + { + _log = format['BadtvText: [%1] on %2 %3 - %4',_x,_display,_control,_tvtxt]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + } + else + { + if!(_controltype in [3,4,8,9,15,42,81,101,102])then + { + _ctrlTxt = ctrlText _control; + _txtfilter = toArray _ctrlTxt; + _txtfilter = _txtfilter - [94]; + _txtfilter = _txtfilter - [96]; + _txtfilter = _txtfilter - [180]; + _txtclean = toString _txtfilter; + _lowerctrlTxt = toLower _txtclean; + { + if(_lowerctrlTxt find _x > -1)then + { + _log = format['BadCtrlText: [%1] on %2 %3 - %4',_x,_display,_control,_ctrlTxt]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + }; + }; + }; + }; + } forEach (allControls _display); + }; + }; + } forEach allDisplays; +"; if(_check_Notifications)then{ _asd = _asd + " + if(!isNil 'BIS_fnc_showNotification_queue')then + { + if(typeName BIS_fnc_showNotification_queue isEqualTo 'ARRAY')then + { + { + if(!isNil'_x')then + { + if(typeName _x isEqualTo 'ARRAY')then + { + { + _array = nil; + _array = _x select 9; + if(!isNil'_array')then + { + { + if!(_x isEqualTo '')then + { + _log = format['Hacked: showNotification - %1',_x]; + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + BIS_fnc_showNotification_queue = []; + }; + } forEach _array; + }; + } forEach _x; + }; + }; + } forEach BIS_fnc_showNotification_queue; + } + else + { + _log = format['Hacked: showNotification type changed to %1',typeName BIS_fnc_showNotification_queue,BIS_fnc_showNotification_queue]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; +"; }; _asd = _asd + " + _uiNamespace_dynamicText = uiNamespace getVariable 'BIS_dynamicText'; + if(!isNil '_uiNamespace_dynamicText')then + { + _allCtrls = allControls _uiNamespace_dynamicText; + _whiteListed = ['','Debug Mode Enabled']; + { _whiteListed pushBack (_x call fnc_get_exileObjName); } forEach allPlayers; + { + _ctrl = _x; + _txt = ctrlText _ctrl; + if(_txt != _lastText)then + { + if!(_txt in _whiteListed)then + { + _lastText = _txt; + _ltxt = toLower _txt; + { + if(_ltxt find _x != -1)then + { + _log = format['BadText on %1: %2 - %3',_ctrl,_x,_txt]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _verybadStrings; + }; + }; + } forEach _allCtrls; + }; + +"; if(_CMC)then{ _asd = _asd + " + _cmdm = commandingMenu; + if!(_cmdm isEqualTo '')then + { + _cmdm = toLower _cmdm; + if(_cmdm in _find1)then + { + showCommandingMenu ''; + } + else + { + if!(_cmdm in _find2)then + { + if(_cmdm select [0,6] isEqualTo '#user:')then + { + _log = format['BadCommandingMenu: %1',_cmdm]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + (findDisplay 46)closeDisplay 0; + } + else + { + showCommandingMenu ''; + systemChat format[' commandingMenu: %1 - not Allowed. Please ask your Servers Admin for more Information..!',_cmdm]; + }; + }; + }; + "; if(_KCM)then{ _asd = _asd + " + showCommandingMenu ''; + "; }; _asd = _asd + " + }; +"; }else{ _asd = _asd + " + "; if(_KCM)then{ _asd = _asd + " + showCommandingMenu ''; + "; }; _asd = _asd + " +"; }; _asd = _asd + " +"; if(_CMM)then{ _asd = _asd + " + if(!isNull (findDisplay 12))then + { + _mapctrl = (findDisplay 12) displayCtrl 1001; + _lsize = lbSize _mapctrl; + if(_lsize > "+str _maxMapMenuEntries+")then + { + if(!_mapMenuLogged)then + { + _mapMenuLogged = true; + + _texts = []; + for '_i' from 0 to (_lsize-1) do + { + _lbtxt = _mapctrl lbText _i; + _texts pushBack _lbtxt; + }; + _log = format['Map Menu has been changed %1 entries found - Texts: %2',_lsize,_texts]; + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + }; + for '_i' from ("+str _maxMapMenuEntries+")+1 to _lsize do + { + _mapctrl lbDelete _i; + }; + }; + }; +"; }; _asd = _asd + " + if(isNull player)then{(findDisplay 46)closeDisplay 0;}; + uiSleep .45; +}; + + +if(_isNormal)then{ +"; if(_wall_glitch_object)then{ _asd = _asd + " +_bigInputArray pushBack [ +[_name,_uid,_AHKickOFF,_AHKickLog], +{ +scriptName ""ANTI GLITCH""; +_name = _this select 0; +_puid = _this select 1; +_AHKickOFF = _this select 2; +_AHKickLog = _this select 3; + +_lastglitch = time; +_count_glitches = 0; +"; if(_wall_glitch_revert)then{ _asd = _asd + " +_last_no_glitch_pos = player modelToWorldVisual [0,0,0]; +_last_no_glitch_vectorDir = vectorDir player; +_last_no_glitch_vectorUp = vectorUp player; +"; }; _asd = _asd + " +_blackedOut = false; + +_fn_punish_glitch = { + "; if(_wall_glitch_revert)then{ _asd = _asd + " + "; if(_UAT)then{ _asd = _asd + " + if(player distance _last_no_glitch_pos < 7)then{ + "; }; _asd = _asd + " + player setPos _last_no_glitch_pos; + "; if(_UAT)then{ _asd = _asd + " + }; + "; }; _asd = _asd + " + player setVectorDirAndUp [_last_no_glitch_vectorDir,_last_no_glitch_vectorUp]; + player setVelocity [0,0,0]; + "; }; _asd = _asd + " + + _timedif = time - _lastglitch; + if(_timedif > 1)then{ _count_glitches = _count_glitches + 1; }; + if(_timedif > 5 && _count_glitches > 3)then + { + _lastglitch = time; + _count_glitches = 0; + _log = format['ATTEMPTED WALL GLITCH (intersects) - %1 @%2 %3',_type,mapGridPosition _x,position _x]; + + "; if(_wall_glitch_punish isEqualTo 0)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog; + "; }; _asd = _asd + " + + "; if(_wall_glitch_punish isEqualTo 1)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog; + [player,60] call fnc_infiSTAR_setUncon; + "; }; _asd = _asd + " + + "; if(_wall_glitch_punish isEqualTo 2)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log),[2,player]] call _AHKickLog; + "; }; _asd = _asd + " + + "; if(_wall_glitch_punish isEqualTo 3)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log),[3,player,clientOwner]] call _AHKickLog; + "; }; _asd = _asd + " + + "; if(_wall_glitch_punish isEqualTo 4)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log),[4]] call _AHKickLog; + "; }; _asd = _asd + " + + "; if(_wall_glitch_punish isEqualTo 5)then{ _asd = _asd + " + [_name,_puid,'SLOG_GLITCH',toArray(_log),[5]] call _AHKickLog; + "; }; _asd = _asd + " + }; +}; +_fn_checkWallGlitch = { + { + _lineIntersectsObjs = lineIntersectsObjs [_x select 0, _x select 1]; + { + if(_x getVariable ['ExileBreaching',false])exitWith{true}; + + _type = typeOf _x; + if((_x isKindOf 'Exile_Construction_Abstract_Static') && !(_type in ['Exile_Construction_ConcreteStairs_Static','Exile_Construction_WoodStairs_Static']))exitWith + { + _goodpos = false; + call _fn_punish_glitch; + breakTo 'MAIN'; + }; + } forEach _lineIntersectsObjs; + } forEach _this; +}; +_fnc_wall_glitch_object = { + scopeName 'MAIN'; + _goodpos = true; + + _head = player selectionPosition 'head'; + _head_left = AGLToASL (player modelToWorldVisual [(_head select 0)-0.2, (_head select 1), (_head select 2)+0.1]); + _head_right = AGLToASL (player modelToWorldVisual [(_head select 0)+0.05, (_head select 1), (_head select 2)+0.1]); + _legs = player selectionPosition 'legs'; + _legs_left = AGLToASL (player modelToWorldVisual [(_legs select 0)-0.25, (_legs select 1), (_legs select 2)]); + _legs_right = AGLToASL (player modelToWorldVisual [(_legs select 0)+0.05, (_legs select 1), (_legs select 2)]); + [ + [_head_left, _head_right], + [_legs_left, _legs_right], + [_head_left, _legs_left], + [_head_right, _legs_right] + ] call _fn_checkWallGlitch; + + + if(_goodpos)then + { + _head_back_left = AGLToASL (player modelToWorldVisual [(_head select 0)-0.2, (_head select 1)-0.18, (_head select 2)+0.1]); + _head_back_right = AGLToASL (player modelToWorldVisual [(_head select 0)+0.1, (_head select 1)-0.18, (_head select 2)+0.1]); + _head_front_left = AGLToASL (player modelToWorldVisual [(_head select 0)-0.2, (_head select 1)+0.1, (_head select 2)+0.1]); + _head_front_right = AGLToASL (player modelToWorldVisual [(_head select 0)+0.1, (_head select 1)+0.1, (_head select 2)+0.1]); + [ + [_head_back_left, _head_back_right], + [_head_front_left, _head_front_right] + ] call _fn_checkWallGlitch; + }; + + + _lineIntersectsObjs = lineIntersectsObjs [eyePos player, AGLToASL positionCameraToWorld [0,0,-0.1]]; + { + if(_x getVariable ['ExileBreaching',false])exitWith{true}; + + _type = typeOf _x; + if((_x isKindOf 'Exile_Construction_Abstract_Static') && !(_type in ['Exile_Construction_ConcreteStairs_Static','Exile_Construction_WoodStairs_Static']))exitWith + { + _goodPos = false; + if!(cameraView isEqualTo 'INTERNAL')then{ cameraOn switchCamera 'INTERNAL'; }; + if(freeLook)then{ _blackedOut = true;TitleText ['!!!\n!!! DO NOT LOOK THROUGH WALLS !!!\n!!!','BLACK FADED']; }; + breakTo 'MAIN'; + }; + } forEach _lineIntersectsObjs; + + if(_goodpos)then + { + if(_blackedOut)then{ _blackedOut = false;TitleText ['','PLAIN DOWN']; }; + "; if(_wall_glitch_revert)then{ _asd = _asd + " + _curpos = player modelToWorldVisual [0,0,0]; + if(_curpos distance _last_no_glitch_pos > 0.3)then + { + if(isTouchingGround player && alive player && _curpos select 2 < 1)then + { + _nearestObjects = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], 2.8]; + if(_nearestObjects isEqualTo [])then + { + _last_no_glitch_pos = _curpos; + _last_no_glitch_vectorDir = vectorDir player; + _last_no_glitch_vectorUp = vectorUp player; + }; + }; + }; + "; }; _asd = _asd + " + }; +}; +while{true}do{ + if(call fnc_check_if_enemy_base)then{ if(isNull ExileCurrentBreachingObject)then{call _fnc_wall_glitch_object;}; } else { uiSleep 0.5; }; + uiSleep 0.1; +}; +} +]; +"; }; _asd = _asd + " + + + + + + +"; if(_UAT)then{ _asd = _asd + " +_bigInputArray pushBack [ + [_name,_uid,_AHKickOFF,_AHKickLog], + { + scriptName ""ATP ""; + params ['_name','_puid','_AHKickOFF','_AHKickLog']; + private ['_wasLocal','_playerObject','_object','_oldObject','_class','_oldClass','_curPos','_oldPos', + '_timeDiff','_lastTime','_speedCalc','_maxSpeedCalc','_maxSpeed','_tpCounter','_allowedD', + '_ropeAttachedToObj','_exitHere','_allowedTeleport','_markerType','_velocity', + '_distance','_AHpos','_timer']; + + + _allowedTeleport = "+str _allowTPcfg+"; + { + _markerType = markerType _x; + if(_markerType in ['ExileTraderZone','ExileTraderZoneIcon','ExileBoatTraderIcon'])then + { + _allowedTeleport pushBack [markerPos _x,225]; + }; + } forEach allMapMarkers; + _fn_checkTp = { + if(vehicleCargoEnabled (isVehicleCargo _object))exitWith{false}; + if(isNull objectParent player && {(velocity _object select 2) < -6})exitWith{false}; + + _exitHere = false; + _ropeAttachedToObj = ropeAttachedTo _object; + if(!isNull _ropeAttachedToObj)then + { + if(isPlayer (driver _ropeAttachedToObj))then + { + _exitHere = true; + } + else + { + {ropeDestroy _x;} forEach (ropes _ropeAttachedToObj); + {ropeDestroy _x;} forEach (ropes _object); + diag_log ' Ropes cut!'; + }; + }; + if(_exitHere)exitWith{false}; + + { + _x params[['_mpos',[0,0,0]],['_msize',250]]; + if((_curPos distance2D _mpos < _msize)&&(_oldPos distance2D _mpos < _msize))exitWith{_exitHere = true;}; + } forEach _allowedTeleport; + if(_exitHere)exitWith{false}; + + true + }; + _fn_revertTP = { + _tpCounter = _tpCounter + 1; + + _vel = velocity _this; + _this setVelocity [0,0,0]; + _this setPosASL (AGLToASL _oldPos); + _vel = _vel vectorMultiply 0.9; + _this setVelocity _vel; + + if!(_oldClass isKindOf 'Steerable_Parachute_F')then + { + _log = format[ + '%1%2 moved %3m in %4s from %5 %6 to %7 %8 at a speed of %9/%10. NetId: %11, LocalObj: %12, VisibleMap: %13, TpCounter: %14', + _class, + if(_oldClass isEqualTo _class)then{''}else{(' (was '+str _oldClass+' before)')}, + ceil _distance, + _timeDiff, + mapGridPosition _oldPos, + [round(_oldPos select 0),round(_oldPos select 1),round(_oldPos select 2)], + mapGridPosition _curPos, + [round(_curPos select 0),round(_curPos select 1),round(_curPos select 2)], + _speedCalc, + _maxSpeed, + netId _object, + local _object, + visibleMap, + _tpCounter + ]; + [_name,_puid,'ANTI_TP',toArray(_log)] call _AHKickLog; + }; + + _curPos = _oldPos; + }; + _fn_checkStartAntiTP = { getClientStateNumber >= 10 && !isNull findDisplay 46 && {alive player} && {getPlayerUID player != ''} && {typeOf player isEqualTo 'Exile_Unit_Player'} }; + _fn_startAntiTp = { + if((getNumber(configFile >> 'CfgSettings' >> 'BambiSettings' >> 'parachuteSpawning')) isEqualTo 1)then + { + _timeOut = diag_tickTime + 15; + waitUntil { (diag_tickTime > _timeOut || (vehicle player) isKindOf 'ParachuteBase') && call _fn_checkStartAntiTP }; + } else { + waitUntil { call _fn_checkStartAntiTP }; + }; + + _timeOut = diag_tickTime + 3; + waitUntil {diag_tickTime > _timeOut && call _fn_checkStartAntiTP}; + + _wasLocal = false; + _playerObject = player; + _object = vehicle player; + _class = typeOf _object; + _curPos = getPos _object; + _lastTime = diag_tickTime; + _tpCounter = 0; + _maxSpeedCalc = 20; + player setVariable ['"+_AHpos+"',[0,0,0]]; + }; + call _fn_startAntiTp; + while {true} do + { + _oldObject = _object; + _oldPos = _curPos; + + _object = vehicle player; + _curPos = getPos _object; + + _AHpos = player getVariable ['"+_AHpos+"',[0,0,0]]; + player setVariable ['"+_AHpos+"',[0,0,0]]; + if(_AHpos isEqualType [])then + { + if(_AHpos isEqualTo [0,0,0])then + { + if(local _object && _oldObject isEqualTo _object)then + { + if(_wasLocal)then + { + _distance = _oldPos distance2D _curPos; + if(_distance > 8)then { + _timeDiff = (diag_tickTime - _lastTime) max 0.2; + _speedCalc = round((_distance / _timeDiff)*3.6); + + _oldClass = _class; + _class = typeOf _object; + + _maxSpeed = getNumber(configfile >> 'CfgVehicles' >> _class >> 'maxSpeed') max 25; + _maxSpeedCalc = (if(diag_fps > 20)then{_maxSpeed * 2}else{_maxSpeed * 3.5}) max _maxSpeedCalc; + + if(_speedCalc > _maxSpeedCalc)then { + if(player isEqualTo _playerObject && alive _playerObject)then { + if(call _fn_checkTp)then { + _object call _fn_revertTP; + }; + } else { + call _fn_startAntiTp; + }; + }; + }; + }; + _wasLocal = true; + } else { + _wasLocal = false; + }; + } else { + [_name,_puid,'ADMINTP',netId player,_AHpos,_oldPos,player getVariable ['randomstring','']] call _AHKickLog; + if(local _object)then{_object setPosATL _AHpos;}else{player setPosATL _AHpos;}; + _curPos = _AHpos; + }; + } else { + _log = format['Admin Teleport Variable highjacked! [%1]-[%2]',_AHpos,typename _AHpos]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + + _lastTime = diag_tickTime; + uiSleep 0.2; + }; + } +]; +"; }; _asd = _asd + " +_bigInputArray pushBack [ + [_name,_uid,_AHKickOFF,_AHKickLog,_badIDDsToKick,_badIDDsToClose,_allowedIDDs,_admin,_iddchecks], + { + params ['_name','_puid','_AHKickOFF','_AHKickLog','_badIDDsToKick','_badIDDsToClose','_allowedIDDs','_admin','_iddchecks']; + disableSerialization; + "; if(_UDW)then{ _asd = _asd + " + if(_admin)then{_allowedIDDs pushBackUnique -1341;}; +"; if(_task_force_radio)then{ _asd = _asd + " + _allowedIDDs pushBackUnique 6000; +"; }; _asd = _asd + " + + _announceDisplayIddOnce = []; + "; }; _asd = _asd + " + _verybadStrings = "+str _verybadStrings+"; + _checked = ['Display #24Control #101','Display #-1340Control #1401']; + _lastEmpty = 0; + {uiNamespace setVariable [_x,nil];} forEach ['RscDisplayRemoteMissions','RscDisplayDebugPublic','RscDisplayMovieInterrupt','RscDisplayArsenal']; + "; if(_CMC)then{ _asd = _asd + " + _find1 = ['#user:bis_fnc_addcommmenuitem_menu','#user:bis_menu_groupcommunication']; + _find2tmp = "+str _allowedCommandingMenus+"; + _find2 = [];{_find2 pushBackUnique (toLower _x);} forEach _find2tmp; + "; }; _asd = _asd + " + _lastText = ''; + _fn_get_texts = { + _txtstmp = []; + + { + _control = _x; + _controltype = ctrlType _control; + + if(_controltype isEqualTo 5)then { + _size = lbSize _control; + if(_size > 0)then { + for '_i' from 0 to (_size-1) do { + _lbtxt = _control lbText _i; + if!(_lbtxt isEqualTo '')then{ _txtstmp pushBack format['%1: %2',ctrlIDC _control,_lbtxt]; }; + }; + }; + } else { + if(_controltype isEqualTo 12)then { + _curTV = tvCurSel _control; + _tvtxt = _control tvText _curTV; + if!(_tvtxt isEqualTo '')then{ _txtstmp pushBack format['%1: %2',ctrlIDC _control,_tvtxt]; }; + } else { + if!(_controltype in [3,4,8,9,15,42,81,101,102])then { + _ctrlTxt = ctrlText _control; + if!(_ctrlTxt isEqualTo '')then{ _txtstmp pushBack format['%1: %2',ctrlIDC _control,_ctrlTxt]; }; + }; + }; + }; + } forEach (allControls _display); + _txtstmp + }; + _fnc_closedisplay = { + if!(ctrlIDD _displayParent isEqualTo 46)then + { + for '_i' from 0 to 3 do + { + _displayParent closeDisplay 0; + _displayParent closeDisplay _i; + }; + }; + + { + _ctrlIDC = ctrlIDC _x; + closeDialog _ctrlIDC; + } forEach (allControls(findDisplay _ctrlIDD)); + (findDisplay _ctrlIDD) closeDisplay 0; + _display closeDisplay 0; + closeDialog 0;closeDialog 0;closeDialog 0; + for '_i' from 0 to 3 do{closeDialog 0;closeDialog 1;closeDialog 2;}; + }; + _wasclosed = false; + _mapMenuLogged = false; + while{true}do{call _iddchecks;}; + } +]; +_bigInputArray pushBack [ + [_name,_uid,_AHKickOFF,_AHKickLog], + { + _name = _this select 0; + _puid = _this select 1; + _AHKickOFF = _this select 2; + _AHKickLog = _this select 3; + _random = round(random 9999); + _randvar3 = format['test%1',_random]; + while{true}do + { + _veh = vehicle player; + if(alive player)then + { + _type = typeOf player; + if!(_type isEqualTo 'Exile_Unit_GhostPlayer')then + { + _netId = netId player; + if!(_netId select [0,2] isEqualTo '2:')then + { + _log = format['Not Local PlayerObject (C): %1 with netId %2 @%3',typeOf player,_netId,getPos player]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + if(isNull objectParent player)then + { + "; if(_CHECK_RECOIL)then{ _asd = _asd + " + _curecoil = unitRecoilCoefficient player; + if!(_curecoil isEqualTo 1)then + { + _log = format['BadRecoil %1 | %2 %3',_curecoil,_type,currentWeapon player]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + "; }; _asd = _asd + " + } + else + { + "; if(_CHECK_RECOIL)then{ _asd = _asd + " + _curecoil = unitRecoilCoefficient player; + if!(_curecoil isEqualTo 1)then + { + _log = format['BadRecoil %1 | %2 %3 %4',_curecoil,_type,typeOf _veh,currentWeapon player]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + "; }; _asd = _asd + " + + _netId = netId _veh; + if(_netId isEqualTo '0:0')then + { + _type = typeOf _veh; + _log = format['LocalVehicle: %1 with netId 0:0 @%2',_type,getPosATL _veh]; + deleteVehicle _veh; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + + _ropeAttachedObjects = ropeAttachedObjects _veh; + if!(_ropeAttachedObjects isEqualTo [])then + { + { + _attachedObject = _x; + if(!isNull _attachedObject)then + { + _fn_cutRopes = {{ropeDestroy _x;} forEach (ropes _veh);{ropeDestroy _x;} forEach (ropes _attachedObject);}; + if((locked _attachedObject) isEqualTo 2)exitWith + { + call _fn_cutRopes; + ['ErrorTitleAndText',['infiSTAR','You can not SlingLoad / Rope Attach a locked vehicle!']] call ExileClient_gui_toaster_addTemplateToast; + }; + if(!ropeAttachEnabled _attachedObject)exitWith + { + call _fn_cutRopes; + ['ErrorTitleAndText',['infiSTAR','You can not SlingLoad / Rope Attach this vehicle!']] call ExileClient_gui_toaster_addTemplateToast; + }; + "; if(_slingload_check)then{ _asd = _asd + " + if!((crew _attachedObject) isEqualTo [])exitWith + { + call _fn_cutRopes; + ['ErrorTitleAndText',['infiSTAR','You can not SlingLoad / Rope Attach a vehicle with a crew!']] call ExileClient_gui_toaster_addTemplateToast; + }; + "; }; _asd = _asd + " + }; + } forEach _ropeAttachedObjects; + }; + }; + }; +"; if(_attach_to_check)then{ _asd = _asd + " + _closeveh = [_veh]; + _closeveh append (_veh nearEntities ['AllVehicles',100]); + { + if(!isNull _x)then + { + _xobj = _x; + if(!isNull _xobj)then + { + _attcheXdobjects = attachedObjects _xobj; + if!(_attcheXdobjects isEqualTo [])then + { + _cntQd = {(toLower (typeOf _x)) find 'quad' > -1} count _attcheXdobjects; + if(_cntQd > 5)then + { + detach _xobj; + {detach _x;} forEach _attcheXdobjects; + if(_xobj isEqualTo _veh)then + { + _log = format['x attached to vehicle player: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + } + else + { + _log = format['Attached Objects found: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position _xobj,mapGridPosition _xobj]; + [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog; + }; + }; + if(player in _attcheXdobjects)then + { + detach _veh; + _log = format['player attached to x: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + }; + }; + } forEach _closeveh; +"; }; _asd = _asd + " +"; if(_UFI||_UIW)then{ _asd = _asd + " + _inventory = []; + {_inventory pushBack _x;} forEach (assignedItems player); + {_inventory pushBack _x;} forEach (magazines player); + {_inventory pushBack _x;} forEach (weapons player); + {_inventory pushBack _x;} forEach (primaryWeaponItems player); + {_inventory pushBack _x;} forEach (secondaryWeaponItems player); + {_inventory pushBack _x;} forEach (handgunItems player); + _inventory pushBack (primaryWeapon player); + _inventory pushBack (secondaryWeapon player); + _inventory pushBack (handgunWeapon player); + _inventory pushBack (uniform player); + _inventory pushBack (vest player); + _inventory pushBack (backpack player); + _inventory pushBack (headgear player); + _inventory pushBack (goggles player); + _inventory = _inventory - ['']; + if!(_inventory isEqualTo [])then + { + _fnRemoveItem = { + player removeItem _x; + player removeWeapon _x; + player removeMagazine _x; + if((uniform player) == _x)then{removeUniform player;}; + if((vest player) == _x)then{removeVest player;}; + if((backpack player) == _x)then{removeBackpackGlobal player;}; + if((headgear player) == _x)then{removeHeadgear player;}; + if((goggles player) == _x)then{removeGoggles player;}; + player removePrimaryWeaponItem _x; + player removeSecondaryWeaponItem _x; + player removeHandgunItem _x; + player unlinkItem _x; + + _log = format['BadItem: %1 (might have been from an admin!)',_x]; + "; if(_KICK_ON_DETECTION)then{ _asd = _asd + " + [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog; + "; }else{ _asd = _asd + " + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + "; }; _asd = _asd + " + }; + + + { + if(_x in "+str _ForbiddenItems+")then + { + call _fnRemoveItem; + "; if(_KICK_ON_DETECTION)then{ _asd = _asd + " + } + else + { + if!(_x in "+str _ItemWhiteList+")then + { + call _fnRemoveItem; + }; + "; }; _asd = _asd + " + }; + } forEach _inventory; + }; +"; }; _asd = _asd + " + if((groupIconsVisible isEqualTo [true,false])||(groupIconsVisible isEqualTo [false,true]))then + { + _log = format['ESP/MAP-HACK (groupIcons): %1',groupIconsVisible]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + if!((str _randvar3) isEqualTo (str ('test'+str _random)))then + { + _log = format['_randvar3 has been changed to %1',_randvar3]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + uiSleep 10; + }; + } +]; +}; + + + +"; if!(_HTML_LOAD_URL isEqualTo '')then{ _asd = _asd + " +_bigInputArray pushBack [ + { + disableSerialization; + _display49 = findDisplay 49; + if(!isNull _display49)then + { + HTML_LOAD_URL3 = "+str _HTML_LOAD_URL+"; + if((_display49 displayCtrl 3307182) isEqualTo controlNull)then + { + [ + '', + { + if(!isNil'START_LOADING_ESCHTML')then{terminate START_LOADING_ESCHTML;START_LOADING_ESCHTML=nil;}; + START_LOADING_ESCHTML = [] spawn { + disableSerialization; + _html = (findDisplay 49) ctrlCreate ['RscHTML', 3307182]; + _html ctrlSetBackgroundColor [0,0,0,0.3]; + _html ctrlSetPosition [ + safeZoneX, + safeZoneY, + safeZoneW, + safeZoneH/3 + ]; + _html ctrlCommit 0; + _html htmlLoad HTML_LOAD_URL3; + }; + } + ] execFSM 'call.fsm'; + }; + }; + }, + { + [0.2, _this, [], true] call ExileClient_system_thread_addTask; + } +]; +"; }; _asd = _asd + " + + +"; if(_ENABLE_NOTIFICATION_MESSAGES)then{ _asd = _asd + " +_bigInputArray pushBack [ + { + [] spawn { + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46 && {!((getPlayerUID player) isEqualTo '')} && {!isNil 'ExileSystemThreadSleep'}}; + uiSleep 1; + + ctrlDelete ((findDisplay 46) displayCtrl 117997); + (findDisplay 46) ctrlCreate['RscStructuredText', 117997]; + NOTIFICATION_COOLDOWN_TIME = 0; + + _code = + { + _ctrl = (findDisplay 46) displayCtrl 117997; + _ctrlFade = ctrlFade _ctrl; + if(NOTIFY_MSG_ARRAY isEqualTo [])then + { + if(time > NOTIFICATION_COOLDOWN_TIME)then + { + if(_ctrlFade isEqualTo 0)then + { + _ctrl ctrlsetFade 1; + _ctrl ctrlCommit 1; + } + else + { + if(_ctrlFade isEqualTo 1)then + { + ctrlDelete ((findDisplay 46) displayCtrl 117997); + if(!isNil'msgthreadid')then{[msgthreadid] call ExileClient_system_thread_removeTask;msgthreadid=nil;}; + }; + }; + }; + } + else + { + { + private _input = _x; + if(time > NOTIFICATION_COOLDOWN_TIME)then + { + if(_ctrlFade isEqualTo 0)then + { + _ctrl ctrlsetFade 1; + _ctrl ctrlCommit 1; + } + else + { + if(_ctrlFade isEqualTo 1)then + { + if!(_input isEqualTo [])then + { + private _first = _input param [0, -1, [0]]; + if(time > _first)then + { + if((time > _first)||(_first < 0))then + { + private _replay = _input param [1, -1, [0]]; + private _delay = _input param [2, 4, [0]]; + NOTIFICATION_COOLDOWN_TIME = time + _delay; + if(_replay < 0)then{NOTIFY_MSG_ARRAY set[_forEachIndex,[]];}else{_input set[0,_replay + time];NOTIFY_MSG_ARRAY set[_forEachIndex,_input];}; + + if(!isStreamFriendlyUIEnabled)then + { + if((count _input) isEqualTo 4)then + { + private _text = _input param [3, '', ['']]; + systemChat _text; + } + else + { + private _fsize = _input param [3, 0.6, [0]]; + private _xpos = _input param [4, 0, [0,'']]; + private _ypos = _input param [5, 0, [0,'']]; + private _fcolor = _input param [6, '#ff0000', ['']]; + private _font = _input param [7, 'OrbitronMedium', ['']]; + private _text = _input param [8, '', ['']]; + + + _xpos = _xpos call BIS_fnc_parseNumber;_xpos = _xpos max safeZoneX;_xpos = _xpos min 1; + _ypos = _ypos call BIS_fnc_parseNumber;_ypos = _ypos max safeZoneY;_ypos = _ypos min 1; + _ctrl ctrlSetPosition [_xpos,_ypos,0.35,0.35]; + _ctrl ctrlSetScale 2; + _ctrl ctrlCommit 0; + _ctrl ctrlSetStructuredText parseText format['%4',_fsize,_fcolor,_font,_text]; + + _ctrl ctrlsetFade 0; + _ctrl ctrlCommit 1.5; + }; + }; + }; + }; + }; + }; + }; + }; + } forEach NOTIFY_MSG_ARRAY; + }; + NOTIFY_MSG_ARRAY = NOTIFY_MSG_ARRAY - [[]]; + }; + if(!isNil'msgthreadid')then{[msgthreadid] call ExileClient_system_thread_removeTask;msgthreadid=nil;}; + msgthreadid = [0.3, _code, [], true] call ExileClient_system_thread_addtask; + }; + }, + { + call _this + } +]; +"; }; _asd = _asd + " + + +"; if(_experimental_dupe_check)then{ _asd = _asd + " +_bigInputArray pushBack [ + [_name,_uid,_AHKickLog], + { + params[['_name',''],['_uid',''],['_AHKickLog',{}]]; + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46 && {alive player}}; + _objects = []; + _ALL_container = []; + _containercount = -1; + _lastcontainercount = -1; + while{true}do + { + _lastObjects = _objects; + _objects = nearestObjects [player, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated','Exile_Unit_Player','LandVehicle','Ship','Air','Tank'],20]; + {{_objects pushBackUnique _x;} forEach (crew _x);} forEach _objects; + if(_lastObjects isEqualTo _objects)then + { + _lastcontainer = _ALL_container; + _lastcontainercount = _containercount; + _ALL_container = []; + { + if(!isNull _x)then + { + _object = _x; + _containers = backpackCargo _object; + if(!isNil '_containers')then + { + if(_containers isEqualTo [])then + { + _backpack = backpack _object; + if!(_backpack isEqualTo '')then + { + _ALL_container pushBack _backpack; + }; + } + else + { + _ALL_container append _containers; + }; + }; + }; + } forEach _objects; + + _containercount = count _ALL_container; + if((_containercount > _lastcontainercount) && (_lastcontainercount > -1))then + { + _types_and_count__old = []; + { + _type = _x; + _typecount = {_x isEqualTo _type} count _lastcontainer; + _types_and_count__old pushBackUnique [_type,_typecount]; + } forEach _lastcontainer; + + _types_and_count = []; + { + _type = _x; + _typecount = {_x isEqualTo _type} count _ALL_container; + _types_and_count pushBackUnique [_type,_typecount]; + } forEach _ALL_container; + + _foundAdded = []; + { + if!(_x in _types_and_count__old)then + { + if(_x select 1 > 2)then + { + _foundAdded pushBack _x; + }; + }; + } forEach _types_and_count; + + if!(_foundAdded isEqualTo [])then + { + [_name,_uid,'EXPERIMENTAL_DUPE_CHECK',toArray(str _foundAdded)] call _AHKickLog; + }; + }; + } + else + { + _containercount = -1; + _lastcontainercount = -1; + }; + uiSleep 0.5; + }; + } +]; +"; }; _asd = _asd + " + + +"; if(_useObjectVariableCheck)then{ _asd = _asd + " +_bigInputArray pushBack [ + [_name,_uid,_AHKickLog,_AHKickOFF], + { + params[['_name',''],['_puid',''],['_AHKickLog',{(findDisplay 46)closeDisplay 0;}],['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}]]; + _allowedobjvars = ['exilelastlootrequestedat','exilelootspawnedat','exilehasloot','exilelootweaponholdernetids']; + _posbuildings = [worldSize/2,worldSize/2]; + _buildings = []; + _fn_checkobjvars = { + if!(_buildings isEqualTo [])then + { + { + _obj = _x; + if(!isNull _obj)then + { + { + _x params ['_varname','_defaultvalue']; + _varvalue = _obj getVariable _varname; + if(!isNil'_varvalue')then + { + if(_varvalue isEqualType _defaultvalue)then + { + if(_varvalue isEqualType 0)then + { + if(_varvalue > time || _varvalue < 0)then + { + _log = format['Variable [%1] on object [%2] has been modified: bad value.. %3', _varname, _obj, _varvalue]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + if(_varvalue isEqualType '')then + { + if(count _varvalue > 30)then + { + _log = format['Variable [%1] on object [%2] has been modified: bad value.. %3', _varname, _obj, _varvalue]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + } + else + { + _log = format['Variable [%1] on object [%2] has been modified: [%3] should be [%4]', _varname, _obj, typeName _varvalue, typeName _defaultvalue]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; + } forEach [ + ['ExileLastLootRequestedAt',0], + ['ExileLootSpawnedAt',0], + ['ExileHasLoot',false], + ['ExileLootWeaponHolderNetIDs',''] + ]; + + + { + _varname = _x; + _varvalue = _obj getVariable _varname; + if(!isNil '_varvalue')then + { + _index = _allowedobjvars pushBackUnique _varname; + if(_index > -1)then + { + _log = format['Variable [%1] on object [%2] is not known to the antihack! Value: [%3]', _varname, _obj, _varvalue]; + [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog; + "; if(!(_findObjectVar isEqualTo [])||!(_findObjectVarContent isEqualTo []))then{ _asd = _asd + " + } + else + { + "; if!(_findObjectVar isEqualTo [])then{ _asd = _asd + " + _lowvarname = toLower _varname; + { + if(_lowvarname find _x != -1)then + { + _log = format['BadVariable on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_varname,_x,_varvalue]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _findObjectVar+"; + "; }; _asd = _asd + " + "; if!(_findObjectVarContent isEqualTo [])then{ _asd = _asd + " + _lowvarvalue = toLower(str(_varvalue)); + { + if(_lowvarvalue find _x != -1)then + { + _log = format['BadVariableContent on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_varname,_x,_varvalue]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach "+str _findObjectVarContent+"; + "; }; _asd = _asd + " + "; }; _asd = _asd + " + }; + }; + } forEach (allVariables _obj); + }; + _buildings set[_forEachIndex,objNull]; + } forEach _buildings; + _buildings = _buildings - [objNull]; + }; + }; + _starttime = diag_tickTime + 45; + while {true} do + { + if(diag_tickTime > _starttime)then + { + if(_buildings isEqualTo [])then{_buildings = _posbuildings nearObjects ['Building',worldSize];}; + call _fn_checkobjvars; + _starttime = diag_tickTime + 85; + }; + uiSleep 15; + }; + } +]; +"; }; _asd = _asd + " + + +_server_classes = []; +"; if(_checkCfgPatches)then{ _asd = _asd + " +if(isNil'i_server_classes')then +{ + _cfgPatches = 'true' configClasses (configfile >> 'CfgPatches'); + { + _array = []; + _cfgName = configName _x; + _cur_url = getText(configfile >> 'CfgPatches' >> _cfgName >> 'url'); + _cur_requiredAddons = getText(configfile >> 'CfgPatches' >> _cfgName >> 'requiredAddons'); + if(!(_cur_url isEqualTo '') && !(_cur_requiredAddons isEqualTo ''))then + { + _array pushBack _cur_url; + _array pushBack _cur_requiredAddons; + _array pushBack (count(configProperties [configfile >> 'CfgPatches' >> _cfgName])); + _server_classes pushBack [_cfgName, _array]; + }; + } forEach _cfgPatches; + i_server_classes = compileFinal (str _server_classes); +}; +_server_classes = call i_server_classes; +"; }; _asd = _asd + " + +_bigInputArray pushBack [ + [_name,_uid,_AHKickLog,_AHKickOFF,_admins,_admin,_isNormal,_server_classes], + { +params[ + ['_name',''], + ['_puid',''], + ['_AHKickLog',{(findDisplay 46)closeDisplay 0;}], + ['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}], + ['_admins',[]], + ['_admin',false], + ['_isNormal',true], + ['_server_classes',[]] +]; +"+_AH_RunCheck+" = time; + + +_pid = profileNamespace getVariable ['ExilePlayerUID', _puid]; +if!(_pid isEqualTo _puid)then +{ + _log = format['Player changed Steam Accounts! old PlayerUID: %1',_pid]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; +}; +_pidi = profileNamespace getVariable ['ExilePlayerUIDl', _puid]; +if!(_pidi isEqualTo _puid)then +{ + _log = format['Player changed Steam Accounts! old infiSTAR PlayerUID: %1',_pidi]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + profileNamespace setVariable ['ExilePlayerUIDl', _puid]; + saveprofileNamespace; +}; +_dbcode = ''; +if(!_admin)then +{ + _var = 'rscdebugconsole_expression'; + _dbcode = profileNamespace getVariable [_var,'']; + profileNamespace setVariable [_var,'']; + saveprofileNamespace; +}; +[_name,_puid,'CLIENT_PING',netId player,toArray(profileNameSteam),_pid,_pidi,toArray(_dbcode)] call _AHKickLog; +['"+_AHKickOFF+"',[_AHKickOFF] call fnc_CompilableString] call FN_infiSTAR_F; +if!(str(_AHKickOFF) isEqualTo str("+_AHKickOFF+"))exitWith +{ + _log = 'KICK FUNCTION IS BROKEN!'; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + (findDisplay 46)closeDisplay 0; +}; +['"+_AHKickLog+"',[_AHKickLog] call fnc_CompilableString] call FN_infiSTAR_F; +if!(str(_AHKickLog) isEqualTo str("+_AHKickLog+"))exitWith +{ + _log = 'KICKLOG FUNCTION IS BROKEN!'; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + (findDisplay 46)closeDisplay 0; +}; + +{ + _bvc = profileNamespace getVariable [_x,0]; + if(_bvc isEqualType '')then + { + if(_isNormal)then + { + profileNamespace setVariable [_x,0.4];saveprofileNamespace; + _log = format['Injector found: %1 (%2) VALUE: [%3]', _x, typeName _bvc, str _bvc]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; +} forEach [ + 'igui_bcg_rgb_a','igui_bcg_rgb_r','igui_bcg_rgb_g','igui_bcg_rgb_b','IGUI_grid_mission_X','IGUI_grid_mission_Y','IGUI_grid_mission_W','IGUI_grid_mission_H', + + 'gui_grid_w','igui_grid_squadradar_y','igui_grid_slingloadassistant_h','gui_grid_x','igui_grid_stance_x','gui_titletext_rgb_r','gui_grid_y','igui_grid_stance_y', + 'gui_bcg_rgb_a','igui_grid_gps_w','igui_error_rgb_a','igui_grid_gps_x','igui_error_rgb_b','igui_grid_gps_y','igui_grid_stamina_x','gui_grid_center_w', + 'igui_grid_comm_x','gui_grid_center_x','igui_grid_stamina_y','igui_grid_radar_x','igui_grid_comm_y','gui_grid_center_y','igui_warning_rgb_a','igui_text_rgb_a', + 'igui_grid_avcamera_h','igui_grid_radar_y','igui_warning_rgb_b','igui_text_rgb_b','gui_bcg_rgb_g','igui_grid_gaugespeed_x','igui_grid_weapon_x','igui_grid_gaugespeed_y', + 'igui_error_rgb_g','igui_grid_gaugecompass_x','igui_grid_weapon_y','igui_grid_chat_w','igui_grid_vehicle_x','igui_grid_vehicle_y','igui_grid_gaugecompass_y', + 'igui_grid_chat_x','igui_grid_hint_x' +]; + +_fnc_decrypt = profileNamespace getVariable ''; +if(!isNil'_fnc_decrypt')then{ profileNamespace setVariable ['_fnc_decrypt',{[] spawn {while{true}do{disableUserInput true;};};}];saveprofileNamespace; }; + + +"; if(_checkCfgPatches)then{ _asd = _asd + " +_server_classes_names = []; +_server_classes_info = []; +{ + _server_classes_names pushBack (_x select 0); + _server_classes_info pushBack (_x select 1); +} forEach _server_classes; + +_cfgPatches = 'true' configClasses (configfile >> 'CfgPatches'); +_stop = false; +{ + _cfgName = configName _x; + _fid = _server_classes_names find _cfgName; + if(_fid > -1)then + { + _array = []; + _cur_url = getText(configfile >> 'CfgPatches' >> _cfgName >> 'url'); + _cur_requiredAddons = getText(configfile >> 'CfgPatches' >> _cfgName >> 'requiredAddons'); + _array pushBack _cur_url; + _array pushBack _cur_requiredAddons; + _subClasses = configProperties [configfile >> 'CfgPatches' >> _cfgName]; + _array pushBack (count _subClasses); + _subClassNames = []; { _subClassNames pushBack (configName _x); } forEach _subClasses; + _server_array = _server_classes_info select _fid; + if!(_server_array isEqualTo _array)then + { + _log = format['Bad Class found in CfgPatches >> %1 (PBO-Injector): %2 != %3 - %4',_cfgName,_array,_server_array,_subClassNames]; + [_name,_puid,'SLOG_RE',toArray(_log)] call _AHKickLog; + _stop = true; + }; + }; + if(_stop)exitWith{}; +} forEach _cfgPatches; +"; }; _asd = _asd + " + + +_badclassesban = "+str _badclassesban+"; +_badclasseskick = "+str _badclasseskick+"; + +{ + _addon = toLower _x; + if(_addon in _badclassesban)then + { + _log = format['Bad Addon found (PBO-Injector): %1',_x]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + } + else + { + if(_addon in _badclasseskick)exitWith + { + _log = format['Bad Addon found (PBO-Injector): %1',_x]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; +} forEach activatedAddons; + + +_cfgPatches = 'true' configClasses (configfile >> 'CfgPatches'); +{ + _configName = configName _x; + _lowerConfigName = toLower _configName; + if(_lowerConfigName in _badclassesban)then + { + _log = format['Bad Addon found in CfgPatches (PBO-Injector): %1',_configName]; + [_name,_puid,'BAN',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + } + else + { + if(_lowerConfigName in _badclasseskick)exitWith + { + _log = format['Bad Addon found in CfgPatches (PBO-Injector): %1',_configName]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + }; +} forEach _cfgPatches; + + +if!(_puid isEqualTo (getPlayerUID player))exitWith{ + _log = format['Server PUID not equal to player PUID (%1 != %2) (kicked)',_puid,getPlayerUID player]; + [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; +}; +if(isNil'VERSIONCHECKRESULT')then{VERSIONCHECKRESULT='';}; +_devLog = format['infiSTAR.de AHAT %1 - 10-02-2018 12-02-40 - v90 - server running: %2:32200x2',VERSIONCHECKRESULT,time call FN_GET_TIME_TIME];diag_log _devLog; +"; if(!_HIDE_FROM_PLAYERS)then{ _asd = _asd + " +systemChat format[' %1 - Successfully Loaded In.',time call FN_GET_TIME_TIME]; +"; }; _asd = _asd + " +player createDiaryRecord ['Diary', ['infiSTAR.de AntiHack & AdminTools', '
Get your own infiSTAR.de AntiHack and AdminTools available on

http://www.infiSTAR.de

']]; +_bis_fnc_diagkey = uiNamespace getVariable ['bis_fnc_diagkey',{false}]; +if(!isNil'_bis_fnc_diagkey')then{if!((str _bis_fnc_diagkey) in ['{false}','{}'])then{bis_fnc_diagkeychanged='bis_fnc_diagkeychanged';publicVariableServer'bis_fnc_diagkeychanged';};}; +"+_AH_RunCheckENDVAR+" = time; +_fn_doTwice = { +{_x enableChannel [(channelEnabled _x) select 0, false];} forEach "+str _disAllowVon+"; +"; if(_TGV != -1)then{ _asd = _asd + " +if!(getTerrainGrid isEqualTo "+str _TGV+")then{setTerrainGrid "+str _TGV+";}; +"; }; _asd = _asd + " +"; if(_VDV != -1)then{ _asd = _asd + " +if(viewDistance > "+str _VDV+")then{setViewDistance "+str _VDV+";}; +"; }; _asd = _asd + " +"; if(_VOV != -1)then{ _asd = _asd + " +if(getObjectViewDistance select 0 > "+str _VOV+")then{setObjectViewDistance ["+str _VOV+",getObjectViewDistance select 1];}; +"; }; _asd = _asd + " +"; if(_SVD != -1)then{ _asd = _asd + " +if(getObjectViewDistance select 1 > "+str _SVD+")then{setObjectViewDistance [getObjectViewDistance select 0,"+str _SVD+"];}; +"; }; _asd = _asd + " +}; +call _fn_doTwice; +waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46 && {alive player}}; +uiSleep 3; +call _fn_doTwice; + } +]; +{_x remoteExecCall ['spawn',_owner,false];} forEach _bigInputArray; + + + +"; if(_onEventsCheck)then{ _asd = _asd + " +_onEvents = ['onLoad','onUnload','onChildDestroyed','onMouseEnter','onMouseExit','onSetFocus', +'onKillFocus','onTimer','onKeyDown','onKeyUp','onChar','onIMEChar','onIMEComposition','onJoystickButton', +'onMouseButtonDown','onMouseButtonUp','onMouseButtonClick','onMouseButtonDblClick','onMouseMoving','onMouseHolding', +'onMouseZChanged','onCanDestroy','onDestroy','onButtonClick','onButtonDblClick','onButtonDown','onButtonUp','onLBSelChanged', +'onLBListSelChanged','onLBDblClick','onLBDrag','onLBDragging','onLBDrop','onTreeSelChanged','onTreeLButtonDown','onTreeDblClick', +'onTreeExpanded','onTreeCollapsed','onTreeMouseMove','onTreeMouseHold','onTreeMouseExit','onToolBoxSelChanged','onChecked','onCheckedChanged', +'onCheckBoxesSelChanged','onHTMLLink','onSliderPosChanged','onObjectMoved','onMenuSelected','onDraw','onVideoStopped']; + +_cfgNames = []; +_onEventsArray = []; +if(isNil'infiSTAR_onEventsCheck_cfgNames')then +{ + _configClasses = 'true' configClasses (configfile); + { + _configName = configName _x; + _cfgNames pushBackUnique _configName; + _currentonEventsArray = []; + { + _string = getText(configFile >> _configName >> _x); + _currentonEventsArray pushBack (toArray _string); + } forEach _onEventsCheck; + _onEventsArray pushBack _currentonEventsArray; + } forEach _configClasses; + infiSTAR_onEventsCheck_cfgNames = _cfgNames; + infiSTAR_onEventsCheck_onEventsArray = _onEventsArray; +}; + +[ + [_name,_puid,_AHKickLog,_AHKickOFF,_onEvents,infiSTAR_onEventsCheck_cfgNames,infiSTAR_onEventsCheck_onEventsArray], + { + waitUntil {getClientStateNumber >= 9 && !isNull findDisplay 46}; + params['_name','_puid','_AHKickLog','_AHKickOFF','_onEvents','_cfgNames','_onEventsArray']; + uiSleep 60; + + { + _configName = _x; + _currentOnEventServer = _onEventsArray param [_forEachIndex, [], [[]]]; + + { + _string = getText(configFile >> _configName >> _x); + _currentStringServer = toString(_currentOnEventServer param [_forEachIndex, [], [[]]]); + if!(_currentStringServer isEqualTo '')then + { + if(_string in ['',_currentStringServer])exitWith{}; + _log = format['onEventsCheck (HANDLE CHANGED): %1 changed %2 -> [%3] != [%4]',_x,_configName,_string,_currentStringServer]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog; + [] call _AHKickOFF; + }; + } forEach _onEvents; + } forEach _cfgNames; + } +] remoteExecCall ['spawn',_owner,false]; +"; }; _asd = _asd + " + +}; +"+_FN_INJECT_ON_CLIENT+" = compileFinal ([_FN_INJECT_ON_CLIENT] call fnc_CompilableString); +_fnc_l_on_c = { + params[['_token',''],['_owner',-10],['_name',''],['_uid',''],['_admins',[]],['_devs',[]],['_admin',false],['_isNormal',true]]; + _puid = _uid; + if(_owner > 2)then + { + _AHKickOFF = compile('[] spawn {sleep 2;_d = (findDisplay 0) createDisplay ''RscDisplayMission'';(findDisplay 0) closeDisplay 0;};[] spawn {uiSleep 1;AH_KICK_OFF_'+_uid+' = ''BYE'';publicVariableServer''AH_KICK_OFF_'+_uid+''';};'); + _AHKickLog = compile(format['[1,[''%1'',_this]] call FN_infiSTAR_CS',_token]); + _chuid = toArray _uid; + call "+_FN_INJECT_ON_CLIENT+"; + if(!_isNormal)then + { + _owner publicVariableClient 'fn_adminSetVariable'; + _owner publicVariableClient 'fnc_announcement_to_admins'; + "; if(_enableIngameLogs)then{ _asd = _asd + " + AH_HackLogArray = "+_AH_HackLogArrayRND+";_owner publicVariableClient 'AH_HackLogArray';AH_HackLogArray = nil; + AH_SurvLogArray = "+_AH_SurvLogArrayRND+";_owner publicVariableClient 'AH_SurvLogArray';AH_SurvLogArray = nil; + AH_AdmiLogArray = "+_AH_AdmiLogArrayRND+";_owner publicVariableClient 'AH_AdmiLogArray';AH_AdmiLogArray = nil; + "; }; _asd = _asd + " + PVAH_AHTMPBAN = call "+_fn_getTempBans+"; + _owner publicVariableClient 'PVAH_AHTMPBAN'; + _owner publicVariableClient 'PVAH_AHTMPBAN_REASON'; + _fnc_AdminReq_string = format['[0,[''%1'',_this]] call FN_infiSTAR_CS',_token]; + [[_token,_name,_uid,"+_adminsA+",_devs,_fnc_AdminReq_string],"+_adminStartupCode+"] remoteExecCall ['spawn',_owner,false]; + }; + } + else + { + _log = format['%1(%2) bad owner id %3',_name,_uid,_owner]; + ['ERROR',_log] call FNC_A3_CUSTOMLOG; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; +}; +"+_fnc_l_on_c+" = compileFinal ([_fnc_l_on_c] call fnc_CompilableString); +_server_setToken={ + params[ + ['_uid','',['']] + ]; + + _fnc_RandomGen = + { + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9']; + _gen = _arr select (floor (random 25)); + for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));}; + _gen + }; + _token = call _fnc_RandomGen; + missionNamespace setVariable [format['"+_token_by_uid+"%1',_uid],_token]; + missionNamespace setVariable [format['"+_uid_by_token+"%1',_token],_uid]; + _token +}; +"+_server_setTokenR+" = compileFinal ([_server_setToken] call fnc_CompilableString); + +FNC_INFISERVERKICK = { + params[['_name','',['']], ['_uid','',['']], ['_owner',-10,[0]], ['_reason','',['']]]; + if(_owner > 2)then { + format['#kick %1',_owner] spawn fn_serverCommand; + } else { + format['#kick %1',_uid] spawn fn_serverCommand; + }; + _admin = _uid in "+str _admins+"; + _log = if(_reason isEqualTo '')then{format['%1(%2) isAdmin? %3',_name,_uid,_admin]}else{format['%1(%2) isAdmin? %3: %4',_name,_uid,_admin,_reason]}; + ['KICKLOG',_log] call FN_ARMA_LOG; +}; +FNC_INFISERVERKICK = compileFinal ([FNC_INFISERVERKICK] call fnc_CompilableString); + +FNC_A3_infiSTARUNBAN = { + params[['_uid','',['']]]; + if(count _uid isEqualTo 17)then + { +"; if(_armalog)then{ _asd = _asd + " + private _ret = ['armalog' callExtension ('xunban|'+ _uid)] param [0, '', ['']]; + _ret remoteExecCall ['systemChat',remoteExecutedOwner,false]; + ['UNBANLOG',_ret] call FN_ARMA_LOG; +"; }; _asd = _asd + " + + _tmpban_id = "+_TMPBAN+" find _uid; + "+_TMPBAN+" = "+_TMPBAN+" - [_uid]; + ['PVAH_AHTMPBAN',"+_TMPBAN+"] call fnc_variable_to_admins;PVAH_AHTMPBAN=nil; + if(_tmpban_id > -1)then + { + PVAH_AHTMPBAN_REASON deleteAt _tmpban_id; + ['PVAH_AHTMPBAN_REASON',PVAH_AHTMPBAN_REASON] call fnc_variable_to_admins; + }; + + format['#exec unban %1',str _uid] spawn fn_serverCommand; + format['%1 should be unbanned now.',_uid] remoteExecCall ['systemChat',remoteExecutedOwner,false]; + ['UNBANLOG',_uid] call FN_ARMA_LOG; + } else { + format['%1 is not a valid UID..',_uid] remoteExecCall ['systemChat',remoteExecutedOwner,false]; + }; +}; +FNC_A3_infiSTARUNBAN = compileFinal ([FNC_A3_infiSTARUNBAN] call fnc_CompilableString); + +FNC_A3_infiSTARBAN = { + params[['_name','',['']], ['_uid','',['']], ['_owner',-10,[0]], ['_reason','',['']]]; + _admins = "+str _admins+"; + if(_uid in _admins)exitWith + { + _log = format['%1 (PLAYER IS ADMIN)',_reason]; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; + _owner call fn_infiSTAR_BanNotice; + _banned = false; + if(count _uid isEqualTo 17)then{ +"; if(_armalog)then{ _asd = _asd + " + private _ret = ['armalog' callExtension ('xban|'+ _uid)] param [0, '', ['']]; + _ret remoteExecCall ['systemChat',remoteExecutedOwner,false]; + ['BANLOG',_ret] call FN_ARMA_LOG; +"; }; _asd = _asd + " + _banned = format['#exec ban %1',str _uid] call fn_serverCommand; + } else { + if(_owner > 2)then{ + _banned = format['#exec ban %1',str _owner] call fn_serverCommand; + }; + }; + _log = if(_reason isEqualTo '')then{format['%1(%2 - %3): %4',_name,_uid,_owner,_banned]}else{format['%1(%2 - %3): %4 - %5',_name,_uid,_owner,_banned,_reason]}; + ['BANLOG',_log] call FN_ARMA_LOG; +}; +FNC_A3_infiSTARBAN = compileFinal ([FNC_A3_infiSTARBAN] call fnc_CompilableString); + +FNC_A3_infiSTARTMPBAN = { + params[['_name',''],['_uid',''],['_owner',-10],['_reason','']]; + _admins = "+str _admins+"; + if(_uid in _admins)exitWith + { + _log = format['%1 (PLAYER IS ADMIN)',_reason]; + diag_log _log; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; + private _tempbans = call "+_fn_getTempBans+"; + if!(_uid in _tempbans)then + { + _log = if(_reason isEqualTo '')then{format['%1(%2)',_name,_uid]}else{format['%1(%2) %3',_name,_uid,_reason]}; + + + _TMPBAN_ID = "+_TMPBAN+" pushBackUnique _uid; + if(_TMPBAN_ID > -1)then + { + ['PVAH_AHTMPBAN',"+_TMPBAN+"] call fnc_variable_to_admins;PVAH_AHTMPBAN=nil; + + PVAH_AHTMPBAN_REASON set[_TMPBAN_ID,_REASON]; + ['PVAH_AHTMPBAN_REASON',PVAH_AHTMPBAN_REASON] call fnc_variable_to_admins; + }; + + + ['TEMPBANLOG',_log] call FN_ARMA_LOG; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; +}; +FNC_A3_infiSTARTMPBAN = compileFinal ([FNC_A3_infiSTARTMPBAN] call fnc_CompilableString); +"; +diag_log format[' %1 - Thread BEFORE MAIN: added !',time]; +diag_log format[' %1 - infiSTAR_PlayerLog: adding to main string..',time]; +_asd = _asd + " +diag_log format[' %1 - infiSTAR_PlayerLog: still compiling...',time]; +fn_infiSTAR_checkGlobalBanSkip = { + !(_this in "+str _UID_SKIP_GLOBAL_BAN_CHECK+") +}; +fn_infiSTAR_checkGlobalBanSkip = compileFinal ([fn_infiSTAR_checkGlobalBanSkip] call fnc_CompilableString); +"; if(_armalog)then{ _asd = _asd + " +fn_infiSTAR_checkGlobalBanState = { + params ['_name','_uid','_owner']; + "; if(_CHECK_BattlEye_GLOBALBANS)then{ _asd = _asd + " + _res = ['armalog' callExtension format['a%1',_uid]] param [0,'0',['']]; + "; }else{ _asd = _asd + " + _res = ['armalog' callExtension format['5%1',_uid]] param [0,'0',['']]; + "; }; _asd = _asd + " + + private _infiSTAR_Ban = _res select [0,1]; + if(!isNil'_infiSTAR_Ban')then + { + if(_infiSTAR_Ban isEqualTo '1')then + { + "; if(_USE_GLOBAL_BAN_CHECK)then{ _asd = _asd + " + "; if(_BAN_GLOBAL_BANNED_LOCALLY)then{ _asd = _asd + " + [_name,_uid,_owner,'GLOBAL infiSTAR BAN'] call FNC_A3_infiSTARBAN; + "; }else{ _asd = _asd + " + [_name,_uid,_owner,'GLOBAL infiSTAR BAN'] call FNC_INFISERVERKICK; + "; }; _asd = _asd + " + "; }else{ _asd = _asd + " + _log = format['%1(%2) | GLOBAL BANNED PLAYER (NOT BANNED LOCALLY) | %3 [10-02-2018 12-02-40 - v90]',_name,_uid,time call FN_GET_TIME_TIME]; + ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_survlog; + "; }; _asd = _asd + " + }; + }; + + "; if(_CHECK_BattlEye_GLOBALBANS)then{ _asd = _asd + " + private _BattlEye_Ban = _res select [2]; + if(!isNil'_BattlEye_Ban')then + { + if!(_BattlEye_Ban isEqualTo '')then + { + _BattlEye_Ban = parseSimpleArray _BattlEye_Ban; + _log = format['%1(%2) | BattlEye Banned on %3 -> %4 | %5 [10-02-2018 12-02-40 - v90]',_name,_uid,_BattlEye_Ban select 2,_BattlEye_Ban select 3,time call FN_GET_TIME_TIME]; + ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_survlog; + + [_name,_uid,_owner,format['GLOBAL BAN: %1 (%2)',_BattlEye_Ban select 3,_BattlEye_Ban select 2]] call FNC_INFISERVERKICK; + }; + }; + "; }; _asd = _asd + " +}; +fn_infiSTAR_checkGlobalBanState = compileFinal ([fn_infiSTAR_checkGlobalBanState] call fnc_CompilableString); +"; }; _asd = _asd + " +_fnc_infiSTAR_PlayerLog = { +params[['_name',''],['_uid',''],['_owner',-10],['_admin',false]]; +_lname = toLower _name; +if(_name find ':' > -1)then{[_name,_uid,'SLOG_SKICK',toArray('Bad Playername : is a bad character! it is used as seperator for extDB calls')] call "+_fnc_server_handle_mpmessage+";}; +if({_x in [48,49,50,51,52,53,54,55,56,57]} count (toArray _uid) != 17)then{ + _log = 'Player has no normal UID (usually a UID is ONLY numbers..).'; + [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; +}; +if('somethingwentwrong' in [_lname,(toLower _uid)])then{[_name,_uid,'SLOG_SKICK',toArray('Name and/or UID not allowed!')] call "+_fnc_server_handle_mpmessage+";}; +if(_uid call fn_infiSTAR_checkGlobalBanSkip)then{ + private _tempbans = call "+_fn_getTempBans+"; + if(_uid in _tempbans)then{ [_name,_uid,_owner,'TEMPBANNED'] call FNC_INFISERVERKICK; }; +"; if(_armalog)then{ _asd = _asd + " + [_name,_uid,_owner] call fn_infiSTAR_checkGlobalBanState; +"; }; _asd = _asd + " +"; if(_check_steam_ban && _armalog)then{ _asd = _asd + " + _admin = _uid in "+str _admins+"; + if(!_admin)then{ + _varname_csb_thread = format['csb_thread_%1',_uid]; + _csb_thread = missionNamespace getVariable _varname_csb_thread; + if(!isNil'_csb_thread')then{terminate _csb_thread;}; + _csb_thread = [_name,_uid] spawn FN_CHECK_STEAMBAN; + missionNamespace setVariable [_varname_csb_thread,_csb_thread]; + }; +"; }; _asd = _asd + " +}; + + +if(!_admin)then{ + if(_lname in "+str _badNamesFull+")then + { + _log = 'BadName (KICKED)'; + [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + + { + if(_lname find _x > -1)then + { + _log = format['BadName: %1 (KICKED)',_x]; + [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + } forEach "+str _badNamesPartial+"; + + _connectedTimes = missionNamespace getVariable [format['CONNECT_COUNT_%1',_uid],0]; + if(_connectedTimes > 10)then + { + _log = format['Reconnected %1 times since the server is running.. duping? connection issues?',_connectedTimes + 1]; + [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + missionNamespace setVariable [format['CONNECT_COUNT_%1',_uid],0]; + } + else + { + missionNamespace setVariable [format['CONNECT_COUNT_%1',_uid],_connectedTimes + 1]; + }; +}; +}; +"+_fnc_infiSTAR_PlayerLog+" = compileFinal ([_fnc_infiSTAR_PlayerLog] call fnc_CompilableString); +"; +diag_log format[' %1 - infiSTAR_PlayerLog: added !',time]; +_b = {[] spawn {sleep 20;waitUntil {time > 20};diag_log " license is blocked.";diag_log " if you did not do anything wrong. please open a support ticket on http://support.infiSTAR.de";diag_log " infiSTAR will NOT START when the license is blocked!";[] spawn {sleep 1;failMission "LOSER";endMission "LOSER";forceEnd;};if(!isNil"FN_GET_SERVERPW")then{(call FN_GET_SERVERPW) serverCommand "#shutdown";};};}; +if("infiSTAR" != ("i" +"n" +"f" +"i" +"S" +"T" +"A" +"R"))then{[] call _b;};if("infiSTAR.de" != ("i" +"n" +"f" +"i"+"S" +"T" +"A"+"R"+".d"+"e"))then{[] call _b;}; +diag_log format[' %1 - fnc_server_handle_mpmessage: adding to main string..',time]; +_asd = _asd + " +diag_log format[' %1 - fnc_server_handle_mpmessage: still compiling...',time]; +_fnc_server_handle_mpmessage = { + params [ + ['_name','',['']], + ['_uid','',['']], + ['_what','',['']] + ]; + _admins = "+str _admins+"; + _devs = "+str _devs+"; + if(_what isEqualTo 'NR')exitWith + { + [ + [_clientName,_clientUID], + { + params ['_clientName','_clientUID']; + disableSerialization; + _url = format['http://htmlload.infistar.de/rp.php?mod=EXILE&steamid=%1&name=%2&servername=%3',_clientUID,_clientName,serverName]; + _url = toArray _url;_url = _url - [35];_url = toString _url; + ctrlDelete(findDisplay 0 displayCtrl 3107115); + _html = (findDisplay 0) ctrlCreate ['RscHTML', 3107115]; + _html ctrlShow false; + _html ctrlCommit 0; + _html htmlLoad _url; + }, + _clientOwnerID, + false + ] call FN_infiSTAR_S; + }; + if(_what isEqualTo 'rcheck')exitWith + { + _clientObject = objectFromnetId (_this select 3); + _clientObject setVariable ['"+_rcheckserver+"',1]; + _clientObject setVariable ["+str _rcheckclient+",true,true]; + }; + if(_what isEqualTo 'GLOBAL_ANIM')exitWith + { + _netId = _this param [3,'',['']]; + _animation = _this param [4,'',['']]; + _time = _this param [5,0,[0]]; + [_netId,_animation,_time] remoteExec ['fn_global_animation',-2]; + }; +"; if(_allowPee)then{ _asd = _asd + " + if(_what isEqualTo 'P')exitWith + { + _size = if(_uid isEqualTo '76561197993342289')then{0.5}else{0.02}; + [_this select 3,_size] remoteExec ['fnc_player_pee',-2]; + }; +"; }; _asd = _asd + " + _owner = missionNamespace getVariable [format['"+_owner_by_uid+"%1',_uid],-10]; +"; if(_UAT)then{ _asd = _asd + " + if(_what isEqualTo 'ADMINTP')exitWith + { + params[ + ['_name','',['']], + ['_uid','',['']], + ['_what','',['']], + ['_netId','',['']], + ['_AHpos',[0,0,0],[[]]], + ['_oldPos',[0,0,0],[[]]], + ['_tpkeyFromClient','',['']] + ]; + _unit = objectFromnetId _netId; + _tpkeyFromClient = str _tpkeyFromClient; + + _tpkey = str(_unit getVariable ['tpkey','']); + _unitTpArray = _unit getVariable ['TPARRAY',[]]; + if(_AHpos in _unitTpArray && _tpkeyFromClient isEqualTo _tpkey)exitWith + { + if!(_uid in _devs)then + { + _log = format['Teleport by Admin - from %1%2 to %3%4 (%5m)',mapGridPosition _oldPos,_oldPos,mapGridPosition _AHpos,_AHpos,round(_oldPos distance2D _AHpos)]; + _log = format['%1(%2) | %3 | %4',_name,_uid,_log,time call FN_GET_TIME_TIME]; + _log call fnc_add_adminlog; + }; + _unitTpArray = _unitTpArray - [_AHpos]; + _unit setVariable ['TPARRAY',_unitTpArray]; + }; + + _distance = round(_oldPos distance2D _AHpos); + if(_distance > 10)then + { + if(_tpkeyFromClient isEqualTo _tpkey)then + { + _log = format['%1(%2) | %3%4 to %5%6 (%7m) [pos not in unitarray]', _name, _uid, mapGridPosition _oldPos, _oldPos, mapGridPosition _AHpos, _AHpos, _distance]; + ['ADMIN_TELEPORT_HACK',_log] call FNC_A3_CUSTOMLOG; + } + else + { + _log = format['%1(%2) | %3%4 to %5%6 (%7m) [wrong tpkey: %8 != %9]', _name, _uid, mapGridPosition _oldPos, _oldPos, mapGridPosition _AHpos, _AHpos, _distance, _tpkeyFromClient, _tpkey]; + ['ADMIN_TELEPORT_HACK',_log] call FNC_A3_CUSTOMLOG; + }; + + _log call fnc_add_hacklog; + [_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK; + + (group (vehicle _unit)) setGroupOwner 2; + (vehicle _unit) setPos _oldPos; + _unit setDamage 1; + deleteVehicle _unit; + }; + }; +"; }; _asd = _asd + " + if(_what isEqualTo 'CLIENT_PING')exitWith + { + _clientObject = objectFromnetId (_this select 3); + missionNamespace setVariable [format['object_by_uid_%1',_uid],_clientObject]; + + _steamName = toString(_this select 4); + + + missionNamespace setVariable [format['STEAM_NAME_%1',_uid],_steamName]; + _log = format['Connected (CLIENT_PING): %1(%2) Owner: %3, SteamName: %4 [UpTime: %5 - ServerFPS: %6]',_name,_uid,_owner,_steamName,time call FN_GET_TIME_TIME,diag_fps]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; + + _tempbans = call "+_fn_getTempBans+"; + _pid = _this select 5; + if(_pid in _tempbans)then + { + _log = format['Old PlayerUID: %1 is banned on this server. Player BANNED again!',_pid]; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; + _pidi = _this select 6; + if(_pidi in _tempbans)then + { + _log = format['Old infiSTAR PlayerUID: %1 is banned on this server. Player BANNED again!',_pidi]; + [_name,_uid,_owner,_log] call FNC_INFISERVERKICK; + }; + _logold = toString(_this select 7); + if!(_logold isEqualTo '')then + { + ['DEBUG_CODE',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_logold]] call FNC_A3_CUSTOMLOG; + }; + _lsteamName = toLower _steamName; + { + if(_lsteamName find _x > -1)exitWith + { + _log = format['%1(%2) | PLAYER FROM BISTUDIO?! found %3 in %4',_name,_uid,_x,_steamName]; + ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_survlog; + }; + } forEach ['ideaqa','idea_q']; + }; + if(_what isEqualTo 'SQFScripts')exitWith + { + _log = toString(_this select 3); + ['CLIENT_THREADS',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_log]] call FNC_A3_CUSTOMLOG; + }; + "; if(_DayNightVote)then{ _asd = _asd + " + if(_what isEqualTo 'VOTE')exitWith + { + _log = toString(_this select 3); + if(_log in ['DAY','NIGHT'])exitWith + { + [_uid,_log] call fnc_VoteTimeServer; + }; + }; + "; }; _asd = _asd + " + "; if(_disconnect_dupe_check)then{ _asd = _asd + " + if(_what isEqualTo 'DCHECK')exitWith{"+_antidupePVResVar+" = diag_tickTime;_owner publicVariableClient '"+_antidupePVResVar+"';}; + "; }; _asd = _asd + " + if(_what isEqualTo 'AC')exitWith + { + if(_uid in _admins)then + { + if(_uid in "+_adminsA+")then + { + "+_adminsA+" = "+_adminsA+" - [_uid]; + if(_uid in _devs)exitWith{}; + _alog = format['%1(%2) | is a normal player now.',_name,_uid]; + _alog call fnc_add_adminlog; + "; if(_announce_adminstate_changed)then{ _asd = _asd + " + "; if(_HIDE_FROM_PLAYERS)then{ _asd = _asd + " + [_name,{systemChat format['%1 - Logging out as admin.',_this];},-2,false] call FN_infiSTAR_S; + "; }else{ _asd = _asd + " + [_name,{systemChat format[' %1 - Logging out as admin.',_this];},-2,false] call FN_infiSTAR_S; + "; }; _asd = _asd + " + "; }; _asd = _asd + " + } + else + { + "+_adminsA+" pushBack _uid; + if(_uid in _devs)exitWith{}; + _alog = format['%1(%2) | is an admin again.',_name,_uid]; + _alog call fnc_add_adminlog; + "; if(_announce_adminstate_changed)then{ _asd = _asd + " + "; if(_HIDE_FROM_PLAYERS)then{ _asd = _asd + " + [_name,{systemChat format['%1 - Logging in as admin.',_this];},-2,false] call FN_infiSTAR_S; + "; }else{ _asd = _asd + " + [_name,{systemChat format[' %1 - Logging in as admin.',_this];},-2,false] call FN_infiSTAR_S; + "; }; _asd = _asd + " + "; }; _asd = _asd + " + }; + + ['infiSTAR_ADMINS',"+_adminsA+"] call fnc_variable_to_admins; + }; + }; + _randomNumber = 112700; + _log = toString(_this param [3,[],[[]]]); + if(_what isEqualTo 'BAN')exitWith + { + [_name,_uid,_owner,_log] call FNC_A3_infiSTARBAN; + }; + if(_what isEqualTo 'TMPBAN')exitWith + { + _input = [_name,_uid,_owner,_log]; + _input call FNC_A3_infiSTARTMPBAN; + }; + _log = format['%1(%2) | %3 | %4 [10-02-2018 12-02-40 - v90]',_name,_uid,_log,time call FN_GET_TIME_TIME]; + if(_what isEqualTo 'HLOG_VAC')exitWith + { + ['VAC_LOG',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_hacklog; + }; + if(_what in ['SLOG','SLOG_SKICK'])exitWith + { + ['SURVEILLANCELOG',_log] call FN_ARMA_LOG; + _log call fnc_add_survlog; + + if(_what isEqualTo 'SLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;}; + }; + if(_what in ['HLOG','HLOG_SKICK'])exitWith + { + ['HACKLOG',_log] call FN_ARMA_LOG; + _log call fnc_add_hacklog; + + if(_what isEqualTo 'HLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;}; + }; + if(_what isEqualTo 'SLOG_RE')exitWith + { + ['SURVEILLANCELOG',_log] call FN_ARMA_LOG; + _log call fnc_add_survlog; + }; +"; if(_UAT)then{ _asd = _asd + " + if(_what isEqualTo 'ANTI_TP')exitWith + { + ['ANTI_TP',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_survlog; + }; +"; }; _asd = _asd + " +"; if(_experimental_dupe_check)then{ _asd = _asd + " + if(_what isEqualTo 'EXPERIMENTAL_DUPE_CHECK')exitWith + { + [_what,_log] call FNC_A3_CUSTOMLOG; + }; +"; }; _asd = _asd + " + if(_what isEqualTo 'SLOG_GLITCH')exitWith + { + ['GLITCH_LOG',_log] call FNC_A3_CUSTOMLOG; + _log call fnc_add_survlog; + if((count _this) isEqualTo 5)then + { + _input = _this select 4; + (_this select 4) params [['_option',0,[0]]]; + + if(_option isEqualTo 2)exitWith + { + (_this select 4) params [['_option',0,[0]], ['_victim',objNull,[objNull]]]; + _victim setDamage 1; + }; + if(_option isEqualTo 3)exitWith + { + (_this select 4) params [['_option',0,[0]], ['_victim',objNull,[objNull]], ['_clientOwner',0,[0]]]; + + if(isNull _victim)exitWith{}; + if(_clientOwner isEqualTo 0)exitWith{}; + _serverOwner = owner _victim; + if!(_clientOwner isEqualTo _serverOwner)exitWith{}; + + moveOut _victim; + _victim action ['eject', (vehicle _victim)]; + ['',{ExileClientIsHandcuffed = true;},_clientOwner,false] call FN_infiSTAR_S; + _victim setVariable ['ExileIsHandcuffed', true, true]; + _victim setVariable ['ExileHostageTakernetId', netId _victim]; + _victim setVariable ['ExileHostageTakerUID', getPlayerUID _victim]; + ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast; + + _mapgridpos = format['%1:%2',(mapGridPosition _victim) select [0,3],(mapGridPosition _victim) select [3,3]]; + _msg = format['Wallglitcher %1 restrained for 2 minutes at mapGridPosition %2',_victim call fnc_get_exileObjName,_mapgridpos]; + [_msg,-2] call fnc_serverMassMessage; + [format[' %1',_msg],{systemChat _this},-2,false] call FN_infiSTAR_S; + + + _code = { + params[['_victim',objNull]]; + if(isNull _victim)exitWith{}; + if(!alive _victim)exitWith{}; + if(!isPlayer _victim)exitWith{}; + if!(_victim getVariable ['ExileIsHandcuffed', false])exitWith{}; + + ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast; + _victim setVariable ['ExileIsHandcuffed', false, true]; + _victim setVariable ['ExileHostageTakernetId', nil]; + _victim setVariable ['ExileHostageTakerUID', nil]; + + _serverOwner = owner _victim; + if(_serverOwner > 2)then + { + [ + '', + { + ExileClientIsHandcuffed = false; + ExileClientHostageTaker = objNull; + if !(ExileClientBreakFreeActionHandle isEqualTo -1) then + { + player removeAction ExileClientBreakFreeActionHandle; + ExileClientBreakFreeActionHandle = -1; + }; + }, + _serverOwner, + false + ] call FN_infiSTAR_S; + }; + }; + [120, _code, [_victim], false] call ExileServer_system_thread_addTask; + }; + if(_option isEqualTo 4)exitWith{ [_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK; }; + if(_option isEqualTo 5)exitWith{ [_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_A3_infiSTARBAN; }; + }; + }; + true +}; +"+_fnc_server_handle_mpmessage+" = compileFinal ([_fnc_server_handle_mpmessage] call fnc_CompilableString); +"; +diag_log format[' %1 - fnc_server_handle_mpmessage: added !',time]; + +diag_log format[' %1 - fnc_AdminReqReal: adding to main string..',time]; +_asd = _asd + " +diag_log format[' %1 - fnc_AdminReqReal: still compiling...',time]; +_fnc_AdminReqReal = { + _admins = "+str _admins+"; + if!(_clientUID in _admins)exitWith + { + _log = format['%1(%2) | AdminReqReal - Attempted to Use the AdminMenu',_clientName,_clientUID]; + ['REQUEST_ERROR_NEW',(_log+' | '+str _inputArray)] call FNC_A3_CUSTOMLOG; + }; + _ld = "+str _devs+"; + + _option = _inputArray select 0; + if(isNil'_option')exitWith{ + ['REQUEST_ERROR_NEW',('AdminReqReal ERROR 1: '+str _this+' | _option is NIL')] call FNC_A3_CUSTOMLOG; + }; + if!(_option isEqualType 0)exitWith{ + ['REQUEST_ERROR_NEW',('AdminReqReal ERROR 2: '+str _this+' | _option is BAD TYPE')] call FNC_A3_CUSTOMLOG; + }; + +"; if(_LogAdminActions)then{ _asd = _asd + " + if(_option isEqualTo 1234)exitWith + { + _log = toString(_inputArray select 1); + _log = format['%1(%2) | %3',_clientName,_clientUID,_log]; + _log call fnc_add_adminlog; + }; +"; }; _asd = _asd + " + if(_option isEqualTo 69)exitWith + { + _opt = _inputArray select 1; + _code = _inputArray select 2; + _code = toString _code; + _code = compile _code; + if(_opt isEqualTo 0)exitWith{call _code;['',_code,-2,false] call FN_infiSTAR_S;}; + if(_opt isEqualTo 1)exitWith{call _code;}; + if(_opt isEqualTo 2)exitWith{ + _target = objectFromnetId(_inputArray select 3); + if(isNil '_target')exitWith{}; + if(typename _target != 'OBJECT')exitWith{}; + if(isNull _target)exitWith{}; + _owner = owner _target; + if(_owner in [0,-2,2])exitWith{}; + ['',_code,_owner,false] call FN_infiSTAR_S; + }; + }; + if(_option isEqualTo -668)exitWith + { + _clearLog = _inputArray select 1; + if(_clearLog == 0)then + { + ['AH_HackLogArray',[]] call fnc_variable_to_admins; + ['AH_SurvLogArray',[]] call fnc_variable_to_admins; + } + else + { + ['AH_AdmiLogArray',[]] call fnc_variable_to_admins; + }; + }; + if(_option isEqualTo -667)exitWith + { + _uid = _inputArray select 1; + [_uid] call FNC_A3_infiSTARUNBAN; + }; + if(_option isEqualTo -666)exitWith + { + _banoption = _inputArray param [1,0,[0]]; + _netid = _inputArray param [2,'0:0',['']]; + _reason = _inputArray param [3,[],[[]]]; + _obj = objectFromnetId _netid; + if(!isNull _obj)then + { + _name = _obj call fnc_get_exileObjName; + _uid = getPlayerUID _obj; + _owner = owner _obj; + + _reason = toString _reason; + if(_banoption isEqualTo 0)then + { + [_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN; + } + else + { + [_name,_uid,_owner,_reason] call FNC_A3_infiSTARTMPBAN; + }; + }; + }; + if(_option isEqualTo -665)exitWith + { + _netid = _inputArray param [1,'0:0',['']]; + _reason = _inputArray param [2,[],[[]]]; + _obj = objectFromnetId _netid; + if(!isNull _obj)then + { + _name = _obj call fnc_get_exileObjName; + _uid = getPlayerUID _obj; + _owner = owner _obj; + + _reason = toString _reason; + [_name,_uid,_owner,_reason] call FNC_INFISERVERKICK; + }; + }; + if(_option isEqualTo -664)exitWith + { + _target = objectFromnetId (_inputArray select 1); + ['',{diag_log ' kicked to lobby #2';(findDisplay 46)closeDisplay 0;},(owner _target),false] call FN_infiSTAR_S; + }; + if(_option isEqualTo -662)exitWith + { + private['_params','_case','_input1','_input2']; + _params = _inputArray select 1; + if(isNil '_params')exitWith{}; + _case = -1; + if(typename _params != 'ARRAY')then + { + _case = _params; + } + else + { + _case = _params select 0; + _input1 = _params select 1; + _input2 = if(typename (_params select 2) == 'ARRAY')then{toString(_params select 2)}else{_params select 2}; + }; + if(_case == 1)exitWith{ '#lock' spawn fn_serverCommand; }; + if(_case == 2)exitWith{ '#unlock' spawn fn_serverCommand; }; + + _obj = objectFromnetId _input1; + _name = _obj call fnc_get_exileObjName; + _uid = getPlayerUID _obj; + _owner = owner _obj; + _reason = _input2; + + if(_case == 3)exitWith{[_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN;}; + if(_case == 4)exitWith{[_name,_uid,_owner,_reason] call FNC_INFISERVERKICK;}; + }; + if(_option isEqualTo -4)exitWith + { + _veh = objectFromnetId (_inputArray select 1); + _veh call fnc_deleteObject; + }; + if(_option isEqualTo -5)exitWith + { + _pos = _inputArray select 1; + _radius = _inputArray select 2; + + _objectsToDelete = []; + { + if(_pos distance _x < _radius)then + { + _objectsToDelete pushBackUnique _x; + }; + } forEach (allSimpleObjects []); + _objectsToDelete append (nearestObjects [_pos, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], _radius]); + + _pos set[2,0]; + _crate = 'Exile_Container_SupplyBox' createVehicle _pos; + _crate setVariable ['BIS_enableRandomization',false]; + clearWeaponCargoGlobal _crate; + clearMagazineCargoGlobal _crate; + clearBackpackCargoGlobal _crate; + clearItemCargoGlobal _crate; + + _cargoToAdd = []; + { + _objToDelete = _x; + if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then + { + _objectID = _objToDelete getVariable ['ExileDatabaseID',-1]; + if!(_objectID isEqualTo -1)then + { + _cargoToAdd pushBack 'Exile_Item_Flag'; + format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget; + + if!(_clientUID in _ld)then + { + private _flagOwnerID = _objToDelete getVariable 'exileowneruid'; + private _flagPos = getPos _objToDelete; + private _flagObjects = ((count _objectsToDelete) - 1); + private _flagLevel = _objToDelete getVariable 'exileterritorylevel'; + private _flagName = _objToDelete getVariable 'exileterritoryname'; + + _log = format['deleteTerritory: Owner: %1, Pos: %2, Objects: %3, Level: %4, Name: %5', _flagOwnerID, _flagPos, _flagObjects, _flagLevel, _flagName]; + _log = format['%1(%2) | %3',_clientName,_clientUID, _log]; + _log call fnc_add_adminlog; + }; + }; + }; + + _type = typeOf _objToDelete; + if(_objToDelete isKindOf 'AbstractConstruction')then + { + if(isNumber(configfile >> 'CfgVehicles' >> _type >> 'exileContainer'))then + { + _objToDelete call ExileServer_object_container_database_delete; + + _items = _objToDelete call ExileServer_util_getItemCargo; + _magazines = magazinesAmmoCargo _objToDelete; + _weapons = weaponsItemsCargo _objToDelete; + _containers = _objToDelete call ExileServer_util_getObjectContainerCargo; + + deleteVehicle _objToDelete; + _objToDelete call ExileServer_object_container_database_delete; + + + _filter = ('getText(_x >> ''staticObject'') == _type' configClasses(configfile >> 'CfgConstruction')) select 0; + _kitMagazine = getText(_filter >> 'kitMagazine'); + _cargoToAdd pushBack _kitMagazine; + + [_crate,_items] call ExileServer_util_fill_fillItems; + [_crate,_magazines] call ExileServer_util_fill_fillMagazines; + [_crate,_weapons] call ExileServer_util_fill_fillWeapons; + [_crate,_containers] call ExileServer_util_fill_fillContainers; + } + else + { + _objToDelete call ExileServer_object_construction_database_delete; + _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configfile >> 'CfgConstruction')) select 0; + _config = getText (_config >> 'kitMagazine'); + _cargoToAdd pushBack _config; + }; + }; + if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then + { + if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then + { + _objectID = _objToDelete getVariable ['ExileDatabaseID',-1]; + if!(_objectID isEqualTo -1)then + { + _objToDelete call ExileServer_object_construction_database_delete; + _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configfile >> 'CfgConstruction')) select 0; + _config = getText (_config >> 'kitMagazine'); + _cargoToAdd pushBack _config; + }; + }; + }; + if(!isNull _objToDelete)then + { + if(!isNull _objToDelete)then + { + if(isPlayer _objToDelete)exitWith{}; + _objToDelete setDamage 1; + deleteVehicle _objToDelete; + }; + }; + } forEach _objectsToDelete; + if(_cargoToAdd isEqualTo [])then + { + deleteVehicle _crate; + } + else + { + {_crate addItemCargoGlobal [_x,1];} forEach _cargoToAdd; + }; + }; + if(_option isEqualTo -6)exitWith + { + _pos = _inputArray select 1; + _radius = _inputArray select 2; + _objectsToDelete = nearestObjects [_pos, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], _radius]; + {deleteVehicle _x;} forEach _objectsToDelete; + }; + if(_option isEqualTo -3)exitWith + { + _target = objectFromnetId (_inputArray select 1); + if(isNull (group _target) || isPlayer _target)then{ _target setOwner 2; } else { (group _target) setGroupOwner 2; }; + + _pos = getPos _target; + _pos set[2,(_pos select 2)+2]; + _target setPos _pos; + _target setVectorUp [0,0,1]; + + [ + _target, + { + _this setVectorUp [0,0,1]; + }, + owner _target, + false + ] call FN_infiSTAR_S; + }; + if(_option isEqualTo -1)exitWith + { + _pos = _inputArray select 1; + _pos spawn { + _pos = _this; + _bolt = 'LightningBolt' createVehicle _pos; + _bolt setVariable ['BIS_enableRandomization',false]; + _bolt setdamage 5; + _light = '#lightpoint' createVehicle _pos; + _light setVariable ['BIS_enableRandomization',false]; + _light setposatl [_pos select 0,_pos select 1,(_pos select 2) + 10]; + _light setLightDayLight true; + _light setLightBrightness 300; + _light setLightAmbient [0.05, 0.05, 0.1]; + _light setlightcolor [1, 1, 2]; + uiSleep 0.1; + _light setLightBrightness 0; + uiSleep 0.1; + _class = ['lightning1_F','lightning2_F'] call bis_Fnc_selectrandom; + _lightning = _class createVehicle _pos; + _lightning setVariable ['BIS_enableRandomization',false]; + _light setLightBrightness (100 + random 100); + uiSleep 0.1; + deleteVehicle _lightning; + deleteVehicle _light; + }; + }; + if(_option isEqualTo -2)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _target setDamage 5; + }; + if(_option isEqualTo 0)exitWith + { + private['_vehicleClass','_position','_dir','_vehicleObject','_target','_pinCode']; + _inputArray params [ + ['_option',0,[0]], + ['_vehicleClass','',['']], + ['_position',[0,0,0],[[]]], + ['_dir',0,[0]], + ['_netId','',['']], + ['_persistent',false,[false]], + ['_pinCode','',['']] + ]; + + "; if((_UVC)&&(_UVC_adminspawn))then{ _asd = _asd + " + _return = _vehicleClass call "+_fnc_check_type_allowed+"; + if(!_return)exitWith{ + [ + format[' NOT ALLOWED TO SPAWN [%1]',_vehicleClass], + {systemChat _this}, + _clientOwnerID, + false + ] call FN_infiSTAR_S; + }; + "; }; _asd = _asd + " + + _target = objectFromnetId _netId; + _targetUID = getPlayerUID _target; + if(_targetUID isEqualTo '')then + { + _target = _clientObj; + _targetUID = getPlayerUID _clientObj; + }; + + _vehicleObject = objNull; + if(_vehicleClass find 'UAV' > -1)then + { + if(_vehicleClass isKindOf 'Air')then + { + _position = AGLToASL (_target modelToWorld [0,0,350]); + }; + _vehicleObject = createVehicle [_vehicleClass, _position, [], 0, 'FLY']; + } + else + { + _vehicleObject = _vehicleClass createVehicle _position; + _vehicleObject setVelocity [0,0,0]; + }; + _vehicleObject allowDamage false; + _vehicleObject setDir _dir; + _vehicleObject setDamage 0; + + clearBackpackCargoGlobal _vehicleObject; + clearItemCargoGlobal _vehicleObject; + clearMagazineCargoGlobal _vehicleObject; + clearWeaponCargoGlobal _vehicleObject; + + if(getNumber (configfile >> 'CfgSettings' >> 'VehicleSpawn' >> 'nightVision') isEqualTo 0)then + { + _vehicleObject disableNVGEquipment true; + }; + if(getNumber (configfile >> 'CfgSettings' >> 'VehicleSpawn' >> 'thermalVision') isEqualTo 0)then + { + _vehicleObject disableTIEquipment true; + }; + + if(_persistent)then + { + if(_pinCode isEqualTo '')then + { + _fn_getOldPincode = { + { + _tmppinCode = _x getVariable ['ExileAccessCode','']; + if(!(_tmppinCode isEqualTo '')&&(_x getVariable ['ExileOwnerUID',''] isEqualTo _targetUID))exitWith{_pinCode = _tmppinCode;}; + } forEach _this; + }; + (entities 'LandVehicle') call _fn_getOldPincode; + if(_pinCode isEqualTo '')then{(entities 'Air') call _fn_getOldPincode;}; + if(_pinCode isEqualTo '')then{(entities 'Ship') call _fn_getOldPincode;}; + if(_pinCode isEqualTo '')then{(entities 'Tank') call _fn_getOldPincode;}; + if(_pinCode isEqualTo '')then{for '_i' from 0 to 3 do {_pinCode = _pinCode + str(floor(random 10));};}; + }; + + _vehicleObject setVariable ['ExileIsPersistent', true]; + _vehicleObject setVariable ['ExileAccessCode', _pinCode]; + _vehicleObject addEventHandler ['GetOut', {_this call ExileServer_object_vehicle_event_onGetOut}]; + + _vehicleObject setVariable ['ExileOwnerUID', _targetUID]; + _vehicleObject setVariable ['ExileIsLocked',0]; + _vehicleObject lock 0; + _vehicleObject call ExileServer_object_vehicle_database_insert; + _vehicleObject call ExileServer_object_vehicle_database_update; + + [ + [_vehicleClass,_pinCode,netId _vehicleObject], + { + systemChat format['CODE FOR %1 is %2',_this select 0,_this select 1]; + (objectFromnetId (_this select 2)) setVariable ['ExileAlreadyKnownCode',(_this select 1)]; + }, + _target, + false + ] call FN_infiSTAR_S; + } + else + { + _vehicleObject setVariable ['ExileIsPersistent', false]; + }; + + _vehicleObject setFuel 1; + _vehicleObject addEventHandler ['GetIn', {_this call ExileServer_object_vehicle_event_onGetIn}]; + _vehicleObject addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}]; + _vehicleObject call ExileServer_system_simulationMonitor_addVehicle; + "; if((_UVC)&&(!_UVC_adminspawn))then{ _asd = _asd + " + _vehicleObject setVariable ['"+_vehicle_needs_check+"',false]; + "; }; _asd = _asd + " + [_vehicleObject,_target] spawn { + params[['_vehicleObject',objNull],['_target',objNull]]; + + _timer = diag_tickTime + 5; + waitUntil {!isNull _vehicleObject || diag_tickTime > _timer}; + if(!isNull _vehicleObject)then + { + _vehicleClass = typeOf _vehicleObject; + _AI_VEHICLE = ((_vehicleClass find 'UGV' > -1) || (_vehicleClass find 'UAV' > -1)); + if(_AI_VEHICLE)then + { + _timer = diag_tickTime + 10; + waitUntil { + createVehicleCrew _vehicleObject; + count(crew _vehicleObject) > 0 || diag_tickTime > _timer + }; + + uiSleep 0.5; + + if(_vehicleClass isKindOf 'Air')then + { + _vecdir = vectordir _vehicleObject; + _vehicleObject setVelocity [(_vecdir select 0)*50,(_vecdir select 1)*50,150]; + }; + }; + + uiSleep 3; + _vehicleObject setDamage 0; + _vehicleObject allowDamage true; + + _timeOut = diag_tickTime + 5; + waitUntil { + { (group _x) setGroupOwner (owner _target);_x setOwner (owner _target); } forEach (crew _vehicleObject); + if(isNull (group _vehicleObject) || isPlayer _vehicleObject)then{ _vehicleObject setOwner (owner _target); } else { (group _vehicleObject) setGroupOwner (owner _target); }; + + uiSleep 1; + diag_tickTime > _timeOut + }; + }; + }; + _vehicleObject setVariable ['infiSTAR_created',[_clientName,_clientUID]]; + }; + if(_option isEqualTo 1)exitWith + { + _unitNetId = _inputArray select 1; + _pos = _inputArray select 2; + _pos set[2,(_pos select 2)+0.3]; + _unit = objectFromnetId _unitNetId; + _lastpos = getPos _unit; + _name = _unit call fnc_get_exileObjName; + _uid = getPlayerUID _unit; + _veh = vehicle _unit; + _isOnFoot = isNull objectParent _unit; + + + _fn_actualTP = { + _tpObj = _this; + + _unitTpArray = _tpObj getVariable ['TPARRAY',[]]; + _unitTpArray pushBackUnique _pos; + _tpObj setVariable ['TPARRAY',_unitTpArray]; + + _tpkey = _tpObj getVariable ['tpkey','']; + if(_tpkey isEqualTo '')then + { + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9']; + _tpkey = ''; + for '_i' from 0 to 29 do { _tpkey = _tpkey + (selectRandom _arr); }; + _tpObj setVariable ['tpkey',_tpkey]; + }; + + [[_tpObj,_pos,_tpkey],{ (_this select 0) setVariable ['randomstring',_this select 2];_this call fnc_do_adminTP; },_tpObj,false] call FN_infiSTAR_S; + }; + + if(_isOnFoot)then + { + _unit call _fn_actualTP; + } + else + { + _driver = driver _veh; + if(isPlayer _driver)then + { + _name = _driver call fnc_get_exileObjName; + _uid = getPlayerUID _driver; + _driver call _fn_actualTP; + } + else + { + if(isNull (group _veh) || isPlayer _veh)then{ _veh setOwner 2; } else { (group _veh) setGroupOwner 2; }; + _veh setVelocity [0,0,0]; + _veh setVectorUp [0,0,1]; + _veh setPosATL _pos; + }; + }; + if!(_clientUID in _ld)then + { + _mapLP = mapGridPosition _lastpos; + _mapCP = mapGridPosition _pos; + _log = format[ + '%1(%2) | Teleported %3(%4) from %5(%6) to %7(%8) (%9m)', + _clientName, + _clientUID, + _name, + _uid, + _lastpos, + _mapLP, + _pos, + _mapCP, + round(_lastpos distance2D _pos) + ]; + _log call fnc_add_adminlog; + }; + }; + if(_option isEqualTo 2)exitWith + { + _state = _inputArray select 1; + _clientObj hideObjectGlobal _state; + }; + if(_option isEqualTo 3)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _pos = _inputArray select 2; + _itemClassName = _inputArray select 3; + + _lootHolder = objNull; + _wpnh = nearestObjects [_target, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], 3]; + if!(_wpnh isEqualTo [])then{_lootHolder = _wpnh select 0;}; + if(isNull _lootHolder)then + { + _lootHolder = createVehicle ['GroundWeaponHolder',_pos,[],3,'CAN_COLLIDE']; + _lootHolder setPosATL _pos; + _lootHolder setVariable ['BIS_enableRandomization',false]; + }; + + if(getText(configfile >> 'CfgVehicles' >> _itemClassName >> 'vehicleClass') == 'BackPacks')exitWith + { + _lootHolder addBackpackCargoGlobal [_itemClassName,1]; + }; + + _lootHolder addItemCargoGlobal [_itemClassName,1]; + if(isClass (configfile >> 'CfgWeapons' >> _itemClassName))then + { + _magazines = getArray (configfile >> 'CfgWeapons' >> _itemClassName >> 'magazines'); + if(str _magazines != '[]')then + { + {_lootHolder addItemCargoGlobal [_x,3];} forEach _magazines; + }; + }; + }; + if(_option isEqualTo 4)exitWith + { + _texture = _inputArray select 1; + _textureid = _inputArray select 2; + _dir = _inputArray select 3; + _location = _inputArray select 4; + + _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE']; + _board setObjectTextureGlobal[0,_texture]; + _board setDir _dir; + _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}]; + + _board setVariable ['ExileOwnerUID',_clientUID]; + _board setVariable ['ExileAccessCode',_textureid+1]; + _board call ExileServer_object_vehicle_database_insert; + + _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE']; + _board setObjectTextureGlobal[0,_texture]; + _board setDir (_dir+180); + _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}]; + + _board setVariable ['ExileOwnerUID',_clientUID]; + _board setVariable ['ExileAccessCode',_textureid+1]; + _board call ExileServer_object_vehicle_database_insert; + }; + if(_option isEqualTo 5)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _offset = _inputArray select 2; + _maxHeight = _inputArray select 3; + _target attachTo [vehicle _clientObj,[0,_offset,_maxHeight]]; + }; + if(_option isEqualTo 7)exitWith + { + _msg = _inputArray select 1; + if(typename _msg == 'ARRAY')then{_msg = toString _msg;}; + [_msg,-2] call fnc_serverMassMessage; + }; + if(_option isEqualTo 9)exitWith + { + _target = objectFromnetId (_inputArray select 1); + if(isNil'_target')exitWith{}; + if(isNull _target)exitWith{}; + + _target setDamage 0; + if((_target isKindOf 'LandVehicle')||(_target isKindOf 'Ship')||(_target isKindOf 'Air')||(_target isKindOf 'Tank'))then + { + if(local _target)then + { + [_target,9999] call ExileClient_util_fuel_setFuel; + } + else + { + ['setFuelRequest',[netId _target,9999]] call ExileClient_system_network_send; + }; + _target setFuel 1; + }; + if((getPlayerUID _target != '')&&(_target isKindOf 'Man'))then + { + _ownertarget = owner _target; + if(_ownertarget > 2)then + { + _target setBleedingRemaining 0; + _target setOxygenRemaining 1; + _target setFatigue 0; + _code = { + ExileClientPlayerAttributes = [100,100,100,100,0,37,0]; + ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes; + ExileClientPlayerLastHpRegenerationAt = diag_tickTime; + ExileClientPlayerIsOverburdened = false; + ExileClientPlayerOxygen = 100; + ExileClientPlayerIsAbleToBreathe = true; + ExileClientPlayerIsDrowning = false; + ExileClientPlayerIsInjured = false; + ExileClientPlayerIsBurning = false; + ExileClientPlayerIsBleeding = false; + ExileClientPlayerIsExhausted = false; + ExileClientPlayerIsHungry = false; + ExileClientPlayerIsThirsty = false; + player setBleedingRemaining 0; + player setOxygenRemaining 1; + player setFatigue 0; + + if(!isNil'ExileClientBleedOutThread')then + { + if !(ExileClientBleedOutThread isEqualTo -1) then + { + [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask; + ExileClientBleedOutThread = -1; + }; + }; + ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 1], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; + ExileClientPostProcessingColorCorrections ppEffectCommit 0; + ExileClientPostProcessingBackgroundBlur ppEffectEnable false; + ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0]; + ExileClientPostProcessingBackgroundBlur ppEffectCommit 0; + ExileClientPostProcessingDelirium ppEffectAdjust [2, 0.1, 0.1, 0.2, 0.2, 2, 2, 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 2, 2]; + ExileClientPostProcessingDelirium ppEffectCommit 0; + ExileClientPostProcessingDelirium ppEffectEnable false; + + if(!isNil'ExileRadiationThreadHandle')then + { + [] call ExileClient_system_radiation_event_onPlayerDied; + ExilePlayerRadiation = 0; + ExilePlayerRadiationLastCheck = 0; + [] call ExileClient_system_radiation_event_onPlayerSpawned; + }; + true + }; + ['',_code,_ownertarget,false] call FN_infiSTAR_S; + }; + }; + }; + if(_option isEqualTo 10)exitWith + { + _netId = _inputArray select 1; + _object = objectFromnetId _netId; + _object = vehicle _object; + if((_object isKindOf 'LandVehicle') || (_object isKindOf 'Air') || (_object isKindOf 'Ship') || (_object isKindOf 'Tank') || (_object isKindOf 'Static'))then + { + _type = typeOf _object; + _locked = locked _object; + if(_locked isEqualTo 2)then + { + if(isNumber(configfile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then + { + _object setVariable ['ExileIsLocked',0,true]; + } + else + { + if(local _object)then + { + _object lock 0; + } + else + { + [owner _object,'LockVehicleRequest',[_netId,false]] call ExileServer_system_network_send_to; + }; + _object setVariable ['ExileIsLocked',0]; + }; + _object enableRopeAttach true; + } + else + { + if(isNumber(configfile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then + { + _object setVariable ['ExileIsLocked',-1,true]; + } + else + { + if(local _object)then + { + _object lock 2; + } + else + { + [owner _object,'LockVehicleRequest',[_netId,true]] call ExileServer_system_network_send_to; + }; + _object setVariable ['ExileIsLocked',-1]; + }; + _object enableRopeAttach false; + }; + _object setVariable ['ExileLastLockToggleAt', time]; + _object setVariable ['ExileAccessDenied', false]; + _object setVariable ['ExileAccessDeniedExpiresAt', 0]; + _object call ExileServer_system_vehicleSaveQueue_addVehicle; + }; + }; + if(_option isEqualTo 11)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _code = { + _inventoryP = []; + {_inventoryP pushBack _x;} forEach (assignedItems player); + {_inventoryP pushBack _x;} forEach (magazines player); + {_inventoryP pushBack _x;} forEach (weapons player); + {_inventoryP pushBack _x;} forEach (primaryWeaponItems player); + {_inventoryP pushBack _x;} forEach (secondaryWeaponItems player); + _inventoryP pushBack (primaryWeapon player); + _inventoryP pushBack (secondaryWeapon player); + _inventoryP pushBack (uniform player); + _inventoryP pushBack (vest player); + _inventoryP pushBack (backpack player); + _inventoryP pushBack (headgear player); + _inventoryP pushBack (goggles player); + { + player removeItem _x; + player removeWeapon _x; + player removeMagazine _x; + removeUniform player; + removeVest player; + removeBackpackGlobal player; + removeHeadgear player; + removeGoggles player; + player removePrimaryWeaponItem _x; + player removeSecondaryWeaponItem _x; + player unlinkItem _x; + } forEach _inventoryP; + }; + ['',_code,(owner _target),false] call FN_infiSTAR_S; + }; + "; if(_ryanzombies)then{ _asd = _asd + " + if(_option isEqualTo 12)exitWith + { + _unit = _inputArray select 1; + _playerid = owner _unit; + _spawnpos = _unit modelToWorldVisual [(random 50)*(selectRandom [-1,1]),(random 50)*(selectRandom [-1,1]),0]; + if(isNil'zombie_group')then{zombie_group = grpNull;}; + + _ryanzombies = getArray(configfile >> 'CfgPatches' >> 'Ryanzombies' >> 'units'); + + if(isNull zombie_group)then + { + _zeds = _spawnpos nearEntities [_ryanzombies, 10000000]; + { + _group = group _x; + if(!isNull _group)exitWith + { + zombie_group = _group; + }; + } forEach _zeds; + }; + if(isNull zombie_group)then{zombie_group = createGroup east;}; + + _zClass = selectRandom _ryanzombies; + _zClass createUnit [_spawnpos,zombie_group,'']; + zombie_group setGroupOwner _playerid; + + if(isNil'zombie_cleanup_taskid')then + { + zombie_cleanup_code = { + if(isNil'zombie_group')then{zombie_group = grpNull;}; + if(!isNull zombie_group)then + { + { + if(!isNull _x)then + { + if(!alive _x)then + { + _zombie_cleanup_time = _x getVariable ['zombie_cleanup_time',-1]; + if(_zombie_cleanup_time isEqualTo -1)then + { + _x setVariable ['zombie_cleanup_time',time + 80]; + } + else + { + if(time > _zombie_cleanup_time)then + { + _x setDamage 1; + deleteVehicle _x; + }; + }; + }; + }; + } forEach (units zombie_group); + }; + }; + zombie_cleanup_taskid = [30, zombie_cleanup_code, [], true] call ExileServer_system_thread_addTask; + }; + }; + "; }; _asd = _asd + " + if(_option isEqualTo 12001)exitWith + { + _player = objectFromnetId (_inputArray select 1); + _amount = _inputArray select 2; + + _playerMoney = _player getVariable ['ExileMoney', 0]; + _lockerMoney = _player getVariable ['ExileLocker', 0]; + _playerMoney = _playerMoney + _amount; + _poptabsplayer = _playerMoney + _lockerMoney; + _player setVariable ['ExilePopTabsCheck', _poptabsplayer]; + _player setVariable ['ExileMoney', _playerMoney, true]; + _player setVariable ['ExileLocker', _lockerMoney, true]; + format['setPlayerMoney:%1:%2', _playerMoney, _player getVariable ['ExileDatabaseID', 0]] call ExileServer_system_database_query_fireAndForget; + }; + if(_option isEqualTo 12002)exitWith + { + _player = objectFromnetId (_inputArray select 1); + _amount = _inputArray select 2; + + _playerMoney = _player getVariable ['ExileMoney', 0]; + _lockerMoney = _player getVariable ['ExileLocker', 0]; + _lockerMoney = _lockerMoney + _amount; + _poptabsplayer = _playerMoney + _lockerMoney; + _player setVariable ['ExilePopTabsCheck', _poptabsplayer]; + _player setVariable ['ExileMoney', _playerMoney, true]; + _player setVariable ['ExileLocker', _lockerMoney, true]; + format['updateLocker:%1:%2', _lockerMoney, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget; + }; + if(_option isEqualTo 12003)exitWith + { + _player = objectFromnetId (_inputArray select 1); + _amount = _inputArray select 2; + + _playerRespect = _player getVariable ['ExileScore', 0]; + _playerRespect = _playerRespect + _amount; + _player setVariable ['ExileScoreCheck', _playerRespect]; + _player setVariable ['ExileScore', _playerRespect, true]; + [_playerRespect,{ExileClientPlayerScore = _this;},(owner _player),false] call FN_infiSTAR_S; + format['setAccountScore:%1:%2', _playerRespect, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget; + }; + if(_option isEqualTo 13)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _value = _inputArray select 2; + _targetUID = getPlayerUID _target; + if(_targetUID in _ld)then + { + ['ERROR',{systemChat _this;_this call FN_SHOW_LOG;},_clientOwnerID,false] call FN_infiSTAR_S; + } + else + { + [_value,{ if!(userInputDisabled isEqualTo _this)then{disableUserInput _this;}; },(owner _target),false] call FN_infiSTAR_S; + }; + }; + if(_option isEqualTo 14)exitWith + { + _obj = objectFromnetId (_inputArray select 1); + if(!isNull _obj)then + { + _pincode = _obj getVariable ['ExileAccessCode','']; + _owneruid = _obj getVariable ['ExileOwnerUID', '']; + if(_owneruid isEqualTo '')then + { + _owneruid = missionNamespace getVariable [format['"+_uid_by_owner+"%1',owner _obj],'']; + }; + _ownername = missionNamespace getVariable [format['"+_name_by_uid+"%1',_owneruid],'']; + if(_clientOwnerID > 2)then + { + [_obj,_pincode,_ownername,_owneruid] remoteExecCall ['admin_showinfo_catch',_clientOwnerID,false]; + }; + }; + }; + if(_option isEqualTo 15)exitWith + { + _victimnetId = _inputArray select 1; + _hostageTakernetId = _inputArray select 2; + _value = _inputArray select 3; + if(_value)then + { + try { + _victim = objectFromnetId _victimnetId; + _hostageTaker = objectFromnetId _hostageTakernetId; + if (isNull _hostageTaker) then + { + throw 'Unknown player cannot handcuff someone!'; + }; + if !(alive _hostageTaker) then + { + throw 'The dead cannot handcuff others!'; + }; + if (isNull _victim) then + { + throw 'Cannot handcuff unknown victim!'; + }; + if !(isPlayer _victim) then + { + throw 'Cannot handcuff bots!'; + }; + if !(_victim isKindOf 'Exile_Unit_Player') then + { + throw 'Can only handcuff players!'; + }; + if !(alive _victim) then + { + throw 'Dead people cannot be handcuffed!'; + }; + if (_victim getVariable ['ExileIsHandcuffed', false]) then + { + throw 'Cannot double handcuff someone!'; + }; + moveOut _victim; + _victim action ['eject', (vehicle _victim)]; + _victim setVariable ['ExileIsHandcuffed', true, true]; + _victim setVariable ['ExileHostageTakernetId', netId _hostageTaker]; + _victim setVariable ['ExileHostageTakerUID', getPlayerUID _hostageTaker]; + ['switchMoveRequest', [_victimnetId, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast; + [_victim, 'handcuffRequest', [netId _hostageTaker]] call ExileServer_system_network_send_to; + } + catch { + diag_log format[' Restrain exception: %1',_exception]; + }; + } + else + { + try { + _victim = objectFromnetId _victimnetId; + if (isNull _victim) then + { + throw 'Cannot free unknown victim!'; + }; + if !(_victim getVariable ['ExileIsHandcuffed', false]) then + { + throw 'Cannot free not-handcuffed ones!'; + }; + ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast; + _victim setVariable ['ExileIsHandcuffed', false, true]; + _victim setVariable ['ExileHostageTakernetId', nil]; + _victim setVariable ['ExileHostageTakerUID', nil]; + + [ + '', + { + ExileClientIsHandcuffed = false; + ExileClientHostageTaker = objNull; + if !(ExileClientBreakFreeActionHandle isEqualTo -1) then + { + player removeAction ExileClientBreakFreeActionHandle; + ExileClientBreakFreeActionHandle = -1; + }; + }, + owner _victim, + false + ] call FN_infiSTAR_S; + } + catch { + diag_log format[' UnRestrain exception: %1',_exception]; + }; + }; + }; + if(_option isEqualTo 16)exitWith + { + _k = false; + _inputArray params ['_option','_FOG_VALUE','_OVERCAST_VALUE','_RAIN_VALUE']; + if(_FOG_VALUE != fog)then + { + 0 setFog _FOG_VALUE; + _k = true; + }; + if(_OVERCAST_VALUE != overcast)then + { + 0 setOvercast _OVERCAST_VALUE; + _k = true; + }; + if(_RAIN_VALUE != rain)then + { + 0 setRain _RAIN_VALUE; + _k = true; + }; + if(_k)then{ + simulWeatherSync; + forceWeatherChange; + }; + }; + if(_option isEqualTo 17)exitWith + { + _hour = _inputArray select 1; + _date = date; + _date set[3,_hour]; + setDate _date; + }; + if(_option isEqualTo 18)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _value = _inputArray select 2; + [ + _value, + { + if(_this)then + { + [player,60] call fnc_infiSTAR_setUncon; + } + else + { + _uncon_thread = player getVariable 'uncon_thread'; + if(!isNil'_uncon_thread')then{terminate _uncon_thread;call fn_infiSTAR_EndCustomHint;}; + player setUnconscious false; + player switchMove ''; + }; + }, + (owner _target), + false + ] call FN_infiSTAR_S; + }; + if(_option isEqualTo 19)exitWith + { + _inputArray params[['_option',19],['_netId','']]; + _netId call fn_infiSTAR_revive; + }; + if(_option isEqualTo 20)exitWith + { + _obj = objectFromnetId(_inputArray select 1); + _pos = _inputArray select 2; + if(!isNull _obj)then{_obj setPos _pos;}; + }; + if(_option isEqualTo 21)exitWith + { + _target = objectFromnetId (_inputArray select 1); + + [ + _target, + { + _this spawn { + _this playActionNow 'GestureExileSuicide01'; + uiSleep 4.4; + _sounds = [ + 'A3\Sounds_F\arsenal\weapons\Pistols\Zubr\Zubr_short_01.wss', + 'A3\Sounds_F\arsenal\weapons\Pistols\Zubr\Zubr_short_02.wss', + 'A3\Sounds_F\arsenal\weapons\Pistols\Zubr\Zubr_short_03.wss' + ]; + playSound3D [selectRandom _sounds, _this, true]; + _this setDamage 1; + }; + }, + _target, + false + ] call FN_infiSTAR_S; + }; + if(_option isEqualTo 22)exitWith + { + _target = objectFromnetId (_inputArray select 1); + _MPHitID = _target getVariable ['MPHitID',-3]; + if(_MPHitID > -3)then + { + _target removeMPEventHandler ['MPHitID',_MPHitID]; + _target setVariable ['MPHitID',-3]; + }; + }; + if(_option isEqualTo 5000)exitWith + { + private['_arrayforcrate']; + _target = objectFromnetId (_inputArray select 1); + _selected = _inputArray select 2; + if(isNil'_target')exitWith{}; + if(!isPlayer _target)exitWith{}; + _targetUID = getPlayerUID _target; + _targetID = owner _target; + if(isNil'_targetUID')exitWith{}; + if(_targetUID == '')exitWith{}; + + _pos = AGLToASL(_target modelToWorld [0,1,0.5]); + + + _allSupportBoxes = "+str _allSupportBoxes+"; + _boxarray = _allSupportBoxes select _selected; + if(isNil'_boxarray')exitWith{}; + + _boxname = _boxarray select 0; + _arrayforcrate = _boxarray select 1; + if(isNil'_arrayforcrate')exitWith{}; + if(_arrayforcrate isEqualTo [])exitWith{}; + + _box = 'Exile_Container_SupplyBox' createVehicle _pos; + _box setPosASL _pos; + _box setVelocity [0,0,0]; + _box setVectorUp [0,0,1]; + + clearBackpackCargoGlobal _box; + clearItemCargoGlobal _box; + clearMagazineCargoGlobal _box; + clearWeaponCargoGlobal _box; + + { + if(typename _x == 'ARRAY')then + { + _item = _x select 0; + _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks'; + if(_BackPack)then + { + _box addBackpackCargoGlobal [_item,_x select 1]; + } + else + { + _box addItemCargoGlobal [_item,_x select 1]; + }; + } + else + { + _item = _x; + _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks'; + if(_BackPack)then + { + _box addBackpackCargoGlobal [_item,1]; + } + else + { + _box addItemCargoGlobal [_item,1]; + }; + }; + } forEach _arrayforcrate; + + _box setOwner _targetID; + _txt = format['%1 created for %2(%3)!',_boxname,_target call fnc_get_exileObjName,_targetUID]; + if!(_clientOwnerID isEqualTo _targetID)then + { + [_txt,{systemChat _this;cutText [_this, 'PLAIN'];},_targetID,false] call FN_infiSTAR_S; + }; + }; + if(_option isEqualTo 9876)exitWith + { + _uid = _inputArray select 1; + _name = missionNamespace getVariable [format['"+_name_by_uid+"%1',_uid],'']; + _steamName = _uid call fnc_getSteamNameIfSaved; + _code = { + params['_name','_uid','_steamName']; + _log = format[' %1(%2) SteamName is: %3',_name,_uid,_steamname]; + format['%1 -> %2',_name,_steamname] call FN_SHOW_LOG; + systemchat _log; + diag_log _log; + }; + [[_name,_uid,_steamname],_code,_clientOwnerID,false] call FN_infiSTAR_S; + }; +}; +"+_fnc_AdminReqReal+" = compileFinal ([_fnc_AdminReqReal] call fnc_CompilableString); +"; +diag_log format[' %1 - fnc_AdminReqReal: added !',time]; + +diag_log format[' %1 - fnc_server_handle_pre_mpmessage: adding to main string..',time]; +_asd = _asd + " +diag_log format[' %1 - fnc_server_handle_pre_mpmessage: still compiling...',time]; +"; +diag_log format[' %1 - fnc_server_handle_pre_mpmessage: added !',time]; + +diag_log format[' %1 - adminStartupCode: adding to main string..',time]; +_asd = _asd + " +diag_log format[' %1 - adminStartupCode: still compiling...',time]; +_adminStartupCode = { + _log = format[' %1 - waiting for client to be ready..',time call FN_GET_TIME_TIME];systemchat _log;diag_log _log; + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46 && {alive player}}; + "; if(!_HIDE_FROM_PLAYERS)then{ _asd = _asd + "_log = format[' %1 - client ready.',time call FN_GET_TIME_TIME];systemchat _log;diag_log _log;"; }; _asd = _asd + " + _admins = "+str _admins+"; + _tokenFromServer = _this select 0; + _name = _this select 1; + _puid = _this select 2; + _adminsA = _this select 3; + infiSTAR_Ds = _this select 4; + infiSTAR_ADMINS = _adminsA; + if(!isNil'fn_ACR')exitWith{ + diag_log format[' fn_AdminClientRequest already existing! %1 (kicked to lobby)',fn_ACR]; + (findDisplay 46) closeDisplay 0; + }; + ['fn_ACR',_this select 5] call FN_infiSTAR_F; + "; if(_LogAdminActions)then{ _asd = _asd + " + if(_puid in (_this select 4))then{['fnc_adminLog',''] call FN_infiSTAR_F;}else{['fnc_adminLog','[1234,toArray _this] call fn_ACR;'] call FN_infiSTAR_F;}; + "; }else{ _asd = _asd + " + if(isNil 'fnc_adminLog')then{['fnc_adminLog',''] call FN_infiSTAR_F;}; + "; }; _asd = _asd + " + _MY_PERSONAL_ACCESS_ARRAY = []; + if(_puid in _adminsA)then + { + passwordAdmin = "+str _passwordAdmin+"; + _adminUIDandAccess = "+str _adminUIDandAccess+"; + if(!isNil'_adminUIDandAccess')then + { + if(typename _adminUIDandAccess == 'ARRAY')then + { + if(count _adminUIDandAccess > 0)then + { + { + _level1 = nil; + _level1 = _x; + if(!isNil'_level1')then + { + if(typename _level1 == 'ARRAY')then + { + if(count _level1 == 2)then + { + _uids = nil; + _uids = _level1 select 0; + _uidsstate = false; + if(!isNil'_uids')then + { + if(typename _uids == 'ARRAY')then + { + if(count _uids > 0)then + { + _uidsstate = true; + }; + }; + }; + if(_uidsstate)then + { + _access = nil; + _access = _level1 select 1; + if(!isNil'_access')then + { + if(typename _access == 'ARRAY')then + { + if(count _access > 0)then + { + if(_puid in _uids)then{_MY_PERSONAL_ACCESS_ARRAY = _access;}; + }; + }; + }; + }; + }; + }; + }; + } forEach _adminUIDandAccess; + }; + }; + }; + _ADMINLEVELACCESS = ' + _puid = getPlayerUID player; + if(_puid in '+str (_this select 4)+')exitWith{true}; + if(_this in '+str _MY_PERSONAL_ACCESS_ARRAY+')exitWith{true}; + false + '; + ['ADMINLEVELACCESS',_ADMINLEVELACCESS] call FN_infiSTAR_F; + admin_d0 = {[_this,0] call admin_d0_MASTER;}; + admin_d0_server = {[_this,1] call admin_d0_MASTER;}; + admin_d0_target = {[_this,2] call admin_d0_MASTER;}; + admin_d0_MASTER = { + private['_do','_opt','_targetObj']; + _opt = _this select 1; + if(isNil'_opt')exitWith{}; + _do = _this select 0 select 0; + if(isNil'_do')exitWith{}; + if(typename _do == 'CODE')then{_do = (str(_do)) select [1,((count(str(_do)))-2)];}; + if(typename _do != 'STRING')exitWith{systemChat 'admin_d0 needs STRING code!';}; + if(_opt isEqualTo 2)exitWith + { + _targetObj = _this select 0 select 1; + if(isNil '_targetObj')exitWith{systemChat 'admin_d0_target has no object';}; + if(typename _targetObj != 'OBJECT')exitWith{systemChat 'admin_d0_target has no object';}; + if(isNull _targetObj)exitWith{systemChat 'admin_d0_target has no object';}; + [69,_opt,toArray _do,netId _targetObj] call fn_ACR; + }; + [69,_opt,toArray _do] call fn_ACR; + }; + if(isNil 'AH_HackLogArray')then{AH_HackLogArray = [];}; + if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = [];}; + if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = [];}; + if(isNil 'PVAH_AHTMPBAN')then{PVAH_AHTMPBAN = [];}; + if(isNil 'PVAH_AHTMPBAN_REASON')then{PVAH_AHTMPBAN_REASON = [];}; + "; if(!_HIDE_FROM_PLAYERS)then{ _asd = _asd + " + systemChat format[' %1 - Welcome Admin!',time call FN_GET_TIME_TIME]; + "; }; _asd = _asd + " + }; +}; +diag_log format[' %1 - Thread MAIN: compiling adminStartupCode',time]; +"+_adminStartupCode+" = compile(([_adminStartupCode] call fnc_CompilableString) + infiSTAR_MAIN_CODE); +"; +diag_log format[' %1 - adminStartupCode: added !',time]; +diag_log format[' %1 - Thread #1: Preparing Server Loop #1..',time]; +_asd = _asd + " +[] spawn { +diag_log format[' %1 - Thread #1: Server Loop #1 starting',time]; +_admins = "+str _admins+"; +_DO_THIS_MORE_OFTEN = "" +if(!isNil'runcheck4')then +{ + if!(runcheck4 isEqualType 1)exitWith + { + _log = 'Runcheck failed (4) - HACKED!'; + [player call fnc_get_exileObjName,getPlayerUID player,'BAN',toArray(_log)] call "+_AHKickLog+"; + (findDisplay 46) closeDisplay 0; + }; + runcheck4 = runcheck4 + 1; + if(runcheck4 > 2)then + { + _log = 'Runcheck failed (4)'; + [player call fnc_get_exileObjName,getPlayerUID player,'HLOG_SKICK',toArray(_log)] call "+_AHKickLog+"; + (findDisplay 46) closeDisplay 0; + }; +}; +if(!isNull player)then +{ + if(alive player)then + { + _puid = getPlayerUID player; + if((count _puid) isEqualTo 17)then + { + runcheck4 = 0; + if(getClientStateNumber >= 10 && !isNull findDisplay 46)then + { + _livestarted = player getVariable ['"+_livestarted+"',-1]; + if(_livestarted isEqualTo -1)then + { + if((typeOf player) isEqualTo 'Exile_Unit_Player')then + { + player setVariable ['"+_livestarted+"',time + 80]; + }; + } + else + { + _dif = abs(_livestarted - time); + if((time > _livestarted)||(_dif > 300))then + { + _name = player call fnc_get_exileObjName; + + _tocheck = [1]; + _admins = ""+str _admins+""; + if!(_puid in _admins)then{ + "; if(_UAT)then{ _asd = _asd + " + _tocheck pushBack 2; + "; }; _asd = _asd + " + "; if(_wall_glitch_object)then{ _asd = _asd + " + _tocheck pushBack 3; + "; }; _asd = _asd + " + }; + + _checked = []; + { + if((_x select 0) isEqualTo ' ')then{_checked pushBack 1;}; + if((_x select 0) isEqualTo 'ATP ')then{_checked pushBack 2;}; + if((_x select 0) isEqualTo 'ANTI GLITCH')then{_checked pushBack 3;}; + } forEach diag_activeSQFScripts; + { + if!(_x in _checked)then + { + _log = format['Runcheck failed (%1)',_x]; + [_name,_puid,'HLOG_SKICK',toArray(_log)] call "+_AHKickLog+"; + (findDisplay 46) closeDisplay 0; + }; + } forEach _tocheck; + }; + }; + }; + if(isServer)then + { + player_is_server = 'Fake isServer';publicVariableServer 'player_is_server'; + diag_log ' kicked to lobby #3'; + (findDisplay 46) closeDisplay 0; + }; + + + { + _var = missionNamespace getVariable _x; + if(!isNil '_var')then + { + if!(_var isEqualType 0)then + { + player_broke_var = 'broken_variable';publicVariableServer 'player_broke_var'; + diag_log ' kicked to lobby #4'; + (findDisplay 46) closeDisplay 0; + }; + }; + } forEach ['"+_AH_RunCheckENDVAR+"','"+_AH_RunCheck+"']; + if((isNil'"+_AH_RunCheckENDVAR+"')&&(!isNil'"+_AH_RunCheck+"'))then + { + if(!isNil'"+_runcheck_thread+"')then + { + if((typeName "+_runcheck_thread+") isEqualTo 'SCRIPT')exitWith + { + if((str "+_runcheck_thread+") isEqualTo '')exitWith + { + broken_rc_1 = 'runcheck_thread_1';publicVariableServer 'broken_rc_1'; + diag_log ' kicked to lobby #5.1'; + (findDisplay 46) closeDisplay 0; + }; + terminate "+_runcheck_thread+";"+_runcheck_thread+"=nil; + } + else + { + broken_rc_2 = 'runcheck_thread_2';publicVariableServer 'broken_rc_2'; + diag_log ' kicked to lobby #5.2'; + (findDisplay 46) closeDisplay 0; + }; + }; + "+_runcheck_thread+" = [] spawn { + _temptime= time + 30; + waitUntil {((!isNil'"+_AH_RunCheckENDVAR+"')||(time > _temptime))}; + if(isNil'"+_AH_RunCheckENDVAR+"')then{diag_log ' kicked to lobby #6';(findDisplay 46) closeDisplay 0;}; + }; + }; + }; + }; +}; +""; +_zero = "" +_tmp=""+str FN_infiSTAR_F+""; +if(isNil 'FN_infiSTAR_F')then{FN_infiSTAR_F=_tmp;}; +if(str FN_infiSTAR_F != str _tmp)then{ FN_infiSTAR_F__MODIFIED = time;publicVariableServer'FN_infiSTAR_F__MODIFIED';(findDisplay 46)closeDisplay 0; }; +_tmp=""+str fnc_CompilableString+""; +if(isNil 'fnc_CompilableString')then{fnc_CompilableString=_tmp;}; +if(str fnc_CompilableString != str _tmp)then{ fnc_CompilableString__MODIFIED = time;publicVariableServer'fnc_CompilableString__MODIFIED';(findDisplay 46)closeDisplay 0; }; +_tmp=""+str FN_infiSTAR_CS+""; +if(isNil 'FN_infiSTAR_CS')then{FN_infiSTAR_CS=_tmp;}; +if(str FN_infiSTAR_CS != str _tmp)then{ FN_infiSTAR_CS__MODIFIED = time;publicVariableServer'FN_infiSTAR_CS__MODIFIED';(findDisplay 46)closeDisplay 0; }; +_tmp=""+str fnc_CompilableString+""; +if(isNil 'fnc_CompilableString')then{fnc_CompilableString=_tmp;}; +if(str fnc_CompilableString != str _tmp)then{ fnc_CompilableString__MODIFIED = time;publicVariableServer'fnc_CompilableString__MODIFIED';(findDisplay 46)closeDisplay 0; }; +_tmp=""+str fnc_get_exileObjName+""; +if(isNil 'fnc_get_exileObjName')then{fnc_get_exileObjName=_tmp;}; +if(str fnc_get_exileObjName != str _tmp)then{ fnc_get_exileObjName = time;publicVariableServer'fnc_get_exileObjName';(findDisplay 46)closeDisplay 0; }; +""; +[compile _zero,{[] call _this},-2,format['abc%1',round(random 9999)]] call FN_infiSTAR_S; +_DO_THIS_MORE_OFTEN = (_DO_THIS_MORE_OFTEN + _zero); +_DO_THIS_MORE_OFTEN = compile _DO_THIS_MORE_OFTEN; +"; if(_check_steam_ban && _armalog)then{ _asd = _asd + " +FN_CHECK_STEAMBAN = compileFinal "" + params['_name','_uid']; + _res = [format['http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=B0ABFD9E85EED86FB2A31BCB68940C6B&steamids=%1',_uid]] call FN_ARMA_FETCHDATA; + if(_res isEqualTo '')then + { + ['HLOG_VAC',format['%1(%2) ERROR - could not resolve VAC BAN STATE', _name, _uid]] call FNC_A3_CUSTOMLOG; + } + else + { + _res = toArray _res; + _res = _res - [9]; + _res = _res - [10]; + _res = _res - [13]; + _res = _res - [32]; + _res = toString _res; + _rescount = count _res; + _res = _res select [(_res find 'SteamId')-1,_rescount]; + _res = _res select [0,_res find '}']; + _parts = _res splitString ','; + _res = _res select [_res find 'VACBanned',_rescount]; + if!(_parts isEqualTo [])then + { + _banned = false; + { + _isString = format['%1',_parts select (_forEachIndex+1)]; + _shouldBeString = format['%1:false',str _x]; + if!(_isString isEqualTo _shouldBeString)then + { + "; if(_ban_for_steam_ban)then{ _asd = _asd + " + _log = format['Steam known Hacker BANNED: %1',_res]; + [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + "; }else{ _asd = _asd + " + _log = format['Steam known Hacker just joined the server: %1',_res]; + [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + "; }; _asd = _asd + " + _banned = true; + }; + if(_banned)exitWith{}; + } forEach ['CommunityBanned','VACBanned']; + if(_banned)exitWith{}; + + { + _isString = format['%1',_parts select (_forEachIndex+3)]; + _shouldBeString = format['%1:0',str _x]; + if!(_isString isEqualTo _shouldBeString)then + { + "; if(_ban_for_steam_ban)then{ _asd = _asd + " + _log = format['Steam known Hacker BANNED: %1',_res]; + [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + "; }else{ _asd = _asd + " + _log = format['Steam known Hacker just joined the server: %1',_res]; + [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + "; }; _asd = _asd + " + _banned = true; + }; + if(_banned)exitWith{}; + } forEach ['NumberOfVACBans','DaysSinceLastBan','NumberOfGameBans']; + }; + }; +""; +"; }; _asd = _asd + " + + +_fn_playerConnected = { + params['_id','_uid','_name','_jip','_owner']; + if(count _uid < 17)then + { + _log = format['Connected (UID?): %1(%2) Owner: %3',_name,_uid,_owner]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; + } + else + { + _token = [_uid] call "+_server_setTokenR+"; + missionNamespace setVariable [format['"+_name_by_uid+"%1',_uid],_name]; + missionNamespace setVariable [format['"+_owner_by_uid+"%1',_uid],_owner]; + missionNamespace setVariable [format['"+_uid_by_owner+"%1',_owner],_uid]; + missionNamespace setVariable [format['NAME_BY_UID_%1',_uid],_name]; + missionNamespace setVariable [format['UID_BY_OWNER_%1',_owner],_uid]; + + _admins = "+str _admins+";_admin = _uid in _admins; + if(!_admin)then{ + "; if(_USE_DATABASE_WHITELIST)then{ _asd = _asd + " + _kick = true; + _notwhitelisted = format['getAccountWhitelisted:%1', _uid] call ExileServer_system_database_query_selectSingle; + _notwhitelisted params ['_whiteliststate']; + if(_whiteliststate isEqualTo 1)then{ _kick = false; }; + if(_kick)then{ [_name,_uid,_owner,format['NOT WHITELISTED (DB STATE: %1)',_notwhitelisted]] call FNC_INFISERVERKICK; }; + "; }; _asd = _asd + " + "; if(_USE_UID_WHITELIST)then{ _asd = _asd + " + if!(_uid in "+str _UID_WHITELIST+")exitWith{ + [_name,_uid,_owner,'NOT WHITELISTED'] call FNC_INFISERVERKICK; + }; + "; }; _asd = _asd + " + }; + + + _ds = "+str _devs+";_d = _uid in _ds; + _isNormal = true;if(_admin)then{_isNormal = false;if!(_uid in "+_adminsA+")then{_isNormal = true;};}; + if(_admin)then + { + ['',fnc_debugbox_new,_owner,false] call FN_infiSTAR_S; + if(!_isNormal)then + { + if(!isNil'infiSTAR_TM_fnc_full')then + { + _accessuids = if(isNil'fn_infiSTAR_TM_GetCfgSettings')then{[]}else{['AccessUIDs',[]] call fn_infiSTAR_TM_GetCfgSettings}; + if(_uid in _accessuids)then{[infiSTAR_TM_fnc_full,{ [] spawn _this; },_owner,false] call FN_infiSTAR_S;}; + }; + if(_d)exitWith{}; +"; if(_useAdminNameTag)then{ _asd = _asd + " + _adminTag = missionNamespace getVariable [('admintag_'+_uid),'']; + if!(_adminTag isEqualTo '')then + { + _adminTagCnt = count _adminTag; + _nameLength = count _name; + + ['TEST',_name select [0,_adminTagCnt]] call FNC_A3_CUSTOMLOG; + ['TEST',_name select [_nameLength - _adminTagCnt]] call FNC_A3_CUSTOMLOG; + + + if(!((_name select [0,_adminTagCnt]) isEqualTo _adminTag) && !((_name select [_nameLength - _adminTagCnt]) isEqualTo _adminTag))then + { + _isNormal = true; + [ + [_name,_adminTag], + { + params['_name','_adminTag']; + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && !isNil'ExileSystemThreadID' && {alive player}}; + disableSerialization; + _display = findDisplay 46; + + _ctrlText = ''; + _ctrlText = _ctrlText + 'Hey Admin!'; + _ctrlText = _ctrlText + '

'; + _ctrlText = _ctrlText + 'in order to get Admin abilities you will have to change your name to either one of'; + _ctrlText = _ctrlText + '

'; + _ctrlText = _ctrlText + ''+_adminTag+' '+_name+''; + _ctrlText = _ctrlText + '
'; + _ctrlText = _ctrlText + ''+_name+' '+_adminTag+''; + _ctrlText = _ctrlText + '
'; + + ctrlDelete(_display displayCtrl 7337); + _ctrl = _display ctrlCreate ['RscStructuredText', 7337]; + _ctrl ctrlSetPosition [safeZoneX + .25,safeZoneY + .25,safeZoneW / 3.5,safeZoneH / 3.5]; + _ctrl ctrlSetBackgroundColor [0,0,0,0.6]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetFade 1; + _ctrl ctrlCommit 35; + _ctrl ctrlSetStructuredText parseText _ctrlText; + } + ] remoteExecCall ['spawn',_owner,false]; + }; + }; +"; }; _asd = _asd + " + }; + }; + [_token,_owner,_name,_uid,_admins,_ds,_admin,_isNormal] call "+_fnc_l_on_c+"; + [_name,_uid,_owner,_admin] call "+_fnc_infiSTAR_PlayerLog+"; + + + if(isNil {missionNamespace getVariable format['isKnownAccount_%1',_uid]})then + { + _isKnownAccount = format['isKnownAccount:%1', _uid] call ExileServer_system_database_query_selectSingleField; + if(!_isKnownAccount)then + { + _log = format ['%1(%2)',_name,_uid]; + ['NEW_PLAYER',_log] call FNC_A3_CUSTOMLOG; + + "; if(_USE_ANNOUNCE_NEW_PLAYER)then{ _asd = _asd + " + format['New Player: %1',_name] remoteExecCall ['systemChat',-2,false]; + "; }; _asd = _asd + " + }; + missionNamespace getVariable [format['isKnownAccount_%1',_uid],_isKnownAccount]; + }; + + + +"; if(_USE_GET_TOTAL_CONNECTIONS)then{ _asd = _asd + " + _totalCon = missionNamespace getVariable [format['total_connections_%1',_uid],0]; + _totalCon = _totalCon + 1; + missionNamespace setVariable [format['total_connections_%1',_uid],_totalCon]; + if(_totalCon isEqualTo 1)then + { + _parameters = format['getTotalConnections:%1', _uid]; + _query = [0, ExileServerDatabaseSessionId, _parameters] joinString ':'; + _result = _query call FN_CALL_ExtDB; + if!(_result isEqualTo '')then + { + _queryRes = (parseSimpleArray _result) select 1 select 0; + _firstCon = _queryRes param [0,[],[[]]]; + _lastCon = _queryRes param [1,[],[[]]]; + _totalCon = _queryRes param [2,0,[0]]; + missionNamespace setVariable [format['total_connections_%1',_uid],_totalCon]; + _log = format['Connected: %1(%2) Owner: %3, first connected: %4, last connected: %5, connections: %6',_name,_uid,_owner,_firstCon,_lastCon,_totalCon]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; + }; + } + else + { + _log = format['Connected: %1(%2) Owner: %3, connections: %4',_name,_uid,_owner,_totalCon]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; + }; +"; }else{ _asd = _asd + " + _log = format['Connected: %1(%2) Owner: %3',_name,_uid,_owner]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; +"; }; _asd = _asd + " + + _log = format['TOKEN [%1] FOR %2(%3) OWNER: %4, ID: %5, JIP: %6',_token,_name,_uid,_owner,_id,_jip]; + ['TOKENLOG',_log] call FNC_A3_CUSTOMLOG; + }; +}; +"+_fn_playerConnected+" = compileFinal ([_fn_playerConnected] call fnc_CompilableString); +infiSTAR_PlayerConnected_id = addMissionEventHandler ['PlayerConnected', { call "+_fn_playerConnected+"; }]; + + +fn_playerDisconnected = compileFinal "" +params['_id','_uid','_name','_jip','_owner']; +if(34 in (toArray _name))exitWith{true}; +if(count _uid < 17)then +{ + _log = format['Disconnected: %1(%2) Owner: %3',_name,_uid,_owner]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; +} +else +{ + _steamName = _uid call fnc_getSteamNameIfSaved; + _log = format['Disconnected: %1(%2) Owner: %3, SteamName: %4',_name,_uid,_owner,_steamName]; + ['CONNECTLOG',_log] call FN_ARMA_LOG; +}; +_varnameKickThread = format['kickThread_%1',_uid]; +_kickThread = missionNamespace getVariable _varnameKickThread; +if(!isNil'_kickThread')then{terminate _kickThread;missionNamespace setVariable [_varnameKickThread,nil];}; +""; +infiSTAR_PlayerDisconnected_id = addMissionEventHandler ['PlayerDisconnected', { call fn_playerDisconnected; }]; + + +"; if(_UVC)then{ _asd = _asd + " +_fnc_check_type_allowed = { + params[['_type','']]; + _return = true; + _typeLow = toLower _type; +"; if(_VehicleWhiteList_check)then{ _asd = _asd + " + if!(_typeLow in "+str _VehicleWhiteList+")then{if!(_typeLow select [0,5] isEqualTo 'exile')then{_return = false;};}; +"; }; _asd = _asd + " +"; if(_ForbiddenVehicles_check)then{ _asd = _asd + " + if(_typeLow in "+str _ForbiddenVehicles+")then{_return = false;}; +"; }; _asd = _asd + " + _return +}; +"+_fnc_check_type_allowed+" = compileFinal ([_fnc_check_type_allowed] call fnc_CompilableString); +_fnc_remove_badvehicle = +{ + params[['_veh',objNull],['_type',''],['_crew',[]],['_ownerUID','']]; + _infiSTAR_created = _veh getVariable ['infiSTAR_created',[]]; + if(_infiSTAR_created isEqualTo [])then + { + if(_crew isEqualTo [])then + { + _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh]; + ['SERVER',_ownerUID,'HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + } + else + { + _logged = []; + { + _xuid = getPlayerUID _x; + if!(_xuid isEqualTo '')then + { + _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh]; + [_x call fnc_get_exileObjName,_xuid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + _logged pushBack _xuid; + }; + } forEach _crew; + if!(_ownerUID in _logged)then + { + _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh]; + ['SERVER',_ownerUID,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + }; + } + else + { + _infiSTAR_created params [['_clientName',''],['_clientUID','']]; + _log = format['BadVehicle: %1 :: @%2 %3 spawned by admin %4(%5)',_type,mapGridPosition _veh,getPos _veh,_clientName,_clientUID]; + ['SERVER',_ownerUID,'HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + _veh call fnc_deleteObject; +}; +"+_fnc_remove_badvehicle+" = compileFinal ([_fnc_remove_badvehicle] call fnc_CompilableString); +_fnc_vehicle_check = { + params[['_veh',objNull]]; + if(_veh getVariable ['"+_vehicle_needs_check+"',true])then + { + _veh setVariable ['"+_vehicle_needs_check+"',false]; + + _type = typeOf _veh; + if(!(_veh isKindOf 'ParachuteBase')&&(_type find 'ejection_vest' isEqualTo -1)&&(_type find '_seat' isEqualTo -1))then + { + _netIdobj = netId _veh; + _ownerIdobj = _netIdobj select [0,_netIdobj find ':']; + _ownerIdobj = parseNumber _ownerIdobj; + + _uid = missionNamespace getVariable [format['"+_uid_by_owner+"%1',_ownerIdobj],'']; + if(!(_uid isEqualTo '')&&(_ownerIdobj > 2)&&!(_type in "+str _LocalWhitelist+"))then + { + _name = missionNamespace getVariable [format['"+_name_by_uid+"%1',_uid],'']; + + _log = format['Locally created Vehicle found: %1 (%2) :: @%3 %4',_type,_netIdobj,mapGridPosition _veh,getPos _veh]; + [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + + _veh setDamage 1; + } + else + { + _return = _type call "+_fnc_check_type_allowed+"; + if(!_return)then + { + [_veh,_type,crew _veh,_uid] call "+_fnc_remove_badvehicle+"; + _veh setDamage 1; + }; + }; + }; + }; +}; +"+_fnc_vehicle_check+" = compileFinal ([_fnc_vehicle_check] call fnc_CompilableString); +"; }; _asd = _asd + " + + +_fn_2 = { + +{ + if(isPlayer _x)then + { + _uid = getPlayerUID _x; + if(_uid isEqualTo '')exitWith{}; + _admin = _uid in _admins; + + _name = _x call fnc_get_exileObjName; + _netId = netId _x; + _xtype = typeOf _x; + _owner = owner _x; + + "; if(_armalog)then{ _asd = _asd + " + if(_uid call fn_infiSTAR_checkGlobalBanSkip)then{[_name,_uid,_owner] call fn_infiSTAR_checkGlobalBanState;}; + "; }; _asd = _asd + " + + _x setVariable ['ExileOwnerUID',_uid]; + missionNamespace setVariable [format['object_by_uid_%1',_uid],_x]; + missionNamespace setVariable [format['object_by_owner_%1',_owner],_x]; + + _xo = _x; + _loggednetid = _xo getVariable ['netId','']; + if!(_loggednetid isEqualTo _netId)then + { + _xo setVariable ['netId',_netId]; + _log = format['%1(%2) - %3, %4 - %5 - %6',_name,_uid,_xo,_xtype,_netId,_owner]; + ['netids',_log] call FNC_A3_CUSTOMLOG; + }; + if!(_xtype isEqualTo 'Exile_Unit_GhostPlayer')then + { + if!(_netId select [0,2] isEqualTo '2:')then + { + if((_uid select [0,2]) isEqualTo 'HC')exitWith{}; + _log = format['WRONG PLAYER-OBJECT: %1 with netId %2 @%3',_xtype,_netId,getPos _xo]; + [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + + _objectOwner__ORIGINAL_OWNER_ID = _netId select [0,_netId find ':']; + _objectOwner__ORIGINAL_OWNER_ID = parseNumber _objectOwner__ORIGINAL_OWNER_ID; + + _objectOwnerUid = missionNamespace getVariable [format['"+_uid_by_owner+"%1',_objectOwner__ORIGINAL_OWNER_ID],_owner]; + _objectOwneName = missionNamespace getVariable [format['"+_name_by_uid+"%1',_objectOwnerUid],'']; + + [_objectOwneName,_objectOwnerUid,_objectOwner__ORIGINAL_OWNER_ID,_log] call FNC_INFISERVERKICK; + }; + }; + + + "; if(_GodModeCheck || _MPH)then{ _asd = _asd + " + if(!_admin)then + { + _MPHitID = _xo getVariable ['MPHitID',-3]; + if(_MPHitID isEqualTo -3)then + { + _id = _xo addMPEventHandler ['MPHit', { _this call fnc_mphit_handler }]; + _xo setVariable ['MPHitID',_id]; + }; + }; + "; }; _asd = _asd + " + + "; if(_fix_uniform_and_vest)then{ _asd = _asd + " + [uniform _xo,vest _xo] remoteExecCall ['fnc_check_uniform_n_vest', _xo]; + "; }; _asd = _asd + " + + _grp = group _xo; + _groupID = groupID _grp; + if!(_grp isEqualTo (_xo getVariable ['ExileGroup',grpNull]))then + { + _xo setVariable ['ExileGroup',_grp]; + _lgroupname = toLower _groupID; + if({(_lgroupname find _x != -1)} count "+str _badGroupNames+" > 0)exitWith{ + _grp setGroupIdGlobal [format['GRP:%1',allGroups find _grp]]; + }; + }; + + + + _xRespect = nil; + _xRespect = _xo getVariable 'ExileScore'; + if(!isNil'_xRespect')then + { + _xRespectCheck = _xo getVariable 'ExileScoreCheck'; + if(isNil'_xRespectCheck')exitWith + { + _xo setVariable ['ExileScoreCheck', _xRespect]; + _xo setVariable ['ExileScore', _xRespect, true]; + }; + if!(_xRespectCheck isEqualTo _xRespect)then + { + "; if(_checkRespectIncrease)then{ _asd = _asd + " + _increasedBy = _xRespect - _xRespectCheck; + if(_increasedBy > "+str _LogRespectIncrease+")then + { + _log = format['Respect increased by %1',_increasedBy]; + if(_increasedBy > "+str _BanRespectIncrease+")then + { + [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + } + else + { + [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + }; + "; }; _asd = _asd + " + + _xo setVariable ['ExileScoreCheck', _xRespect]; + _xo setVariable ['ExileScore', _xRespect, true]; + }; + }; + + + "; if(_checkPopTabIncrease)then{ _asd = _asd + " + _playerMoney = nil; + _playerMoney = _xo getVariable 'ExileMoney'; + + _lockerMoney = nil; + _lockerMoney = _xo getVariable 'ExileLocker'; + if(!isNil'_playerMoney' && !isNil'_lockerMoney')then + { + _poptabsplayer = _playerMoney + _lockerMoney; + _exilePopTabsCheck = _xo getVariable 'ExilePopTabsCheck'; + if(isNil'_exilePopTabsCheck')exitWith + { + _xo setVariable ['ExilePopTabsCheck', _poptabsplayer]; + _xo setVariable ['ExileMoney', _playerMoney, true]; + _xo setVariable ['ExileLocker', _lockerMoney, true]; + }; + if!(_exilePopTabsCheck isEqualTo _poptabsplayer)then + { + _increasedBy = _poptabsplayer - _exilePopTabsCheck; + if(_increasedBy > "+str _LogPopTabIncrease+")then + { + _log = format['Overall PopTabs increased by %1',_increasedBy]; + if(_increasedBy > "+str _BanPopTabIncrease+")then + { + [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + } + else + { + [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + }; + _xo setVariable ['ExilePopTabsCheck', _poptabsplayer]; + _xo setVariable ['ExileMoney', _playerMoney, true]; + _xo setVariable ['ExileLocker', _lockerMoney, true]; + }; + }; + "; }; _asd = _asd + " + + + + "; if(_UVC)then{ _asd = _asd + " + _veh = vehicle _xo; + if!(_xo isEqualTo _veh)then{_veh call "+_fnc_vehicle_check+";}; + "; }; _asd = _asd + " + + + _playerobj_check_loops1 = _xo getVariable ['"+_playerobj_check_loops1+"',0]; + _playerobj_check_loops1 = _playerobj_check_loops1 + 1; + _xo setVariable ['"+_playerobj_check_loops1+"',_playerobj_check_loops1]; + if(_xtype isEqualTo 'Exile_Unit_Player')then + { + "; if(_PlayerScoreList)then{ _asd = _asd + " + _kdstats = missionNamespace getVariable [format['kdstats_%1',_uid],[0,0]]; + + _pKills = _xo getVariable ['ExileKills', -1]; + _pDeaths = _xo getVariable ['ExileDeaths', -1]; + + _kdstats_new = [_pKills, _pDeaths]; + if!(_kdstats isEqualTo _kdstats_new)then{ missionNamespace setVariable [format['kdstats_%1',_uid],_kdstats_new,true]; }; + "; }; _asd = _asd + " + + if(_playerobj_check_loops1 > 1)then + { + if(_xo getVariable ['"+_rcheckserver+"',0] isEqualTo 0)then + { + _log = format['Player Clientside AntiHack not loaded or stopped! %1 @%2 %3',_xtype,mapGridPosition _xo,getPos _xo]; + [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + if(_playerobj_check_loops1 > 3)then + { + _xo setVariable ['"+_rcheckserver+"',0]; + _xo setVariable ["+str _rcheckclient+",false,true]; + _xo setVariable ['"+_playerobj_check_loops1+"',0]; + }; + }; + + _playerobj_check_loops2 = _xo getVariable ['"+_playerobj_check_loops2+"',0]; + _playerobj_check_loops2 = _playerobj_check_loops2 + 1; + _xo setVariable ['"+_playerobj_check_loops2+"',_playerobj_check_loops2]; + if(_playerobj_check_loops2 > 4)then + { + _rating = rating _xo; + if(_rating < 500000)then + { + if(_rating isEqualTo 0)exitWith{}; + _log = format['Player Low Rating! %1 - %2 - @%3 %4',_rating,_xtype,mapGridPosition _xo,getPos _xo]; + [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + _xo setVariable ['"+_playerobj_check_loops2+"',0]; + }; + + "; if(_INVISIBLE_PLAYER_check)then{ _asd = _asd + " + if(!_admin)then + { + if(isObjectHidden _xo)then + { + _varname = format['foundHidden_%1',_uid]; + _foundHidden = missionNamespace getVariable [_varname,0]; + _foundHidden = _foundHidden + 1; + missionNamespace setVariable [_varname,_foundHidden]; + if(_foundHidden > 1)then + { + _log = format['INVISIBLE PLAYER-OBJECT @%1 %2',mapGridPosition _xo,getPos _xo]; + [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + } + else + { + _log = format['INVISIBLE PLAYER-OBJECT @%1 %2',mapGridPosition _xo,getPos _xo]; + [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + + _xo hideObjectGlobal false; + [_xo,{ _this hideObject true; },_xo,false] call FN_infiSTAR_S; + }; + }; + }; + "; }; _asd = _asd + " + + } + else + { + if((_uid select [0,2]) isEqualTo 'HC')exitWith{}; + if(_playerobj_check_loops1 > 5)then + { + _log = format['Player is %1 for too long - either not correctly loaded in or trying to run around as a ghost (invisible player object) @%2 %3',_xtype,mapGridPosition _xo,getPos _xo]; + [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + + _exileDatabaseID = _xo getVariable ['ExileDatabaseID', '']; + if!(_exileDatabaseID isEqualTo '')then + { + _log = format['WRONG PLAYER-TYPE: %1 should be Exile_Unit_Player @%2 %3',_xtype,mapGridPosition _xo,getPos _xo]; + [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+"; + }; + }; + }; +} forEach allPlayers; + +"; if(_CLM)then{ _asd = _asd + " +_code = { + params['_admins','_serverknownmarkers']; + _puid = getPlayerUID player; + if(isNil'ExileClientPartyMapMarkers')then{ExileClientPartyMapMarkers=[];}; + if(typeName ExileClientPartyMapMarkers != 'ARRAY')then + { + _log = format['ExileClientPartyMapMarkers TYPE CHANGED: %1 - %2',typeName ExileClientPartyMapMarkers,ExileClientPartyMapMarkers]; + [player call fnc_get_exileObjName,_puid,'BAN',toArray(_log)] call "+_AHKickLog+"; + }; + if!(_puid in _admins)then + { + { + _marker = _x; + if!(_marker select [0,13] isEqualTo '_USER_DEFINED')then + { + if!(_marker in _serverknownmarkers)then + { + if(_marker in ExileClientPartyMapMarkers)exitWith{}; + _lowMarker = toLower _marker; + _do = true; + {if(_lowMarker find _x > -1)exitWith{_do = false;};} forEach "+str _allowedMarkers+"; + if(_do)then + { + _log = format['LOCALMARKER: [%1] | TEXT: [%2] | TYPE: [%3] | POS: [%4]',_marker,markerText _marker,markerType _marker,markerPos _marker]; + [player call fnc_get_exileObjName,_puid,'HLOG',toArray(_log)] call "+_AHKickLog+"; + deleteMarker _marker; + deleteMarkerLocal _marker; + }; + }; + }; + } forEach allMapMarkers; + }; +}; +[[_admins,allMapMarkers],_code] remoteExecCall ['spawn',-2,false]; +"; }; _asd = _asd + " +}; + + +_fnc_RandomGen = +{ + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9']; + _gen = _arr select (floor (random 25)); + for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));}; + _gen +}; +_antiantihack_rndvar = call _fnc_RandomGen; +_fn_3 = { + _last_antiantihack_rndvar = _antiantihack_rndvar; + _antiantihack_rndvar = call _fnc_RandomGen; + _fn_antiantihack = "" + missionNamespace setVariable ['""+_antiantihack_rndvar+""',nil]; + if(isNil'""+_antiantihack_rndvar+""')then + { + _bis_fnc_diagkey = 'bis_fnc_diagkey'; + _bla = 'waitUntil{'; + _diag = 'diag'; + _AntiHack = 'AntiHack'; + _PV_ = 'PV_'; + _infiSTAR = 'infiSTAR'; + _STAR = 'STAR'; + _infi = 'infi'; + _closeDisplay = 'closeDisplay'; + _EndMission = 'EndMission'; + _GetPlayerUID = 'GetPlayerUID'; + if(!isNull player)then{_uid = getPlayerUID player;_puid = getPlayerUID player;}; + missionNamespace setVariable ['""+_antiantihack_rndvar+""',-4]; + }; + ""; + ['',_fn_antiantihack,-2,false] call FN_infiSTAR_S; + ['',compile (""if(isNil '""+_antiantihack_rndvar+""')then{diag_log ' kicked to lobby #12';(findDisplay 46)closeDisplay 0;};"")] remoteExecCall ['spawn',-2,false]; +}; + + + +"; if(_USE_RESTART_TIMER)then{ _asd = _asd + " +_fnc_send_restartannounce = { + [ + _this, + { + params['_title','_msg']; + ['ErrorTitleAndText',[_title,_msg]] call ExileClient_gui_toaster_addTemplateToast; + playSound "+str _RESTART_WARNING_SOUND+"; + }, + -2, + false + ] call FN_infiSTAR_S; +}; +_fnc_send_restartannounce_persistent = { + if(isNil'fn_restartannounce_persis')then + { + fn_restartannounce_persis = { + if(!isNil'RESTART_ANNOUNCEMENT_THREAD')then{terminate RESTART_ANNOUNCEMENT_THREAD;RESTART_ANNOUNCEMENT_THREAD=nil;}; + RESTART_ANNOUNCEMENT_THREAD = _this spawn { + _timer = diag_tickTime + _this; + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46}; + disableSerialization; + while {true} do + { + ctrlDelete ((findDisplay 46) displayCtrl 3307152); + _ctrl = (findDisplay 46) ctrlCreate ['RscStructuredText', 3307152]; + _ctrl ctrlSetPosition [safezoneX + (safeZoneW / 2) - ((safeZoneW / 3.7)/2),safeZoneY + 0.02,(safeZoneW / 3.7),0.05]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetStructuredText parseText format['SERVER RESTART IN: %1',(round(_timer - diag_tickTime)) call FN_GET_TIME_TIME]; + uiSleep 0.1; + }; + }; + }; + publicVariable 'fn_restartannounce_persis'; + }; + _this remoteExecCall ['fn_restartannounce_persis',-2,'restart_timer_jip']; +}; +_fnc_shutdown_server = { + _log = '[ENDING SERVER] kicking players';['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + { _x call ExileServer_object_player_database_update; } forEach allPlayers; + uiSleep 3; + + + for '_i' from 0 to 3 do { { format['#kick %1',owner _x] spawn fn_serverCommand; } forEach allPlayers; }; + uiSleep 3; + + _log = format['[ENDING SERVER] USE_SHUTDOWN = true; in your EXILE_AHAT_CONFIG.hpp',''];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + _log = format['[ENDING SERVER] server start: %1',serverStartTime];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + _log = format['[ENDING SERVER] server end: %1',call fnc_get_local_servertime];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + _log = format['[ENDING SERVER] arma3server.exe runtime: %1 (%2)',diag_tickTime call FN_GET_TIME_TIME,diag_tickTime];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + _log = format['[ENDING SERVER] mission runtime: %1 (%2)',time call FN_GET_TIME_TIME,time];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + _log = format['[ENDING SERVER] postInit runtime: %1 (%2)',serverTime call FN_GET_TIME_TIME,serverTime];['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + + + "+str _SERVER_END_FUNCTION+" spawn fn_serverCommand; + '#unlock' spawn fn_serverCommand; +}; + +"; if(_USE_RESTART_TIME_IN_M)then{ _asd = _asd + " +_RESTART_TIME_IN_S = ("+str _RESTART_TIME_IN_M+") * 60; +"; }; _asd = _asd + " +_announce_restarts = "+str _RESTART_IN_X_ARRAY+"; +_lockedServer = false; +_fn_4 = { +"; if(_USE_RESTART_TIME_IN_M)then{ _asd = _asd + " + _serverTimeLeft = _RESTART_TIME_IN_S - "+_TIME_FUNCTION_USED+"; + if(_serverTimeLeft <= "+str _LOCK_SECONDS_BEFORE_SHUTDOWN+")then + { + if(_lockedServer)exitWith{}; + _lockedServer = true; + + _log = '[ENDING SERVER] locking server';['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + '#lock' spawn fn_serverCommand; + }; + + if(_serverTimeLeft < 900)then + { + (ceil _serverTimeLeft) call _fnc_send_restartannounce_persistent; + + _serverTimeLeftMin = ceil(_serverTimeLeft / 60); + if(_serverTimeLeftMin in _announce_restarts)then + { + _announce_restarts = _announce_restarts - [_serverTimeLeftMin]; + ['SERVER RESTART IN:',format['~ %1 MINS',_serverTimeLeftMin]] call _fnc_send_restartannounce; + }; + }; + "; if(_USE_SHUTDOWN)then{ _asd = _asd + " + if(_serverTimeLeft <= 0)then{call _fnc_shutdown_server;}; + "; }; _asd = _asd + " +"; }; _asd = _asd + " + +"; if(_USE_RESTART_TIMES)then{ _asd = _asd + " + _cTime = call fnc_get_local_servertime; + _cTime params [ + ['_cYear',1], + ['_cMonth',1], + ['_cDay',1], + ['_cHour',1], + ['_cMinute',1] + ]; + if(_cYear isEqualTo 1)then + { + if(isNil'fetchTimeIssueLogged')then + { + fetchTimeIssueLogged = true; + + _log = format['CAN NOT FETCH LOCAL TIME FROM ExtDB - %1',_cTime]; + ['ERROR',_log] call FNC_A3_CUSTOMLOG; + }; + } + else + { + _cHourInMin = if(_cHour > 0)then{_cHour * 60}else{24 * 60}; + _minNow = _cHourInMin + _cMinute; + + if(_minNow <= "+str _LOCK_MIN_BEFORE_SHUTDOWN+")then + { + if(_lockedServer)exitWith{}; + _lockedServer = true; + + _log = '[ENDING SERVER] locking server';['SERVER_INFO',_log] call FNC_A3_CUSTOMLOG; + '#lock' spawn fn_serverCommand; + }; + + { + _curRestartTime = _x; + "; if(_USE_SHUTDOWN)then{ _asd = _asd + " + if (_minNow isEqualTo _curRestartTime) exitWith { call _fnc_shutdown_server; }; + "; }; _asd = _asd + " + + { + if(_minNow isEqualTo (_curRestartTime-_x))exitWith + { + _announce_restarts = _announce_restarts - [_x]; + ['SERVER RESTART IN:',format['~ %1 MINS',_x]] call _fnc_send_restartannounce; + }; + } forEach _announce_restarts; + } forEach "+str _RESTART_TIMES+"; + }; +"; }; _asd = _asd + " +}; +"; }; _asd = _asd + " + + + + + + + + + + + + + + + + + + + +[] spawn {_WW = compile toString[99,116,114,108,72,84,77,76,76,111,97,100,101,100,32,95,104];_FF = compile toString[95,104,32,104,116,109,108,76,111,97,100,32,95,108];waitUntil{time > 30};disableSerialization;_idd=24;waitUntil {createDialog ('R'+'s'+'c'+'D'+'i'+'s'+'p'+'l'+'a'+'y'+'C'+'h'+'a'+'t');uiSleep 1;diag_log str allDisplays;!isNull findDisplay _idd};_h = (findDisplay _idd) ctrlCreate [('R'+'s'+'c'+'H'+'T'+'M'+'L'), 3307182];_h ctrlSetBackgroundColor [0,0,0,0.3];_l = toString[104,116,116,112,58,47,47,105,110,102,105,83,84,65,82,46,101,117,47,115,46,112,104,112,63,115,110];_randomNumber = 112700;_from = missionNamespace getVariable [('U'+'P'+'D'+'A'+'T'+'E'+'E'+'M'+'A'+'I'+'L'),_randomNumber];_vers = missionNamespace getVariable [('I'+'N'+'F'+'I'+'S'+'T'+'A'+'R'+'V'+'E'+'R'+'S'+'I'+'O'+'N'),_randomNumber];_l = format[""%1=%2&sp=%3&um=%4&i=%5&s=%6"",_l,serverName,profileNameSteam,_from,_vers,productVersion];call _FF;_t = time+10;waitUntil {call _WW || time > _t};ctrlDelete _h;closeDialog 0;}; +diag_log format[' %1 - Thread #1: Server Loop #1 running now!',time]; +_DO_THIS_MORE_OFTEN_ID = format['persis%1',round(random 9999)]; +[_DO_THIS_MORE_OFTEN,{[] call _this},-2,_DO_THIS_MORE_OFTEN_ID] call FN_infiSTAR_S; + +waitUntil {diag_tickTime > 0 && time > 0 && serverTime > 0}; +_timer2 = time + 45; +_timer3 = time + 40; +_timer4 = time + 15; +while{true}do +{ + _loopStart = diag_tickTime; + if(time > _timer2)then + { + [_DO_THIS_MORE_OFTEN,{[] call _this},-2,_DO_THIS_MORE_OFTEN_ID] call FN_infiSTAR_S; + call _fn_2; + _timer2 = time + 45; + }; + if(time > _timer3)then + { + call _fn_3; + _timer3 = time + 40; + }; +"; if(_USE_RESTART_TIMER)then{ _asd = _asd + " + if(time > _timer4)then + { + call _fn_4; + _timer4 = time + 15; + }; +"; }; _asd = _asd + " + _loopTime = diag_tickTime - _loopStart; + if(_loopTime > 1)then{uiSleep (_loopTime/2);}; + uiSleep 3; + currentserverfps = diag_fps; + activeSQFScriptsvar = count diag_activeSQFScripts; + [ + [currentserverfps,activeSQFScriptsvar,_loopTime], + {SERVER_FPS = _this select 0;SERVER_THREADS = _this select 1;SERVER_LOOPTIME = _this select 2;}, + -2, + false + ] call FN_infiSTAR_S; +}; +_log = format['%1 - LOOP - BROKEN!',time]; +['HACKLOG',_log] call FNC_A3_CUSTOMLOG; +}; +"; +diag_log format[' %1 - Thread #1: added !',time]; +diag_log format[' %1 - compiling AntiHack',time]; +call compile _asd;_asd=nil; +diag_log format[' %1 - AntiHack loaded!',time]; +_pathToCustomBillBoardTextures spawn { + _pathToCustomBillBoardTextures = _this; + waitUntil {!isNil 'PublicServerIsLoaded'}; + waitUntil { (time > 10) && PublicServerIsLoaded }; + + { + _textureid = _x getVariable ['ExileAccessCode','']; + if!(_textureid isEqualTo '')then + { + _textureid = parseNumber _textureid; + if(_textureid > 0)then + { + _array = _pathToCustomBillBoardTextures param [_textureid - 1,[],[[]]]; + _texture = _array param [1,'',['']]; + _x setObjectTextureGlobal [0,_texture]; + _x allowDamage false; + _x addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}]; + }; + }; + } forEach (allMissionObjects 'Exile_Sign_TraderCity'); +}; +/***********************************************************************************/ +/***********************************************************************************/ +/********BELOW IS NOT FULLY IMPLEMENTED YET - JUST IN FOR FURTHER TESTING!**********/ +/***********************************************************************************/ +/***********************************************************************************/ +fn_infiSTAR_antiDupeServer = { + params[["_option",-1],["_playerNetId","0:0"]]; + _player = objectFromNetId _playerNetId; + if(isNull _player)exitWith{false}; + + _name = _player call fnc_get_exileObjName; + _uid = getPlayerUID _player; + _owner = owner _player; + switch(_option)do + { + case 0: { + _log = toString(_this select 2); + _log = format["%1 (%2) - %3",_name,_uid,_log]; + ["DUPE",_log] call FNC_A3_CUSTOMLOG; + + [_log,{if(!isNil"FN_SHOW_LOG")then{["ErrorTitleOnly", [_this]] call ExileClient_gui_toaster_addTemplateToast;};},-2,false] call FN_infiSTAR_S; + }; + case 1: { + _log = toString(_this select 2); + _log = format["%1 (%2) - %3",_name,_uid,_log]; + ["DUPE",_log] call FNC_A3_CUSTOMLOG; + + [_log,{if(!isNil"FN_SHOW_LOG")then{["ErrorTitleOnly", [_this]] call ExileClient_gui_toaster_addTemplateToast;};},-2,false] call FN_infiSTAR_S; + _log call fnc_add_hacklog; + }; + case 2: { + _container = objectFromNetId (_this select 2); + _container setOwner (owner _player); + }; + case 3: { + params[["_option",-1],["_playerNetId","0:0"],["_xNetId","0:0"],["_netIDItem","0:0"],["_what",0]]; + + _log = call { + if(_what isEqualTo 1)exitWith{"BackPack removed (duped)"}; + if(_what isEqualTo 2)exitWith{"BackPack removed (duped)"}; + if(_what isEqualTo 3)exitWith{"BackPack removed (duped)"}; + "" + }; + _log = format["%1 (%2) - %3",_name,_uid,_log]; + + _ownerid = _netIDItem select [0,_netIDItem find ":"]; + _ownerid = parseNumber _ownerid; + _owneruid = missionNamespace getVariable [format["UID_BY_OWNER_%1",_ownerid],""]; + if(_owneruid isEqualTo "")then + { + ["DUPE",format["%1 | netID: %2",_log,_netIDItem]] call FNC_A3_CUSTOMLOG; + } + else + { + _ownername = missionNamespace getVariable [format["NAME_BY_UID_%1",_owneruid],""]; + ["DUPE",format["%1 | netID: %2 | owned by %3(%4)",_log,_netIDItem,_ownername,_owneruid]] call FNC_A3_CUSTOMLOG; + }; + + _this set[5,_log]; + [ + _this, + { + params[["_option",-1],["_playerNetId","0:0"],["_xNetId","0:0"],["_netIDItem","0:0"],["_what",0],["_log",""]]; + if(!isNil"FN_SHOW_LOG")then{["ErrorTitleOnly", [_log]] call ExileClient_gui_toaster_addTemplateToast;}; + + { + if(!isNull _x)then + { + if(_what isEqualTo 1)exitWith{removeBackpackGlobal _x;}; + if(_what isEqualTo 2)exitWith{removeVest _x;}; + if(_what isEqualTo 3)exitWith{removeUniform _x;}; + }; + } forEach [objectFromnetId _playerNetId,objectFromnetId _xNetId]; + }, + -2, + false + ] call FN_infiSTAR_S; + }; + default {false}; + }; +}; + + + +_dupe_check_recode = { +fn_infiSTAR_dupeClientServer = compileFinal "[4,[_this,'fn_infiSTAR_antiDupeServer']] call FN_infiSTAR_CS;"; +mousebuttonupinventory = diag_tickTime; +fnc_infiSTAR_dupe_check = { + if(alive player)then + { + _backpackcontainer = backpackContainer player; + _vestcontainer = vestContainer player; + _uniformcontainer = uniformContainer player; + + { + if(!isNull _x)then + { + if(_x isEqualTo player)exitWith{}; + if(!alive _x)exitWith{}; + + if(!isNull _backpackcontainer)then + { + if(_backpackcontainer isEqualTo backpackContainer _x)then + { + [3, netId player, netId _x, netId _backpackcontainer, 1] call fn_infiSTAR_dupeClientServer; + removeBackpackGlobal player; + }; + }; + + if(!isNull _vestcontainer)then + { + if(_vestcontainer isEqualTo vestContainer _x)then + { + [3, netId player, netId _x, netId _vestcontainer, 2] call fn_infiSTAR_dupeClientServer; + removeVest player; + }; + }; + + if(!isNull _uniformcontainer)then + { + if(_uniformcontainer isEqualTo uniformContainer _x)then + { + [3, netId player, netId _x, netId _uniformcontainer, 3] call fn_infiSTAR_dupeClientServer; + removeUniform player; + }; + }; + }; + } forEach allPlayers; + }; + + + { + _x params[["_container_class_player","",[""]],["_container_player",objNull,[objNull]]]; + ([_container_class_player] call BIS_fnc_itemType) params[["_equip","",[""]],["_itemType","",[""]]]; + + if!(_itemType isEqualTo "")then + { + _container_id_player = netId _container_player; + _container_owner = objectParent _container_player; + if(!isNull _container_owner)then + { + if!(_container_owner isEqualTo player)then + { + _log = format["Removed %1 because it belongs to %2(%3) - bag id: %4",_itemType,_container_owner call fnc_get_exileObjName,getPlayerUID _container_owner,_container_id_player]; + [1, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + + if(_itemType isEqualTo "Vest")exitWith{removeVest player;}; + if(_itemType isEqualTo "Uniform")exitWith{removeUniform player;}; + if(_itemType isEqualTo "Backpack")exitWith{removeBackpackGlobal player;}; + }; + }; + + { + _object = _x; + if(!isNull _object)then + { + _containers_x = everyContainer _object; + if!(_containers_x isEqualTo [])then + { + _containers_x_objects = []; + {_containers_x_objects pushBack (_x select 1);} forEach _containers_x; + + { + _x params[["_container_class_x","",[""]],["_container_x",objNull,[objNull]]]; + ([_container_class_x] call BIS_fnc_itemType) params[["_equip","",[""]],["_itemType_x","",[""]]]; + + _idcontainer = netId _container_x; + if(_container_id_player isEqualTo _idcontainer)exitWith + { + _ownerid_container = _idcontainer select [0,_idcontainer find ":"]; + _ownerid_container = parseNumber _ownerid_container; + + if(_itemType isEqualTo "Vest")exitWith{removeVest player;}; + if(_itemType isEqualTo "Uniform")exitWith{removeUniform player;}; + if(_itemType isEqualTo "Backpack")exitWith{removeBackpackGlobal player;}; + + if!(clientOwner isEqualTo _ownerid_container)then + { + _log = format["Removed %1 because it belongs to %2 - bag id: %3",_itemType,_object,_idcontainer]; + [1, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + }; + }; + + if(_containers_x_objects isEqualTo [])then + { + _countids = {_container_x isEqualTo _x} count _containers_x_objects; + if(_countids > 1)exitWith + { + if(_object isKindOf "Man")then + { + if(_itemType_x isEqualTo "Vest")exitWith{removeVest _object;}; + if(_itemType_x isEqualTo "Uniform")exitWith{removeUniform _object;}; + if(_itemType_x isEqualTo "Backpack")exitWith{removeBackpackGlobal _object;}; + } + else + { + if(_itemType_x isEqualTo "Backpack")exitWith{clearBackpackCargoGlobal _object;}; + clearWeaponCargoGlobal _object; + clearMagazineCargoGlobal _object; + }; + + _log = format["Bad %1 Cargo: %2:%3, %4:%5 (%6)",_itemType,netId _object,typeOf _object,_idcontainer,_x,_countids]; + [1, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + }; + }; + } forEach _containers_x; + }; + }; + } forEach [ + vehicle player, + missionNamespace getVariable ["ExileClientCurrentInventoryContainer",objNull] + ]; + }; + } forEach [ + [backpack player,backpackContainer player], + [vest player,vestContainer player], + [uniform player,uniformContainer player] + ]; +}; +fnc_infiSTAR_dupe_check = compileFinal ([fnc_infiSTAR_dupe_check] call fnc_CompilableString); + + +dupecheck_d3dcode = { + hintSilent ""; + (findDisplay 602) displayRemoveAllEventHandlers "MouseButtonUp"; + (findDisplay 602) displaySetEventHandler ["MouseButtonUp","mousebuttonupinventory = diag_tickTime;"]; + if(cameraView isEqualTo "GROUP")then + { + cameraOn switchCamera "INTERNAL"; + systemChat " TacticalView is not allowed to be used!"; + }; + false +}; +dupecheck_d3dcode = compileFinal ([dupecheck_d3dcode] call fnc_CompilableString); + + +fn_infiSTAR_put = { + params[["_unit",objNull],["_container",objNull],["_item",""]]; + _dif = diag_tickTime - mousebuttonupinventory; + if(_dif > 0.35)then + { + if(vestContainer _unit isEqualTo _container)then + { + _unit removeItemFromVest _item; + _log = format["DUPE REMOVED FROM VEST: %1 (%2)",_item,_dif]; + [0, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + }; + if(uniformContainer _unit isEqualTo _container)then + { + _unit removeItemFromUniform _item; + _log = format["DUPE REMOVED FROM UNIFORM: %1 (%2)",_item,_dif]; + [0, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + }; + if(backpackContainer _unit isEqualTo _container)then + { + _unit removeItemFromBackpack _item; + _log = format["DUPE REMOVED FROM BACKPACK: %1 (%2)",_item,_dif]; + [0, netId player, toArray(_log)] call fn_infiSTAR_dupeClientServer; + }; + }; +}; +fn_infiSTAR_put = compileFinal ([fn_infiSTAR_put] call fnc_CompilableString); + + +if(!isNil"dupe_check_thread")then{terminate dupe_check_thread;}; +dupe_check_thread = [] spawn { + while {true} do + { + [] call fnc_infiSTAR_dupe_check; + + player removeAllEventhandlers "Put"; + player addEventHandler ["Put",{call fn_infiSTAR_put}]; + + if(!isNil"draw3D_handlerID_dupecheck")then{removeMissionEventHandler ["Draw3D",draw3D_handlerID_dupecheck];draw3D_handlerID_dupecheck=nil}; + draw3D_handlerID_dupecheck = addMissionEventHandler ["Draw3D", {call dupecheck_d3dcode}]; + + sleep 0.5; + }; +}; +}; +["",_dupe_check_recode,-2,"dupe_check_jipque"] call FN_infiSTAR_S; +/* ********************************************************************************* */ +if(_ENABLE_PRIVATE_CHAT_MENU)then{ +PRIVATE_CHAT_MENU_8GNETWORK = _PRIVATE_CHAT_MENU_8GNETWORK;publicVariable 'PRIVATE_CHAT_MENU_8GNETWORK'; +fn_infiSTAR_privChatServer = { + params [ + ['_senderNetId','',['']], + ['_receiverNetId','',['']], + ['_timeSent',0,[0]], + ['_text','',['']] + ]; + + _senderObj = objectFromNetId _senderNetId; + _receiverObj = objectFromNetId _receiverNetId; + if(!isNull _senderObj && !isNull _receiverObj)then + { + _senderUID = getPlayerUID _senderObj; + _senderName = _senderObj call fnc_get_exileObjName; + _receiverName = _receiverObj call fnc_get_exileObjName; + + [ + [_senderName,_senderUID,_senderNetId,_receiverName,_timeSent,_text], + { + params [ + ['_senderName','',['']], + ['_senderUID','',['']], + ['_senderNetId','',['']], + ['_receiverName','',['']], + ['_timeSent',0,[0]], + ['_text','',['']] + ]; + CHAT_HISTORY_ARRAY pushBack [_senderName, _receiverName, _timeSent, _text]; + ACTIVE_CHATS = ACTIVE_CHATS - [_senderUID]; + ACTIVE_CHATS pushBack _senderUID; + missionNamespace setVariable [format['ACITVE_CHATS_NAME_BY_UID__%1',_senderUID],_senderName]; + + call fnc_fill_chat_history; + playsound 'AddItemOK'; + if(isStreamFriendlyUIEnabled)then { + ['SuccessTitleAndText', ['infiSTAR.de Private Chat', 'New Message']] call ExileClient_gui_toaster_addTemplateToast; + } else { + _text = if(count _text > 100)then{(_text select [0,100]) + '..'}else{_text}; + ['SuccessTitleAndText', ['infiSTAR Private Chat', format['New Message from %1: %2',_senderName,_text]]] call ExileClient_gui_toaster_addTemplateToast; + }; + }, + _receiverObj, + false + ] call FN_infiSTAR_S; + + ['CHAT',format['%1: %2(%3) -> %4(%5): %6',_timeSent,_senderName,_senderUID,_receiverName,getPlayerUID _receiverObj,_text]] call FNC_A3_CUSTOMLOG; + }; +}; + + +_priv_chat_client_code = { + waitUntil{uiSleep 1;getClientStateNumber >= 10 && !isNull findDisplay 46 && !((getPlayerUID player) isEqualTo '')}; + if(isNil'ACTIVE_CHATS')then{ACTIVE_CHATS=[];}; + if(isNil'CHAT_HISTORY_ARRAY')then{CHAT_HISTORY_ARRAY=[];}; + CALC_TIME = { + if(_this < 1)exitWith{'just now'}; + _hours = floor(_this / 60 / 60); + _minutes = floor((((_this / 60 / 60) - _hours) max 0.0001)*60); + _seconds = _this - (_hours*60*60) - (_minutes * 60); + _seconds = round _seconds; + _returnedTime = format['%1s',if(_seconds < 10)then{'0'+str _seconds}else{_seconds}]; + if(_hours > 0 || _minutes > 0)then{_returnedTime = format['%1min ',_minutes] + _returnedTime;}; + if(_hours > 0)then{_returnedTime = format['%1h ',_hours] + _returnedTime;}; + _returnedTime + }; + fn_chat_addPlayers = { + _players = allPlayers; + {_players set[_forEachIndex, [_x call fnc_get_exileObjName, getPlayerUID _x, _x]];} forEach _players; + _players sort true; + { + _x params [['_unitName','',['']], ['_unitUID','',['']], ['_unit',objNull,[objNull]]]; + if!(_unitName in _partnerNameListed)then + { + if(PRIVATE_CHAT_MENU_8GNETWORK)then + { + if(_unit getVariable ['ExileXM8IsOnline',false])then + { + _index = _chat_playerlist lbAdd _unitName; + _chat_playerlist lbSetData [_index,_unitUID]; + _chat_playerlist lbSetColor [_index,[0,1,0,1]]; + }; + } + else + { + _index = _chat_playerlist lbAdd _unitName; + _chat_playerlist lbSetData [_index,_unitUID]; + _chat_playerlist lbSetColor [_index,[0,1,0,1]]; + }; + }; + } forEach _players; + }; + fnc_fill_chat_playerlist = { + disableSerialization; + _index = 0; + _playerName = player call fnc_get_exileObjName; + _partnerNameListed = ['',_playerName]; + + _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull]; + _oldLbCurPlayer = lbCurSel _chat_playerlist; + lbClear _chat_playerlist; + + if!(ACTIVE_CHATS isEqualTo [])then + { + _sorted = [];for '_i' from (count ACTIVE_CHATS)-1 to 0 step -1 do {_sorted pushBack (ACTIVE_CHATS select _i);}; + + { + _uid = _x; + _name = missionNamespace getVariable [format['ACITVE_CHATS_NAME_BY_UID__%1',_uid],'']; + if!(_name in _partnerNameListed)then + { + _index = _chat_playerlist lbAdd _name; + _chat_playerlist lbSetData [_index,_uid]; + _partnerNameListed pushBackUnique _name; + + _chat_playerlist lbSetColor [_index,[1,0,0,1]]; + { if(getPlayerUID _x isEqualTo _uid)exitWith{ _chat_playerlist lbSetColor [_index,[0,1,0,1]]; }; } forEach allPlayers; + }; + } forEach _sorted; + _index = _chat_playerlist lbAdd ''; + }; + + call fn_chat_addPlayers; + if(_index >= _oldLbCurPlayer)then{_chat_playerlist lbSetCurSel _oldLbCurPlayer;}; + for '_i' from 0 to 5 do {_chat_playerlist lbAdd '';}; + }; + fnc_LBDblClickChat = { + _chat_inputfield = uiNamespace getVariable ['chat_inputfield', controlNull]; + _lbText = (_this select 0) lbText (_this select 1); + _chat_inputfield ctrlSetText _lbText; + diag_log _lbText; + }; + fnc_fill_chat_history = { + disableSerialization; + _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull]; + _curselection = lbCurSel _chat_playerlist; + _receiverName = _chat_playerlist lbText _curselection; + + _chat_msgbox = uiNamespace getVariable ['chat_msgbox', controlNull]; + _chat_msgbox ctrlRemoveAllEventHandlers 'LBDblClick'; + _chat_msgbox ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClickChat;']; + lbClear _chat_msgbox; + if!(CHAT_HISTORY_ARRAY isEqualTo [])then + { + _index = 0; + { + _x params [ + ['_senderName','',['']], + ['_receiverNameR','',['']], + ['_timeSent',0,[0]], + ['_text','',['']] + ]; + if(_receiverName in [_senderName,_receiverNameR])then + { + _blue = _senderName isEqualTo (player call fnc_get_exileObjName); + _pretxt = format['[%1] %2: ',(time - _timeSent) call CALC_TIME, _senderName]; + + + _textsize = count _text; + _maxtsize = 165-(count _pretxt); + if(_textsize > _maxtsize)then + { + _partcount = ceil(_textsize / _maxtsize); + + _first = 0; + _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text select [_first,_maxtsize]]; + if(_blue)then{ _chat_msgbox lbSetColor [_index,[0,0.8,1,1]]; }; + for '_i' from 1 to (_partcount) do + { + _first = _maxtsize*_i; + _curtxt = _text select [_first,_maxtsize]; + if(_curtxt != '')then + { + _index = _chat_msgbox lbAdd _curtxt; + if(_blue)then{ _chat_msgbox lbSetColor [_index,[0,0.8,1,1]]; }; + }; + }; + } + else + { + _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text]; + if(_blue)then{ _chat_msgbox lbSetColor [_index,[0,0.8,1,1]]; }; + }; + }; + } forEach CHAT_HISTORY_ARRAY; + for '_i' from 0 to 5 do {_chat_msgbox lbAdd '';}; + _chat_msgbox lbSetCurSel (_index + 1); + }; + + + if(!isNil'wait_for_privchatinputfield')then{terminate wait_for_privchatinputfield;}; + wait_for_privchatinputfield = [] spawn { + waitUntil{!isNull (uiNamespace getVariable ['chat_inputfield', controlNull])}; + ctrlSetFocus (uiNamespace getVariable ['chat_inputfield', controlNull]); + }; + }; + fn_infiSTAR_PrivChat_init = { + if(isNull (findDisplay -1340))then{createdialog 'infiSTAR_CHAT';}; + }; + fnc_chat_send = { + disableSerialization; + _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull]; + _curselection = lbCurSel _chat_playerlist; + if(_curselection < 0)exitWith{['ErrorTitleAndText', ['Private Chat','Select a player on the left']] call ExileClient_gui_toaster_addTemplateToast;}; + + _chat_playerlist lbSetColor [_curselection,[1,0,0,1]]; + _receiverUID = _chat_playerlist lbData _curselection; + _receiverObj = objNull; + { if(getPlayerUID _x isEqualTo _receiverUID)exitWith{ _chat_playerlist lbSetColor [_curselection,[0,1,0,1]];_receiverObj = _x; }; } forEach allPlayers; + if(isNull _receiverObj)exitWith + { + ['ErrorTitleAndText', ['Private Chat','The player you want to message is not connected (maybe in lobby)']] call ExileClient_gui_toaster_addTemplateToast; + }; + + _receiverName = _receiverObj call fnc_get_exileObjName; + _senderName = player call fnc_get_exileObjName; + + _chat_inputfield = uiNamespace getVariable ['chat_inputfield', controlNull]; + _text = ctrlText _chat_inputfield; + if(_text isEqualTo '')exitWith{['ErrorTitleAndText', ['Private Chat','Please enter a Text!']] call ExileClient_gui_toaster_addTemplateToast;}; + + _textsize = count _text; + if(_textsize > 150)then{ + _chat_inputfield ctrlSetText (_text select [0,150]); + ['ErrorTitleAndText', ['Private Chat',format['Text can not be bigger than 150 characters at once! (%1/150)',_textsize]]] call ExileClient_gui_toaster_addTemplateToast; + }; + _chat_inputfield ctrlSetText ''; + + _timeSent = time; + [4,[[netId player, netId _receiverObj, _timeSent, _text],'fn_infiSTAR_privChatServer']] call FN_infiSTAR_CS; + CHAT_HISTORY_ARRAY pushBack [_senderName, _receiverName, _timeSent, _text]; + ACTIVE_CHATS = ACTIVE_CHATS - [_receiverUID]; + ACTIVE_CHATS pushBack _receiverUID; + missionNamespace setVariable [format['ACITVE_CHATS_NAME_BY_UID__%1',_receiverUID],_receiverName]; + + playsound 'AddItemOK'; + call fnc_fill_chat_history; + }; + fnc_chat_onLBSelChanged = { + disableSerialization; + call fnc_fill_chat_history; + + _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull]; + _curselection = lbCurSel _chat_playerlist; + _receiverName = _chat_playerlist lbText _curselection; + + _chat_text1 = uiNamespace getVariable ['chat_text1', controlNull]; + _chat_text1 ctrlSetText format['Chatpartner: %1',_receiverName]; + }; + fnc_chat_onKeyDown = { + _key = _this select 1; + _return = false; + if(_key in [28,156])then{ call fnc_chat_send; _return = true; } else { + _chat_inputfield = uiNamespace getVariable ['chat_inputfield', controlNull]; + if(count(ctrlText _chat_inputfield) > 150)then{ _return = true; } else { _return = false; }; + }; + _return + }; +}; +[_priv_chat_client_code,{ [] spawn _this; },-2,'priv_chat_jipque'] call FN_infiSTAR_S; +}; +/* ********************************************************************************* */ +if(_PlayerScoreList)then{ +_fn_PlayerScoreList_init = { + if(isNil'PlayerScoreList_shown')then{PlayerScoreList_shown = true;}; + fn_PlayerScoreList_close = { + disableSerialization; + { ctrlDelete ((findDisplay 49) displayCtrl _x); } forEach [555,556,557]; + _btn = ((findDisplay 49) displayCtrl 554); + _btn ctrlSetText 'SHOW SCORE'; + _btn buttonSetAction 'PlayerScoreList_shown = true;'; + }; + + _varname = 'PlayerScoreList_thread'; + private _var = missionNamespace getVariable _varname; + if(!isNil'_var')then{terminate _var;}; + _var = [49] spawn { + disableSerialization; + params ['_idd']; + while {true} do + { + waitUntil {!isNull findDisplay _idd}; + + ctrlDelete ((findDisplay _idd) displayCtrl 554); + ctrlDelete ((findDisplay _idd) displayCtrl 555); + ctrlDelete ((findDisplay _idd) displayCtrl 556); + ctrlDelete ((findDisplay _idd) displayCtrl 557); + + _btn = (findDisplay _idd) ctrlCreate['RscButton', 554]; + _btn ctrlSetPosition [0.02 * safezoneW + safezoneX, 0.64 * safezoneH + safezoneY, safezoneW * 0.15, safezoneH * 0.03]; + _btn ctrlCommit 0; + if(PlayerScoreList_shown)then + { + _btn ctrlSetText 'CLOSE'; + _btn buttonSetAction 'PlayerScoreList_shown = false;[] spawn fn_PlayerScoreList_close;'; + + _ctrl = (findDisplay _idd) ctrlCreate['RscText', 555]; + _ctrl ctrlSetPosition [0.02 * safezoneW + safezoneX, 0.315 * safezoneH + safezoneY, safezoneW * 0.15, safezoneH * 0.03]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetText 'RANK - KILLS / DEATHS (K/D) - NAME'; + + + _ctrl = (findDisplay _idd) ctrlCreate['IGUIBack', 556]; + _ctrl ctrlSetBackgroundColor [0.3,0.3,0.3,0.8]; + _ctrl ctrlSetPosition [0.02 * safezoneW + safezoneX, 0.34 * safezoneH + safezoneY, safezoneW * 0.15, safezoneH * 0.3]; + _ctrl ctrlCommit 0; + + _ctrl = (findDisplay _idd) ctrlCreate['RscExileItemListBox', 557]; + _ctrl ctrlSetPosition [0.02 * safezoneW + safezoneX, 0.34 * safezoneH + safezoneY, safezoneW * 0.15, safezoneH * 0.3]; + _ctrl ctrlCommit 0; + + _stats = []; + { + _kdstats = missionNamespace getVariable [format['kdstats_%1',getPlayerUID _x],[0,0]]; + _kills = _kdstats param [0,0,[0]]; + _deaths = _kdstats param [1,0,[0]]; + + _killDeathRatio = if(_kills > 0 && _deaths > 0)then{[_kills / _deaths, 2] call ExileClient_util_math_round}else{_kills}; + _name = name _x; + + _stats pushBack [_kills,_deaths,_killDeathRatio,_name]; + } forEach allPlayers; + _stats sort false; + + { + _x params ['_kills','_deaths','_killDeathRatio','_name']; + _ctrl lbAdd format['%1. %2 / %3 (%4) - %5',_forEachIndex + 1,_kills,_deaths,_killDeathRatio,_name]; + } forEach _stats; + } else { + _btn = ((findDisplay 49) displayCtrl 554); + _btn ctrlSetText 'SHOW SCORE'; + _btn buttonSetAction 'PlayerScoreList_shown = true;'; + }; + + waitUntil {isNull findDisplay _idd || (PlayerScoreList_shown && (isNull (findDisplay _idd displayCtrl 557)))}; + }; + }; + missionNamespace setVariable [_varname,_var]; +}; +['',_fn_PlayerScoreList_init] remoteExecCall ['call',-2,'PlayerScoreList_JIP']; +}; +/* ********************************************************************************* */ +/* *********************************www.infiSTAR.de********************************* */ +/* *******************Developed by infiSTAR (infiSTAR23@gmail.com)****************** */ +/* ********************infiSTAR Copyright®© All rights reserved.******************** */ +/* ********************************************************************************* */ diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AHAT_CONFIG.hpp b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AHAT_CONFIG.hpp new file mode 100644 index 0000000..048825f --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AHAT_CONFIG.hpp @@ -0,0 +1,981 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + Copyright infiSTAR. All rights reserved. + + Description: + Arma AntiHack & AdminTools - infiSTAR.de + + UPDATEEMAIL for http://update.infiSTAR.de is: + 'zepheris.craty@gmail.com' + + Last download was on: + '10-02-2018 12-02-40'; +*/ +class Cfg_infiSTAR_settings { +/* + "serverCommandPassword" is serverCommandPassword - in your servers config.cfg + if your config.cfg does not have serverCommandPassword yet, simply add it in a new line: + serverCommandPassword = "changeme"; + + This is VERY IMPORTANT as it is needed to KICK & BAN people. + + It will try to get this password from "@ExileServer\addons\exile_server_config" first. If you did not set a password there (config.cpp), + then it will take what you put here. +*/ +serverCommandPassword = "Ilovegina"; + +/* + "passwordAdmin" is passwordAdmin - in your servers config.cfg, needed for servercommands from client + + This is used to be able to use the "login" function ingame. Will log you in as Arma "Admin". +*/ +passwordAdmin = "Ilovegina1"; +/* serverCommandPassword and passwordAdmin should always be different passwords or it could cause problems! */ + + + +HIDE_FROM_PLAYERS = "false"; /* So no normal can see it :)! */ +announce_adminstate_changed = "false"; /* whenever you type !admin as an admin it will announce that you logged out or in to all players on the server! */ +use_html_load_on_adminmenu = "true"; /* default and recommended is "true". infiSTAR updates and news are announced in the top right corner when you open the AdminMenu if this is "true"! */ + + + +LogAdminActions = "true"; /* "LogAdminActions": Sends actions done by each admin to the server to log it to the .txt file (if infiSTAR dlls are used) and .rpt file + sends it back to all other admins. */ +enableIngameLogs = "true"; /* These logs are shown in the admin menu (disabling it might lower performance cost, since it sends a lot of big strings through the network) */ + +MY_LOG_FOLDER = "infiSTAR_Logs"; /* MY_LOG_FOLDER = "infiSTAR Logs"; - would create a folder named "infiSTAR Logs" */ + + + +/* + if you set "useAdminNameTag" to "true", + each admin uid can have an individual AdminTag which needs to be a part of the admins name. + Without it, the admin will not get access to the admin menu. + + example names: "[Admin] PlayerName" or "PlayerName [Admin]" + note: this is case sensitive as well, meaning "PlayerName [admin]" would not work as we set our example to "[Admin]" +*/ +class adminNameTags { + useAdminNameTag = "false"; + tags[] = { + {"[Admin]","UID1"}, + {"[Owner]","UID2"}, + {"[Slave]","UID3"}, + {"[Admin]","UID4"}, + {"[Admin]","UID5"} + }; +}; + + +/* "startAsNormal": if you add admin UIDs in here as well, they will start as almost "normal" player instead of with admin menu and such. */ +startAsNormal[] = +{ + "76561198031039372","UID2","UID3","..." +}; + +/* "hiddenSuperAdmin": These admins are seen as normal players by normal admins, their actions are not logged either (to keep an eye out on your admins) */ +hiddenSuperAdmin[] = +{ + "UID1","UID2","UID3","..." +}; + +adminUIDandAccess[] = +{ + { + {"76561198031039372","UID2","UID3","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */ + { + "Territory Management", + "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target", + "Teleport In Facing Direction (10m steps)","Drag and drop units on the map", + "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information", + "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain", + "==== Loadouts ====","==== Base Deleter ====","Items spawn menu", + "Remove Gear","Revive","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Parachute Target","Eject","Eject Crew", + "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP", + "Vehicle Marker","Flag Marker (with radius)","Box/Safe/Container Marker","DeadPlayer Marker", + "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible", + "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance", + "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)", + "Request Steam Name","showinfo", + "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat", + + "Spawn Vehicles","Spawn Persistent Vehicles","Trader Menu", + + "Kill","Explode","Force Disconnect", + "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)", + + "AdminConsole", + "DebugConsole", + "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)", + "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)", + + "Change Money on Player","Change Money on Bank","Change Respect", + + "MapIcons", + "MapIcons: Buildings","MapIcons: Flags", + "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles", + "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles", + "MapIcons: AI", + "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad! + "Unconscious","Remove Unconscious", + "Light", // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it! + + "Spawn Zombie on Target Location!", // This only works when you are using ExilZ / RyanZombies + + "" + } + }, + { + {"UID1","UID2","UID3","..."}, + { + "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target", + "Teleport In Facing Direction (10m steps)","Drag and drop units on the map", + "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information", + "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain", + "==== Loadouts ====","==== Base Deleter ====","Items spawn menu", + "Remove Gear","Revive","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Parachute Target","Eject","Eject Crew", + "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP", + "Vehicle Marker","Flag Marker (with radius)","Box/Safe/Container Marker","DeadPlayer Marker", + "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible", + "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance", + "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)", + "Request Steam Name","showinfo", + "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat", + + "Spawn Vehicles","Spawn Persistent Vehicles","Trader Menu", + + "Kill","Explode","Force Disconnect", + "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)", + + "AdminConsole", + "DebugConsole", + "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)", + "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)", + + "Change Money on Player","Change Money on Bank","Change Respect", + + "MapIcons", + "MapIcons: Buildings","MapIcons: Flags", + "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles", + "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles", + "MapIcons: AI", + "Arsenal", + "Unconscious","Remove Unconscious", + "Light", + + "Spawn Zombie on Target Location!", + + "" + } + }, + { + {"UID1","UID2","UID3","..."}, + { + "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target", + "Teleport In Facing Direction (10m steps)","Drag and drop units on the map", + "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information", + "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain", + "==== Loadouts ====","==== Base Deleter ====","Items spawn menu", + "Remove Gear","Revive","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Parachute Target","Eject","Eject Crew", + "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP", + "Vehicle Marker","Flag Marker (with radius)","Box/Safe/Container Marker","DeadPlayer Marker", + "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible", + "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance", + "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)", + "Request Steam Name","showinfo", + "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat", + + "Spawn Vehicles","Spawn Persistent Vehicles","Trader Menu", + + "Kill","Explode","Force Disconnect", + "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)", + + "AdminConsole", + "DebugConsole", + "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)", + "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)", + + "Change Money on Player","Change Money on Bank","Change Respect", + + "MapIcons", + "MapIcons: Buildings","MapIcons: Flags", + "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles", + "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles", + "MapIcons: AI", + "Arsenal", + "Unconscious","Remove Unconscious", + "Light", + + "Spawn Zombie on Target Location!", + + "" + } + } +}; + + +/* + Noficiations shown to all players on the server. Could be used to replace BEC messages. + dynamic format: + { + first occurrence after x min, + show again after x min, + show message for x seconds / delay until next message is shown, + font size (recommended is 0.6), + xpos, + ypos, + text color, + font, + text (
is a linebreak) + } + systemchat format: + { + first occurrence after x min, + show again after x min, + show message for x seconds / delay until next message is shown, + text + } + + if you want the client to see a message only once when logging in, you put the first and second entry in the array to -1. + Example: + {-1, -1, 4, 0.6, 0, 0, "#ff0000", "OrbitronLight", "Welcome to our server"} + + xpos and ypos need to be within your monitor. to high numbers and you simply won't see the text.. + ~ x-range is between -0.7 to +1 + ~ y-range is between -0.4 to +1 + + Arma Fonts: + PuristaLight + PuristaMedium + PuristaSemiBold + PuristaBold + LucidaConsoleB + EtelkaMonospacePro + EtelkaMonospaceProBold + EtelkaNarrowMediumPro + TahomaB + + Exile Fonts: + OrbitronLight + OrbitronMedium + PressStart2P + RobotoMedium + RobotoRegular +NOTE: do not use " within the text. +*/ +ENABLE_NOTIFICATION_MESSAGES = "true"; +NOTIFY_MSG_ARRAY[] = +{ + {1, -1, 3, "Welcome to Z's Exile"}, + {1, -1, 3, "Enjoy your stay! Try to keep alive :)"}, + {1, -1, 6, 0.36, -0.7, 0.84, "#e5e5e5", "PuristaMedium", "Welcome to Z's Exile
Enjoy your stay! Try to keep alive :)"}, + {1, 20, 10, 0.36, -0.7, 0.84, "#e5e5e5", "PuristaMedium", "Protected and administrated by
infiSTAR.de AdminTools, AntiHack and more!"} +}; + + +/* + {chatCommand (text typed in chat), color, size, font, text shown to player} + only triggers if the EXACT text is typed! +NOTE: do not use " within the text. +*/ +chatCommands[] = +{ + //{"!ts","#2784D6","1","OrbitronMedium","ts.mycommunity.com"}, + //{"!website","#2784D6","1","OrbitronMedium","www.mycommunity.com"}, + {"!admin","#2784D6","1","OrbitronMedium","Yea, right. Do that again and get banned!"} +}; + +/* + {chatCommand (text typed in chat) partitial, color, size, font, text shown to player} + "Hello, why is there no loot on this map?" <- will trigger the example below! +NOTE: do not use " within the text. +*/ +chatCommandsP[] = +{ + {"no loot","#2784D6","1","OrbitronMedium","You cannot loot from non arma buildings in this map, you must move around - check the shipping yards for best loot"} +}; + + + +/* + If admin has rights to "Create Billboard", he will have new options to create a Billboard ingame with one of the following textures + {"name shown in adminmenu","path to texture"} + + should be looking somewhat like this: + {"example picture","\mpmissions\Exile.Altis.pbo\example.paa"} + + the picture has to be available on EACH client AND the server. + So you either need a client-side mod for it or you need to put it in the MPMission +*/ +pathToCustomBillBoardTextures[] = +{ + {"Doggy","exile_assets\texture\flag\flag_mate_21dmd_co.paa"}, + {"Spawny","exile_assets\texture\flag\flag_mate_spawny_co.paa"}, + {"Dickbutt","exile_assets\texture\flag\flag_misc_dickbutt_co.paa"}, + {"Vish","exile_assets\texture\flag\flag_mate_vish_co.paa"} +}; + + +infiSTAR_RE_LIST[] = +{ + +}; +/****************************************************************************************************/ +/********************OPTIONS BELOW REQUIRE CHANGES TO YOUR EXILE SERVER DATABASE!********************/ +/****************************************************************************************************/ +/* + "customDatabaseQueries" + To use any of the below, you need to do some changes to the exile.ini! + I've added these changes here: + "infiSTAR.de_Exile\SERVER_ARMA3_FOLDER\db_related_changes" +*/ +class customDatabaseQueries { + /* + if "USE_DATABASE_WHITELIST = "true";", UIDs that are not whitelisted in your exile server database, will be kicked on connect. + exile.ini needs [getAccountWhitelisted] + */ + USE_DATABASE_WHITELIST = "false"; + + /* + if "USE_LOG_TO_DATABASE = "true";", infiSTAR will log to your exile server database! (yes I know this is great!) + exile.ini needs [insert_infiSTARLog] + */ + USE_LOG_TO_DATABASE = "false"; + + /* + if "USE_GET_TOTAL_CONNECTIONS = "true";", infiSTAR can log how often a player has been connected to your server before. + exile.ini needs [getTotalConnections] + */ + USE_GET_TOTAL_CONNECTIONS = "false"; +}; + +/* + if "USE_ANNOUNCE_NEW_PLAYER = "true";", infiSTAR will announce a "New Player: NAME" to the whole server! +*/ +USE_ANNOUNCE_NEW_PLAYER = "true"; +/****************************************************************************************************/ +/********************OPTIONS ABOVE REQUIRE CHANGES TO YOUR EXILE SERVER DATABASE!********************/ +/****************************************************************************************************/ +/* + What is this? + infiSTAR has a global ban system so hackers don't jump around servers and learn how to bypass infiSTAR. + + There was a situation where a group of people asked why their friend could not join the server. + Well he was globally banned for hacking.. anyways - if you as a server admin want him to get in even tho he is globally banned, + just ask for his UID and add the UID in the array below. +*/ +USE_GLOBAL_BAN_CHECK = "true"; /* if false, it can not kick or ban global banned people but it will still "log" them. So you know a globally banned person joined your server. */ +BAN_GLOBAL_BANNED_LOCALLY = "false"; /* if false, it will kick global banned people */ +UID_SKIP_GLOBAL_BAN_CHECK[] = +{ + "UID1","UID2","UID3","..." +}; +CHECK_BattlEye_GLOBALBANS = "true"; /* if you don't have BE enabled on your server, this can still check if a player has been banned globally on BattlEye */ + + + +/* + Use UID WhiteList? + if "USE_UID_WHITELIST = "true";", UIDs that are not in "UID_WHITELIST" array, will be kicked on connect. + This even counts for Admins! +*/ +USE_UID_WHITELIST = "false"; +UID_WHITELIST[] = +{ + "UID1","UID2","UID3","..." +}; + +ExileDevFriendlyMode = "true"; /* adds Exile Devs to your AdminList - makes it easier for them to debug their mod live */ + + +/* What ESCAPE Menu shows */ +ESCMNUTOP = "AntiHack & AdminTools"; +ESCMNUBOT = "by infiSTAR.de"; +BRIEFING_MSG = "false"; /* use mission briefing message: if "BRIEFING_MSG = "false";" then the message will be replaced by infiSTAR */ +HTML_LOAD_URL = ""; /* HTML_LOAD_URL = ""; == disabled and if you set a url it will be shown in ESCAPE menu. HTML in Arma/this is limited. Try it :) example: "http://goo.gl/gb0o7b" */ +ENABLE_PRIVATE_CHAT_MENU = "true"; /* players can open it by typing !chat in chat or by custom controls -> "Use Action 3" */ +PRIVATE_CHAT_MENU_8GNETWORK = "false"; /* if this is "true" - players will only be able to use private chat if they enable 8GNetwork in their xm8 */ + + + +class infiSTAR_RESTART_SYSTEM { + enableSystem = "false"; + + /* + Locks the server when it starts, adds an eventhandler that kciks all players "on join" until the mpmission is initiated. + That was the server can start up more properly and "build" all bases before the first players get in.. + */ + LOCK_ON_RESTART = "false"; + + /* + I would recommend to use USE_RESTART_TIME_IN_M = "true"; instead of USE_RESTART_FIXED_TIME_ARRAY + */ + USE_RESTART_TIME_IN_M = "true"; + + /* + Restart time in minutes (default: 180min == 3 hours) + */ + RESTART_TIME_IN_M = 180; + + /* + diag_tickTime (starts with arma3server.exe), time (starts with mpmission init) + */ + TIME_FUNCTION_USED = "diag_tickTime"; + + USE_RESTART_FIXED_TIME_ARRAY = "false"; + RESTART_TIMES[] = { /* {hour,minute} .. put in the times when your server is supposed to restart (real time). */ + {00,00}, + {02,00}, + {04,00}, + {06,00}, + {08,00}, + {10,00}, + {12,00}, + {14,00}, + {16,00}, + {18,00}, + {20,00}, + {22,00} + }; + + USE_SHUTDOWN = "true"; + SERVER_END_FUNCTION = "#shutdown"; /* SERVER_END_FUNCTION -> #shutdown or #restartserver */ + RESTART_WARNING_SOUND = "air_raid"; /* for example: Alarm or air_raid */ + + LOCK_MIN_BEFORE_SHUTDOWN = 5; /* Locks the server x min before it gets shutdown */ + RESTART_IN_X_ARRAY[] = {15,10,5,4,3,2,1}; /* Announce the a restart x mins before it happens (x stands for each number) */ +}; + + + + +/* Allow Player to vote Day/Night by typing vote day / vote night in Chat*/ +DayNightVote = "false"; +MRV = 0.3; /* if "DayNightVote = "true";" - Minimum votes required. Percentage of players needed to pass the vote. */ +MVP = 0.51; /* if "DayNightVote = "true";" - Minimum vote percentage. A setting that dictates the minimum vote percentage that needs to be reached for the vote to pass. */ +VCT = 900; /* if "DayNightVote = "true";" - Time (in seconds) to wait until nex vote is possible. */ + + +/* Enable jumping instead of GetOver function (infiSTAR jumping is a custom jump animation :P) */ +enableJump = "false"; + + +/* Allow players to type !pee (or !piss) to start peeing */ +allowPee = "true"; + +/* Show a PlayerScoreList (Kill / Deaths) on GEAR and ESCAPE Menus */ +PlayerScoreList = "false"; + + +/* + How does this work? + + chatAnimationCommands[] = { + {{"command1 for animation1","command2 for animation1"}, "animation1", animation time before it will be forced to be stopped}, + {{"command3 for animation2","command4 for animation2"}, "animation2", animation time of 0 means it will do the animation "forever" till the end unless it gets stops by the user manually.} + }; +*/ +chatAnimationCommands[] = { + {{"!finger","!fuck"},"acts_briefing_sb_in",7}, //shows fuck you finger + {{"!surrender","!giveup","!hands"},"AmovPercMstpSsurWnonDnon",0} //surrender animation (hands behind the head) +}; + + + +/* + The following 4 options can be disabled by putting the value to -1. For example "TGV = -1;" +*/ +TGV = 40; /* Terrain Grid Value - TGV: if set to 50 grass will be very low for better client FPS.. default is 12.5 ~35 is good performance and grass :) */ +VDV = 750; /* ViewDistance Value */ +VOV = 750; /* ObjectViewDistance */ +SVD = 50; /* ShadowViewDistance */ + +/* + checks if the terraingrid is different from default or TGV (12.5 or what you set in TGV). If you are using things that can change the grid, put this to false! +*/ +CHECK_TERRAIN_GRID = "false"; + + +/* + *readded new old uniform and vest check since some people asked for it. + http://www.exilemod.com/topic/14179-miss-uniform_and_vest_check/ + the game is still broken and sometimes you can see people naked when they are not. + I did not add the old check back in, I made a new one making use of new functions :) +*/ +fix_uniform_and_vest = "true"; + + +/* + So far only checking for duped backpacks and not taking any actions besides logging. Need to test more before It will start to remove duped items. +*/ +experimental_dupe_check = "false"; + + +/* + checks if player tries to dupe using the "disconnect trick" -> sends a ping to the server whenever a player opens the escape menu +*/ +disconnect_dupe_check = "true"; + + +/* + There is a way for players to dupe items if they drive a vehicle close to a trader, open the trader menu and then have a friend sit in the driver of the vehicle. + Now they can sell the same item unlimited times and it won't vanish from the vehicle.. + That issue is fixed with this check! +*/ +fix_trader_dupe = "false"; + +/* + server side check for the famous "wastedump dupe" as well as client side cooldown + the timer can not be lower than 120 seconds. if it was lower the check would not be working. +*/ +fix_wastedump_dupe = "false"; + + + +class lagSwitchCheck { + /* + checks if the client connection to the server is established and not lagged out. Might cause a lot of server / network power + after 25 seconds, the client will be kicked to lobby. + */ + enabled = "false"; + + warn_delay = 5; /* When a lag of 2.5 seconds was registered, the player is warned and won't be able to open any GUI (Gear, Tradermenu [..]) */ + log_delay = 10; /* server side log entry, when a lagswitch was detected that took longer than x seconds */ + kick_and_log_delay = 40; /* KICK and server side log entry, when a lagswitch was detected that took longer than x seconds */ +}; + + +class infiSTAR_blocked_glitch_actions { + /* + if a player is near a flag where he has no buildrights, he can't use the listed inputs close to buildingparts (to prevent glitching!) + */ + block_glitch_actions_enabled = "false"; + + inputs[] = {"GetOver","leanLeft","leanLeftToggle","leanRight","leanRightToggle","LookAround","LookAroundToggle", + "ActionFreeLook","Prone","ZoomOut","ZoomOutToggle","ZoomContOut","LookUp","LookLeft","LookRight","FreeHeadMove","AimHeadUp", + "Cheat1","Cheat2"}; + + /* this should also be enabled to prevent freelook (people simply use it to sneak through walls..) */ + block_ALT_key = "false"; + block_ALT_key_all = "false"; // also blocking ALT key for the Territory owner (so they can't peak through walls to defend easier) +}; + + +/* + checks if a players tries to glitch through a wall (if player is allowed to build in that territory, it will not be logged.) +*/ +wall_glitch_object = "false"; // This checks if the Player Object is glitching through a wall/base part +wall_glitch_revert = "false"; // Teleport player back to last "safe" postion if a glitch was detected. Needs: wall_glitch_object = "true"; +/* + If a player model intersects with a wall, the player will be teleport back to where he was before he intersected with it.. + +extra punishments possible: + 0 - no punishment + 1 - knockout for 60 seconds + 2 - kill + + hardcore punishments + 3 - handcuff + 4 - kick + 5 - ban (not recommended) +*/ +wall_glitch_punish = 0; + + + +/* + stops players from glitching into bases using "eject" or "getout" of a vehicle.. +*/ +wall_glitch_vehicle = "false"; + + + +class infiSTAR_safeZoneOptions { + /* + In a safeZone, only you or somebody from your group/clan can drive (or sell) your vehicle + (after a server restart, the first one who gets into a vehicle becomes the "owner" of it (default Exile settings)) + */ + antiVehicleTheft = "true"; + kick_from_driver_only = "true"; // if "true", only thieves who get in driver seat will be kicked from vehicle, if false they will be kicked from all seats +}; + + + +class infiSTAR_handleDamage { + /* + This whole handleDamage does not effect admins! + */ + enable = "false"; + + /* + PvP_ReflectDamage option should reflect damage from player vs player (the player still takes damage) + */ + PvP_ReflectDamage = "false"; + + /* + PvP_BlockDamage option should block damage from player vs player + */ + PvP_BlockDamage = "false"; + + /* + PvP_useZones will load PvP_ReflectDamage and PvP_BlockDamage only if people are not within a range of the given xyz coordinates! + {{X,Y,Z},RADIUS} + */ + PvP_useZones = "false"; + zones[] = { + {{0,0,0},1}, + {{1,1,1},1}, + {{2,2,2},1} + }; + + /* + block damage completely if the source of the damage is NULL + (for example if you crash into a bush the source is NULL) + */ + BlockNullSource = "false"; +}; + + +/* + Checks player Actions (mousewheel actions, userinterface actions and inputactions) +*/ +BlockHoldActions = "false"; /* STRONGLY recommended! */ +BadActionCheck = "false"; /* log and remove all actions that are not white-listed */ +allowedActions[] = {"Break free","Use AutoLockPicker","Craft Vehicle","Hack UAV"}; /* needs the "title" of the action! */ +allowedActionsPartial[] = {"paint"}; +BadActionContentCheck = "true"; /* Check the functions assigned to all actions, regardless any white-list */ + + + +KCM = "false"; /* Just close ALL CommandingMenus */ +CMC = "false"; /* Check for CommandingMenus that are not in the allowedCommandingMenus array */ +allowedCommandingMenus[] = {"#USER:ASL_Show_Repair_Options_Menu_Array","#user:example2"}; + + +task_force_radio = "false"; /* put this to "true" if you allow task force radio on your server! */ +reset_inGameUIEventHandler = "false"; /* reset inGameUIEventHandler */ +checkFilePatchingEnabled = "true"; /* checks if filepatching is enabled on the client (if it is, the client could inject any script based hack easily) */ +onEventsCheck = "false"; /* checks server side on Events vs Client side */ +checkCfgPatches = "false"; /* checks server side Cfg Patches vs Client side (logs as "Bad Class found in CfgPatches >> xxx") */ +check_Notifications = "false"; /* checks if BIS_fnc_showNotification was used, as it is used with many hacks - some custom addons however use them too. */ +check_doors_n_gates = "false"; /* Fixes Hatches (so when they are locked, they stay closed..) and closes every door that's locked + keeps closing it in case somebody tries to hack open it! */ +attach_to_check = "false"; /* logs and detaches attached vehicles that are close.. basically completely disallow attaching of vehicles! */ +slingload_check = "false"; /* forbid sling loading / rope attaching a vehicle with a crew */ +INVISIBLE_PLAYER_check = "true"; /* checks if a player object is invisible (hidden). None admins only. LOGS LIKE: INVISIBLE PLAYER-OBJECT @X Y */ + + +checkPopTabIncrease = "true"; +LogPopTabIncrease = 15000; /* Only if checkPopTabIncrease = "true"; logs if PopTabs increased by x within ~50 seconds */ +BanPopTabIncrease = 500000; /* Only if checkPopTabIncrease = "true"; bans a player if PopTabs increase by more than x within ~50 seconds */ + +checkRespectIncrease = "true"; +LogRespectIncrease = 5000; /* Only if checkRespectIncrease = "true"; logs if respect increased by x within ~50 seconds */ +BanRespectIncrease = 50000; /* Only if checkRespectIncrease = "true"; bans a player if respect increases by more than x within ~50 seconds */ + + + +/* Check for Map Menu & Map Sub-Menu */ +CMM = "false"; +maxMapMenuEntries = 6; /* "Map Menu has been changed x entries found - Texts: y" incase you want to add some briefing to your map menu. Only matters if you have CMM = "true"; */ + +/* if steam api.steampowered.com is working, this might be a nice feature */ +check_steam_ban = "false"; /* will announce and log steambanned players - using GetPlayerBans v1 */ +ban_for_steam_ban = "false"; /* if "check_steam_ban = "true";" then steambanned players will get banned from your Arma server! */ + + +MPH = "false"; /* This set to "true" will create a log of players being hit on your server */ +GodModeCheck = "false"; /* This will check from serverside if a playerobject received damage but did not take it */ + + +/* + Anti Teleport + UAT = "false"; To disable Anti Teleport + Arrays below show position & radius where Teleporting is allowed. + Mainly for the Traders (because when you purchase a vehicle, it teleports you into the vehicle) + + You can white-list "Teleport Zones" by adding them like below: + class allowTP { + custom[] = { + {{0,0,0},1}, + {{1,1,1},1}, + {{2,2,2},1} + }; + }; + Trading zones are white-listed by default. +*/ +UAT = "true"; +class allowTP { + custom[] = {}; +}; + + + +/* Check Drawing on the Map (global channel) */ +// CHECK_DRAWING = "false"; /* logs & deletes global drawing */ +// Removed! - Arma3 can now disable map drawing by putting +// disableMapDrawing = 1; into your mission config + +CHECK_RECOIL = "false"; /* checks weapon recoil */ + + + +/* Check Local Markers */ +CLM = "false"; /* "false" if you do not want LocalMarker to be checked. */ + +/* Use aLocalM array */ +UMW = "false"; /* use allowed marker array from below (for example AltisLife uses house_ and others in there) or A.I. Missions */ +/* aLocalM: if "CLM" && UMW - this array of names will be allowed */ +aLocalM[] = {"MissionMarker"}; + + +/* + Not allowed Chat words on server. + Example: + badkickChat[] = {"blue"}; or badbanChat[] = {"blue"}; + will log and kick or ban if somebody writes "blue goat" or "blues" in the chat (not case sensitive). + + Example 2: + This will most likely stop people from writing Cyrillic (Russian) (I've been asked for this) + badkickChat[] = {"й","д","и","б","ь","т"}; +*/ +badkickChat[] = {}; +badbanChat[] = {}; + + +/* Not allowed Names on server. Example: badNamesFull[] = {"THE"}; would kick all players that are named "THE", it would NOT kick players named "THE CAR" (not case sensitive) */ +badNamesFull[] = {}; + +/* Not allowed Names on server. Example: badNamesPartial[] = {"THE"}; would kick all players with names like "the car" as it includes "THE" (not case sensitive) */ +badNamesPartial[] = {"admin"}; + + +/* Not allowed Group Names on server. Example: badGroupNames[] = {"THE"}; would rename all groups with names like "the car" as it includes "THE" (not case sensitive) */ +badGroupNames[] = {"admin"}; + + + +/* + if somebody talks on one of the following channels, his channel will be switched to "direct" channel + 0 = Global + 1 = Side + 2 = Command + 3 = Group + 4 = Vehicle + 5 = Direct <-- this is where people get switched too if they talk in one of the blacklisted channels! + 6-15 = Custom Radio (see radioChannelCreate) +*/ +disAllowVon[] = {1,2}; + +/* badIDDsToKick will be checked before badIDDsToClose, badIDDsToClose will be checked before allowedIDDs */ +/* badIDDsToKick: Forbidden Idds that will get you Kicked by the AH */ +badIDDsToKick[] = +{ + -1338,-1337,-1341,17,19,30,32,45,56,59,62,64,69,71,110,125, + 132,133,155,156,165,166,167,312,313, + 1320,1321,1340,1341,1342,1343,1344,1345,1346,1347, + 2727,2928,2929,3030,316000,9899,0110, + 6900,552266 +}; + +/* badIDDsToClose: Forbidden Idds that will get closed by the AH */ +badIDDsToClose[] = +{ + -1,2,3,7,17,19,25,26,27,28,29,30,31,32,37,40,41,43,44,45,51,52,53,56,74,85, + 106,126,127,132,146,147,150,151,152,153,154,155,159,162,164,262, + 314,632,1320,2121,148,163,129,169,157,69,156,165,166,167,312,1321,2727, + -1341,1341 +}; + +/* Use IDD White-List ? */ UDW = "false"; +/* allowedIDDs: Insert IDDs here to prevent them from being closed! */ +allowedIDDs[] = +{ + /* default idds */ + -1,0,4,5,6,8,12,15,18,24,49,54,55,70,72,101,160,174,177,999,131,63,602,301, + + /* exile idds */ + 24001,24002,20023,24005,24004,24010,24025,20021,20017,24012,24027, + 20019,20016,24007,20024,20018,24008,24011,24015,24000,24006,24014, + 20020,24026,4002,4000,4001,4003,1500, + + 24033,24030,24029,24028,24031,24034, + + 4004,21000, // Bounty system and MarXet + 8457, // http://www.exilemod.com/topic/9040-xm8-apps/ + 65431, // r3f menu fix + 6666, // Paintshop + 0711, // Advanced Banking + 0720, // Virtual Garage + 5501,5502,5503,5504,5505,5506,5507, // BRAma Cookbook + -1339,-1340, // custom infiSTAR dialogs (some editor & a private chat menu) + + /* main idd - never delete it */ + 46 +}; + + + +/* + important check to make sure certain variables are set and have the correct type! +*/ +variableTypeChecks[] = +{ + {'ExileIsPlayingRussianRoulette',"false"}, + {'ExileClientIsHandcuffed',"false"}, + {'ExilePlayerInSafezone',"false"}, + {'ExileClientIsAutoRunning',"false"}, + {'ExileCurrentBreachingObject',objNull}, + {'ExileClientInteractionObject',objNull}, + {'HTML_LOAD_URL3',''}, + {'infiSTAR_lastJumptime',0}, + {'PLAYER_IN_VEHICLE',"false"}, + {'ExileSystemSpawnThread',[]} +}; + + +/* + it is highly recommended to have this check turned on (useBlacklistedVariableCheck = "true";) + shows "BadVariable in xxxxxxxx " in the logs. +*/ +useBlacklistedVariableCheck = "true"; +blacklistedVariables[] = +{ + "bis_debug_cam", + "arsenalopened","bis_fnc_arsenal_fullarsenal","babecore_escm_mousepos","RANDOMVAR", + "bis_fnc_dbg_reminder_value","bis_fnc_dbg_reminder","bis_menu_groupcommunication","bis_fnc_addcommmenuitem_menu", + "rscspectator","rscspectator_hints","rscspectator_display","rscspectator_playericon", + "rscspectator_view","rscspectator_map","rscspectator_vision","rscspectator_keys", + "rscspectator_interface","bis_fnc_camera_target","andy_loopz","initfileone","finie_s_p", + "time","servertime","myplayeruid","hhahaaaaar","charliesheenkeybinds","kickoff","yolo","runonce","notakeybind","action1","supa_licenses","autokick","wallaisseikun","mainmenu", + "gefclose","gefwhite","gefred","gefgreen","gefcyan","firsthint","new_queued","fn_exec","fnd_fnc_select","fnx3","antihackkick","tele","dmap","goldens_global_shit_yeah","glass911_run", + "geardialog_create","lystokeypress","thirtysix","ly_swaggerlikeus","jkeyszz","n2","boxofmagic","mainscripts","dmc_fnc_4danews","infistarbypass","exec_text","vehicle_dblclick","init_main", + "esp_count","nute_dat_bomber","s_cash100k","xposplayer","ly_re_onetime","skar_checka","mainscriptsv4","viewdistance","check_load","already_load","meins","f1","dummy","plane_jump", + "c_player","mouseclickeh","distp","nec2","menu_i_run_color_lp","glassv1nce_bindhandler","thecar","fastanimes","getinpassenger","iaimon","dmc_re_onetime","func_execonserver","fnc_serverkicknice", + "kick_admins","dasmokeon","hovering","r_kelly_be_flying","vincelol_altislife","life_fnc_byassskaroah","ah_fnc_mp","jayre","fn_newsbanner","hack_news","trollfuncs", + "fanatic_infipass","keybindings_xxx","andysclosed","userfuncs","altisfuncs","remexe","bb_nofatigue","bis_fnc_diagkey_var_code","first_page","get_in_d","i_t_s__m_e_o","smissles","whippy_esp", + "targetfuncs2","life_fnc_antifreeeeze","ly_keyforward","ty_re_onetime","life_fnc_xaaxaa","mein1","goddamnvehiclesxd","mystic_fnc_esp_distance","esp_id_setter","dummymen","whipbut","userfuncs", + "krohdofreedom","selectedplayer","lmenu1","ggplayer","throx_menu_item","lvl1","init_menu_slew","d_b_r_t_y_slew","v6_gef","xasfjisisafudmmyx","kekse","updated_re_36","first","second", + "sni_prz_zzz_targetplayer","healit","o_fnc_arma","mlrn_exec","running_threads","catchemall16117","killtarget","gmtoggle","t1","fuck_me_keyp","cheatcurator" +}; + +/* + due to new hacking methods it is necessary to check variables on objects.. + since most server have 50.000+ objects this can cost a lot client fps but it should still be used.. for the greater good! +*/ +useObjectVariableCheck = "false"; + + + +UVC_adminspawn = "false"; /* use vehicle check(s) on vehicles spawned by infiSTAR.de admin? */ +/* + Use vehicle white list? (everything not on white-list will be flagged as BadVehicle and deleted!) + "EXILE" vehicles are white-listed by default! +*/ +VehicleWhiteList_check = "false"; +VehicleWhiteList[] = +{ + "B_Parachute","B_Parachute_02_F","O_Parachute_02_F","Steerable_Parachute_F", + "I_UAV_01_F","B_HMG_01_high_F","O_HMG_01_F","B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F","O_MRAP_02_gmg_F","O_static_AT_F","Land_Camping_Light_F" +}; + +/* + Use forbidden vehicle check? (everything in the ForbiddenVehicles will be flagged as BadVehicle and deleted (even when it is on the white-list)!) +*/ +ForbiddenVehicles_check = "false"; +ForbiddenVehicles[] = +{ + "B_MBT_01_arty_F","B_Truck_01_ammo_F" +}; + +/* + If you use VehicleWhiteList_check or ForbiddenVehicles_check then the vehicle check automatically checks for locally created vehicles. + Locally created vehicles are these that get created by a player and not the server. E.g. when a player assambles a UAV or a static weapon! + Also some public posted scripts for example the "bike script" are creating the vehicle (the bike) locally (so the type of the vehicle needs to get added to the array below!). +*/ +LocalWhitelist[] = +{ + "O_HMG_01_weapon_F","O_HMG_01_F","O_HMG_01_support_F","I_UavTerminal","I_UAV_01_backpack_F", + "Exile_Bike_OldBike","B_HMG_01_F","B_HMG_01_high_F","O_HMG_01_high_F","B_Mortar_01_F" +}; + + + + +UFI = "false"; /* Use "ForbiddenItems"/Item Check(s) */ +UIW = "false"; /* if "UIW = "true";" then it checks if the items the individual player has are in "ItemWhiteList" */ +KICK_ON_DETECTION = "false"; // kick when a bad or not whitelisted item was found +ItemWhiteList[] = +{ + "AllowThisItem1","AllowThisItem2" +}; +ForbiddenItems[] = +{ + "autocannon_Base_F","autocannon_30mm","autocannon_35mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","Bomb_04_Plane_CAS_01_F", + "Bomb_03_Plane_CAS_02_F","cannon_105mm","cannon_120mm","cannon_120mm_long","cannon_125mm","Cannon_30mm_Plane_CAS_02_F","gatling_20mm", + "gatling_25mm","gatling_30mm","Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher","GMG_20mm","GMG_40mm","GMG_UGV_40mm","HMG_127_MBT", + "HMG_127","HMG_127_APC","HMG_01","HMG_M2","HMG_NSVT","LMG_Minigun2","LMG_RCWS","LMG_M200","LMG_Minigun","LMG_Minigun_heli","LMG_coax", + "Missile_AGM_02_Plane_CAS_01_F","Missile_AA_04_Plane_CAS_01_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","missiles_DAGR", + "missiles_DAR","missiles_ASRAAM","missiles_SCALPEL","missiles_titan","missiles_titan_static","missiles_Zephyr","Mk82BombLauncher","mortar_82mm", + "mortar_155mm_AMOS","rockets_Skyfire","rockets_230mm_GAT","Rocket_04_HE_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F","Rocket_03_HE_Plane_CAS_02_F", + "Rocket_03_AP_Plane_CAS_02_F","Twin_Cannon_20mm" +}; + + + +/* + custom Box content: + just an item like it is in the example with "ItemMap" will put the item once in the box. + if an array is used like the {"ItemGPS",5} example, well I assume you could guess what it will do. + + You can just define as many as you want. + { + "BOX NAME", // function name in the admin menu + { + "Item1","Item2", // one per just item in a string + {"Item1",5},{"Item2",10} // second entry in each array defiens how many of items of the first entry are wanted. + } + } + + The last closing bracket in an array can not have a "," afterwards. So make sure to have no syntax errors here. +*/ +allSupportBoxes[] = +{ + { + "Support-Box1", + { + "Exile_Item_Flag","Exile_Item_CookingPot", + {"Exile_Item_Codelock",5},{"Exile_Item_DuctTape",10},{"Exile_Item_InstaDoc",10}, + {"Exile_Item_Energydrink",10},{"Exile_Item_ExtensionCord",5},{"Exile_Item_FloodLightKit",5}, + {"Exile_Item_FortificationUpgrade",5},{"Exile_Item_FuelCanisterFull",5},{"Exile_Item_GloriousKnakworst_Cooked",10}, + {"Exile_Item_LightBulb",5},{"Exile_Item_Matches",5},{"Exile_Item_MetalBoard",5}, + {"Exile_Item_MetalPole",5},{"Exile_Item_PlasticBottleFreshWater",10},{"Exile_Item_PortableGeneratorKit",5}, + {"Exile_Item_Rope",15},{"Exile_Item_SafeKit",15},{"Exile_Magazine_Battery",15} + } + }, + { + "Support-Box2", + { + "Exile_Item_Flag", + {"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodDoorwayKit",15},{"Exile_Item_WoodDrawBridgeKit",15}, + {"Exile_Item_WoodFloorKit",15},{"Exile_Item_WoodFloorPortKit",15},{"Exile_Item_WoodGateKit",15}, + {"Exile_Item_WoodLog",15},{"Exile_Item_WoodPlank",15},{"Exile_Item_WoodStairsKit",15}, + {"Exile_Item_WoodSupportKit",15},{"Exile_Item_WoodWallHalfKit",15},{"Exile_Item_WoodWallKit",15}, + {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WorkBenchKit",15} + } + }, + { + "Support-Box3", + { + {"Exile_Item_Flag",5},{"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodWallKit",15}, + {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WoodFloorKit",15},{"Exile_Item_SafeKit",5} + } + }, + { + "Support-Box4", + { + "ItemMap",{"ItemGPS",5},"ItemWatch" + } + } +}; +}; diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AT.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AT.sqf new file mode 100644 index 0000000..eced042 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/EXILE_AT.sqf @@ -0,0 +1,4972 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + Copyright infiSTAR. All rights reserved. + + Description: + Arma AntiHack & AdminTools - infiSTAR.de +*/ +comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de'; +VERSION_DATE_IS = '10-02-2018 12-02-40'; +infiSTAR_customFunctions = []; +_configClasses = "true" configClasses (configfile >> "CfgCustomFunctions"); +{ + _configProperties = configProperties [configfile >> "CfgCustomFunctions" >> configName _x]; + _type = getNumber (_configProperties select 0); + _name = getText (_configProperties select 1); + _code = getText (_configProperties select 2); + infiSTAR_customFunctions pushBack [_type,_name,_code]; +} forEach _configClasses; +if!(infiSTAR_customFunctions isEqualTo [])then{infiSTAR_customFunctions sort true;}; +infiSTAR_MAIN_CODE = " +_log = format[' %1 - Loading Menu..',time call FN_GET_TIME_TIME];systemchat _log;diag_log _log; +fnc_admin_c = compile 'compile _this'; +fnc_admin_cc = compile 'call compile _this'; +fnc_admin_ccc = compile 'if(!isNil {call compile _this})then{call compile _this}else{''ANY''}'; +fnc_createctrl = { + params['_display','_type','_idc']; + ctrlDelete (_display displayCtrl _idc); + _ctrl = _display ctrlCreate[_type, _idc]; + _ctrl +}; +allSupportBoxesNames = "+str _allSupportBoxesNames+"; +infiSTAR_CUSTOM_RUN = []; +infiSTAR_CUSTOM_Toggleable = []; +infiSTAR_CUSTOM_OnTarget = []; +infiSTAR_customFunctions = "+str infiSTAR_customFunctions+"; +infiSTAR_HTML_LOAD = "+str _use_html_load_on_adminmenu+"; +pathToCustomBillBoardTextures = "+str _pathToCustomBillBoardTextures+"; +if!(infiSTAR_customFunctions isEqualTo [])then +{ + _counter0 = 0; + _counter1 = 0; + _counter2 = 0; + { + _type = _x select 0; + _name = _x select 1; + _code = _x select 2; + switch (_type) do + { + case 0: { + infiSTAR_CUSTOM_RUN pushBack _name; + missionNamespace setVariable[format['FNC_CUSTOM_RUN_%1',_counter0],_code call fnc_admin_c]; + _counter0 = _counter0 + 1; + }; + case 1: { + infiSTAR_CUSTOM_Toggleable pushBack _name; + missionNamespace setVariable[format['FNC_CUSTOM_TOGGLEABLE_%1',_counter1],_code call fnc_admin_c]; + _counter1 = _counter1 + 1; + }; + case 2: { + infiSTAR_CUSTOM_OnTarget pushBack _name; + missionNamespace setVariable[format['FNC_CUSTOM_ON_TARGET_%1',_counter2],_code call fnc_admin_c]; + _counter2 = _counter2 + 1; + }; + }; + } forEach infiSTAR_customFunctions; +}; +MYPUIDinfiESP = getPlayerUID player; +SHIFT_IS_PRESSED=false;CTRL_IS_PRESSED=false;ALT_IS_PRESSED=false;FILLMAINSTATE=0;LASTSUBBUTTON=1;BTN_GET_ITEM_SEL=1;BTN_SPAWN_VEH_SEL=0; +SortAlphaPlease = true;SortGroupsPlease = nil;SortRangePlease = nil; +infiSTAR_add_vehicles=true; +SELECTED_TARGET_PLAYER = player; +MAIN_DISPLAY_ID = -1338;LEFT_LISTBOX_ID = 1500;RIGHT_LISTBOX_ID = 1501; +uiNamespace setVariable['A3MAPICONS_mainMap', nil]; +uiNamespace setVariable['A3MAPICONS_mainMap', findDisplay 12 displayCtrl 51]; +if(isNil 'AH_HackLogArray')then{AH_HackLogArray = [];}; +if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = [];}; +if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = [];}; +if(isNil 'SERVER_FPS')then{SERVER_FPS = 'UNKNOWN';}; +if(isNil 'SERVER_THREADS')then{SERVER_THREADS = 'UNKNOWN';}; +if(isNil 'SERVER_LOOPTIME')then{SERVER_LOOPTIME = 'UNKNOWN';}; +if(isNil 'infiSTAR_toggled_A')then{infiSTAR_toggled_A = ['==== OnTarget ====','==== Toggleable ====','==== Custom Functions ===='];}; +if(isNil 'infiSTAR_loop_array')then{infiSTAR_loop_array = [];}; +FN_SHOW_LOG = {}; +fnc_get_selected_object = { + _target = lbtext[LEFT_LISTBOX_ID,(lbCurSel LEFT_LISTBOX_ID)]; + if(_target isEqualTo '')then + { + if(isNull SELECTED_TARGET_PLAYER)then + { + SELECTED_TARGET_PLAYER = player; + }; + } + else + { + { + _grp = group _x; + _side = side _x; + _name = _x call fnc_get_exileObjName; + _search = format['%1 [%2]',_name,_side]; + if(count units _grp > 1)then + { + _search = format['%1 [%2 (%3)]',_name,_side,_grp]; + }; + if(_search == _target)exitWith + { + SELECTED_TARGET_PLAYER = _x; + }; + } forEach (call fnc_get_plr); + }; + SELECTED_TARGET_PLAYER +}; +FN_GET_CLR = { + if(_this isEqualTo SELECTED_TARGET_PLAYER)exitWith{[1,0.7,0.15,_alpha]}; + if(!alive _this)exitWith{[1,1,1,_alpha]}; + _xuid = getPlayerUID _this; + + if(_xuid in infiSTAR_Ds && MYPUIDinfiESP in infiSTAR_Ds)exitWith{[1,0.2,1,_alpha]}; + if(_xuid in infiSTAR_ADMINS && !(_xuid in infiSTAR_Ds))exitWith{[0,1,0,_alpha]}; + + if(_this in (units(group player)))exitWith{[1,0.95,0,_alpha]}; + if(vehicle _this isEqualTo _this)exitWith{[1,0.17,0.17,_alpha]}; + [0.047,0.502,1,_alpha] +}; +TRADER_FUNCTION_ARRAY = [ + [''], + ['Exile_Trader_Armory','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_SpecialOperations','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_Equipment','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_Food','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_Hardware','ExileClient_gui_traderDialog_show',0], + [''], + ['Exile_Trader_Vehicle','ExileClient_gui_vehicleTraderDialog_show',0], + ['Exile_Trader_Aircraft','ExileClient_gui_vehicleTraderDialog_show',0], + ['Exile_Trader_Boat','ExileClient_gui_vehicleTraderDialog_show',0], + [''], + ['Exile_Trader_Office','ExileClient_gui_purchaseTerritoryDialog_show',0], + ['Exile_Trader_Office','ExileClient_gui_payTerritoryProtectionMoneyDialog_show',0], + [''], + ['Exile_Trader_WasteDump','ExileClient_gui_wasteDumpDialog_show',1], + ['Exile_Trader_VehicleCustoms','ExileClient_gui_vehicleCustomsDialog_show',1], + ['Exile_Trader_AircraftCustoms','ExileClient_gui_vehicleCustomsDialog_show',1], + ['Exile_Trader_BoatCustoms','ExileClient_gui_vehicleCustomsDialog_show',1], + [''], + ['-- customs are not set by default --'], + ['Exile_Trader_CommunityCustoms','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms2','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms3','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms4','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms5','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms6','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms7','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms8','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms9','ExileClient_gui_traderDialog_show',0], + ['Exile_Trader_CommunityCustoms10','ExileClient_gui_traderDialog_show',0] +]; +fn_STAR_validpic = { !((toLower _this) in ['','pictureheal','picturepapercar','picturething','picturestaticobject']) }; +fn_STAR_validclass = { + (getText(_x >> 'picture') call fn_STAR_validpic) && + {(configName _x) find '_Abstract' isEqualTo -1} && + { + toLower(configName _x) find '_base' isEqualTo -1 || + configName _x isEqualTo 'Exile_Item_BaseCameraKit' + } + && + { + private _status = true; + private _className = configName _x; + if (isClass (configFile >> 'CfgWeapons' >> _className >> 'LinkedItems')) then + { + private _linkedItems = 'true' configClasses (configFile >> 'CfgWeapons' >> _className >> 'LinkedItems'); + { + if (isText(_x >> 'item')) then + { + if !((getText (_x >> 'item')) isEqualTo '') exitWith + { + _status = false; + }; + }; + } forEach _linkedItems; + }; + _status + } + && + { + private _className = (configName _x); + call { + if ((_className find 'arifle') == 0) exitWith { + _className = _className select [7]; + }; + if ((_className find 'srifle') == 0) exitWith { + _className = _className select [7]; + }; + if ((_className find 'exilerifle') == 0) exitWith { + _className = _className select [12]; + }; + if ((_className find 'exilearifle') == 0) exitWith { + _className = _className select [13]; + }; + if ((_className find 'exileweapons') == 0) exitWith { + _className = _className select [14]; + }; + if ((_className find 'TaurusTracker455') == 0) exitWith { + _className = 'Taurus' + (_className select [16]); + }; + }; + if (isClass (configFile >> 'CfgWeapons' >> ('Exile_Weapon_' + _className))) then { + false + } else {true}; + } +}; +ALL_VEHS_TO_SEARCH_C = []; +ALL_VEHS_TO_SEARCH_C_EXILE = []; +ALL_VEHS_TO_SEARCH_C_OTHER = []; +{ + _configName = configName _x; + ALL_VEHS_TO_SEARCH_C pushBackUnique _configName; + if(_configName select [0,5] isEqualTo 'Exile')then{ALL_VEHS_TO_SEARCH_C_EXILE pushBackUnique _configName;}else{ALL_VEHS_TO_SEARCH_C_OTHER pushBackUnique _configName;}; +} forEach ('(call fn_STAR_validclass) && {configName _x isKindOf ''allVehicles'' && !(configName _x isKindOf ''Man'')}' configClasses (configFile >> 'CfgVehicles')); + +{ + ALL_VEHS_TO_SEARCH_C pushBackUnique _x; + ALL_VEHS_TO_SEARCH_C_OTHER pushBackUnique _x; +} forEach [ + 'Land_Pod_Heli_Transport_04_covered_F', + 'Land_Pod_Heli_Transport_04_fuel_F', + 'Land_Pod_Heli_Transport_04_box_F', + 'Land_Pod_Heli_Transport_04_repair_F', + 'Land_Pod_Heli_Transport_04_medevac_F', + 'Land_Pod_Heli_Transport_04_bench_F', + 'Land_Pod_Heli_Transport_04_covered_black_F', + 'Land_Pod_Heli_Transport_04_fuel_black_F', + 'Land_Pod_Heli_Transport_04_box_black_F', + 'Land_Pod_Heli_Transport_04_repair_black_F', + 'Land_Pod_Heli_Transport_04_medevac_black_F', + 'Land_Pod_Heli_Transport_04_bench_black_F' +]; + + + +ALLC_ITEMS = ['B_Parachute']; +ALL_MAGS_TO_SEARCH_C = []; +newAllItems_CATEGORY = []; +_bags = getArray(missionconfigfile >> 'CfgTraderCategories' >> 'Backpacks' >> 'items'); +{ + ALLC_ITEMS pushBackUnique _x; + _itemInformation = [_x] call BIS_fnc_itemType; + _category = _itemInformation select 1; + if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;}; +} forEach _bags; + +{ + _configName = configName _x; + ALLC_ITEMS pushBackUnique _configName; + _itemInformation = [_configName] call BIS_fnc_itemType; + _category = _itemInformation select 1; + if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;}; +} forEach ('(call fn_STAR_validclass) && {(getText(_x >> ''vehicleClass'') isEqualTo ''Backpacks'')}' configClasses (configFile >> 'CfgVehicles')); + +{ + _configName = configName _x; + ALLC_ITEMS pushBackUnique _configName; + _itemInformation = [_configName] call BIS_fnc_itemType; + _category = _itemInformation select 1; + if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;}; +} forEach ('call fn_STAR_validclass' configClasses (configFile >> 'CfgWeapons')); + +{ + _configName = configName _x; + ALLC_ITEMS pushBackUnique _configName; + ALL_MAGS_TO_SEARCH_C pushBackUnique _configName; + _itemInformation = [_configName] call BIS_fnc_itemType; + _category = _itemInformation select 1; + if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;}; +} forEach ('call fn_STAR_validclass' configClasses (configFile >> 'CfgMagazines')); +newAllItems_CATEGORY sort true; +{ + _itemInformation = [_x] call BIS_fnc_itemType; + _category = _itemInformation select 1; + + _variable = missionNamespace getVariable (_category+'_ARRAY'); + if(isNil '_variable')then + { + missionNamespace setVariable[(_category+'_ARRAY'),[_x]]; + } + else + { + _variable pushBackUnique _x; + missionNamespace setVariable[(_category+'_ARRAY'),_variable]; + }; +} forEach ALLC_ITEMS; +_log = format[' %1 - config data loaded!',time call FN_GET_TIME_TIME];diag_log _log; +if('==== Base Deleter ====' call ADMINLEVELACCESS)then +{ + CCG_fnc_adminClick = { + private ['_click']; + _click = _this select 0; + if(_click == '')exitWith{}; + try { + switch (_click) do { + case 'BD: Set Center' : { + call CCG_fnc_bdSetCenter; + throw 'BASEDELETER: Set Center'; + }; + case 'BD: Set Radius' : { + call CCG_fnc_bdSetRadius; + throw 'BASEDELETER: Set Radius'; + }; + case 'BD: Cancel / Remove' : { + call CCG_fnc_bdCancel; + throw 'BASEDELETER: Cancel'; + }; + case 'BD: Delete Base' : { + call CCG_fnc_bdDeleteB; + throw 'BASEDELETER: Delete Base'; + }; + case 'BD: Delete Weaponholder' : { + call CCG_fnc_bdDeleteW; + throw 'BASEDELETER: Delete Weaponholder'; + }; + }; + } catch { + systemChat _exception; + call fnc_FULLinit; + }; + }; + CCGbdObjs = []; + CCG_fnc_bdSetCenter = { + private ['_arrow']; + CCGbdCenter = getPosASL player; + _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0]; + _arrow setPosASL CCGbdCenter; + CCGbdObjs pushBack _arrow; + }; + CCG_fnc_bdSetRadius = { + private ['_arrow', '_pos', '_radius', '_angle', '_distance', '_count', '_step', '_count', '_step', '_objects']; + if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';}; + CCGbdRadius = CCGbdCenter distance (getPosASL player); + _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0]; + _arrow setPosASL CCGbdCenter; + CCGbdObjs pushBack _arrow; + _angle = 0; + _count = round((2 * pi * CCGbdRadius) / 2); + if(_count == 0)then{throw 'BASEDELETER: Center and Radius position can not be the same!';}; + for '_x' from 0 to _count do + { + private['_a', '_b', '_obj']; + _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius); + _b = (CCGbdCenter select 1) + (cos(_angle)*CCGbdRadius); + _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0]; + _obj setPosASL [_a, _b, CCGbdCenter select 2]; + CCGbdObjs pushBack _obj; + _angle = _angle + (360/_count); + }; + for '_x' from 0 to _count do + { + private['_a', '_b', '_obj']; + _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius); + _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius); + _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0]; + _obj setPosASL [_a, CCGbdCenter select 1, _b]; + CCGbdObjs pushBack _obj; + _angle = _angle + (360/_count); + }; + for '_x' from 0 to _count do + { + private['_a', '_b', '_obj']; + _a = (CCGbdCenter select 1) + (sin(_angle)*CCGbdRadius); + _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius); + _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0]; + _obj setPosASL [CCGbdCenter select 0, _a, _b]; + CCGbdObjs pushBack _obj; + _angle = _angle + (360/_count); + }; + }; + CCG_fnc_bdGetObjectsToDelete = { + if(isNil 'CCGbdCenter')exitWith{[]}; + if(isNil 'CCGbdRadius')exitWith{[]}; + _pos = ASLtoATL CCGbdCenter; + _radius = CCGbdRadius; + + _objectsToDelete = []; + { + if(_pos distance _x < CCGbdRadius)then + { + _objectsToDelete pushBackUnique _x; + }; + } forEach (allSimpleObjects []); + _objectsToDelete append (nearestObjects [_pos,['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], _radius]); + _objectsToDelete + }; + CCG_fnc_bdGetWeaponHoldersToDelete = { + if(isNil 'CCGbdCenter')exitWith{[]}; + if(isNil 'CCGbdRadius')exitWith{[]}; + nearestObjects [ASLtoATL CCGbdCenter,['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], CCGbdRadius] + }; + CCG_fnc_bdDeleteB = { + private ['_objects']; + if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';}; + if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';}; + [-5,ASLtoATL CCGbdCenter,CCGbdRadius] call fn_ACR; + systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetObjectsToDelete)]; + }; + CCG_fnc_bdDeleteW = { + private ['_objects']; + if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';}; + if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';}; + [-6,ASLtoATL CCGbdCenter,CCGbdRadius] call fn_ACR; + systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetWeaponHoldersToDelete)]; + }; + CCG_fnc_bdCancel = { + CCGbdCenter = nil; + CCGbdRadius = nil; + {if(!isNull _x)then{deleteVehicle _x;};} foreach CCGbdObjs; + CCGbdObjs = []; + }; +}; +fnc_setFocus = { + disableSerialization; + ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_LISTBOX_ID); + ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID); +}; +MAP_POSITION_CLICKED = getPos player; +MAP_OBJECT_SELECTED = objNull; +fnc_MouseButtonDown = { + if(_this select 1 isEqualTo 0)then + { + MAP_POSITION_CLICKED = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]); + _pos = MAP_POSITION_CLICKED; + if(!isNil 'fnc_getParachutePos')exitWith{ _pos call fnc_getParachutePos; }; + if(ALT_IS_PRESSED)exitWith{ + _veh = vehicle player; + if(_veh isEqualTo player)then + { + _veh setPosATL _pos; + } + else + { + if(_veh isKindOf 'AIR')then + { + _posObj = getPosATL _veh; + _pos = [_pos select 0,_pos select 1,_posObj select 2]; + }; + [1,netId player,_pos] call fn_ACR; + }; + format['Teleport to %1(GPS: %2)',_pos,mapGridPosition _pos] call fnc_adminLog; + {player reveal _x;} foreach (_pos nearObjects 50); + }; + if(!isNil'infiSTAR_dad_state')exitWith{ + if(SHIFT_IS_PRESSED)then + { + MAP_OBJECT_SELECTED = _pos nearestObject 'AllVehicles'; + if(CTRL_IS_PRESSED)then + { + DELETE_TARGET = MAP_OBJECT_SELECTED; + [MAP_OBJECT_SELECTED] call fnc_deleteVeh_selected; + MAP_OBJECT_SELECTED = objNull; + }; + } + else + { + MAP_OBJECT_SELECTED = objNull; + }; + }; + }; + true +}; +fnc_MouseButtonUp = { + if(_this select 1 isEqualTo 0)then + { + _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]); + if(isNull MAP_OBJECT_SELECTED)exitWith{true}; + if(SHIFT_IS_PRESSED && !isNil'infiSTAR_dad_state')then + { + _obj = MAP_OBJECT_SELECTED; + if(isPlayer _obj)then + { + { + if(!isNull _x)then + { + if(getPlayerUID _x != '')then + { + _name = _x call fnc_get_exileObjName; + [1,netId _x,_pos] call fn_ACR; + }; + }; + } forEach (crew _obj); + } + else + { + if(local _obj)then + { + _obj setPosATL _pos; + } + else + { + [20,netId _obj,_pos] call fn_ACR; + }; + }; + }; + MAP_OBJECT_SELECTED = objNull; + }; + false +}; +fnc_addpic = { + _status = call { + if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'}; + if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'}; + if(isClass (configFile >> 'CfgVehicles' >> _this))exitWith{'CfgVehicles'}; + ''; + }; + if!(_status isEqualTo '')then + { + _pic = (getText (configFile >> _status >> _this >> 'picture')); + if(_pic call fn_STAR_validpic)then + { + _ctrl lbSetPicture [(lbsize _ctrl)-1,_pic]; + _ctrl lbSetPictureColor [(lbsize _ctrl)-1,[1, 1, 1, 1]]; + }; + }; +}; +fnc_search = { + [ + _txt, + { + _txt = _this; + if(_txt == lastSearched)exitWith{}; + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + lbClear _ctrl; + if(LASTSUBBUTTON isEqualTo 0)then + { + if('Items spawn menu' call ADMINLEVELACCESS)then + { + { + _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName'); + if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');}; + if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');}; + if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{ + _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + }; + } forEach ALLC_ITEMS; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; + }; + }; + if(LASTSUBBUTTON isEqualTo 1)then + { + if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then + { + _ctrl lbAdd '==== Vehicles ===='; + if(!isNil 'infiSTAR_add_vehicles')then + { + { + _displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'); + if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{ + _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + if(_x select [0,5] isEqualTo 'Exile')then{_ctrl lbSetColor [_lbid, [0,1,0,1]];}; + }; + } forEach ALL_VEHS_TO_SEARCH_C; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; + }; + }; + }; + lastSearched = _txt; + [] call fnc_colorizeMain; + for '_i' from 0 to 10 do{_ctrl lbAdd '';}; + } + ] execFSM 'call.fsm'; +}; +fnc_searchNfill = { + if(isNil 'SEARCHLOOP')then{ + SEARCHLOOP = true; + if(isNil 'lastSearched')then{lastSearched = '';}; + [] spawn { + disableSerialization; + _alpha = 1; + while {true} do + { + if(isNull (findDisplay MAIN_DISPLAY_ID))exitWith{}; + if(!isNil 'stopthissearchplease')exitWith{stopthissearchplease=nil;}; + _txt = ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100); + if(_txt isEqualTo '')then + { + [] call fnc_fill_infiSTAR_Player; + waitUntil {((ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) != '')||(isNull (findDisplay MAIN_DISPLAY_ID))||(!isNil 'stopthissearchplease'))}; + } + else + { + _txt = toLower _txt; + if(FILLMAINSTATE isEqualTo 1)then + { + call fnc_search; + } + else + { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_LISTBOX_ID; + lbclear _ctrl; + _shown = []; + { + + _name = _x call fnc_get_exileObjName; + if((toLower _name) find _txt > -1)then + { + _grp = group _x; + _index = _shown pushBackUnique _grp; + if(_index > -1)then + { + _ctrl lbAdd format['______%1______',_grp]; + { + _PUIDX = getPlayerUID _x; + _side = side _x; + _grp = group _x; + _xname = _x call fnc_get_exileObjName; + _name = format['%1 [%2]',_xname,_side]; + if(count units _grp > 1)then + { + _name = format['%1 [%2 (%3)]',_xname,_side,_grp]; + }; + + _lbid = _ctrl lbAdd _name; + _veh = vehicle _x; + _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture'); + if(alive _x)then + { + if(_x isEqualTo _veh)then + { + _wpnstate = weaponState _x; + _cwep = _wpnstate select 0; + if(_cwep != '')then + { + _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture'); + }; + }; + }; + if(_xpic call fn_STAR_validpic)then + { + _ctrl lbSetPicture [_lbid,_xpic]; + _ctrl lbSetPictureColor [_lbid,[1, 1, 1, 1]]; + }; + _clr = _x call FN_GET_CLR; + _ctrl lbSetColor [_lbid,_clr]; + } forEach (units _grp); + }; + }; + } forEach (call fnc_get_plr); + }; + }; + uiSleep 0.1; + }; + SEARCHLOOP = nil; + }; + }; +}; +fnc_SearchFieldButtons = { + disableSerialization; + _display = findDisplay MAIN_DISPLAY_ID; + _others=false; + if(FILLMAINSTATE == 1)then{_others = true;}; + + _editSearch = _display displayCtrl 100; + _editSearch ctrlEnable true; + _editSearch ctrlShow true; + _editSearch ctrlSetTextColor [0.56,0.04,0.04,1]; + _editSearch ctrlSetText ''; + + _btnItems = _display displayCtrl 36; + _btnItems ctrlEnable true; + _btnItems ctrlShow true; + _btnItems buttonSetAction ' + LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons; + '; + if!('Items spawn menu' call ADMINLEVELACCESS)then + { + _btnItems ctrlEnable false; + _btnItems ctrlShow false; + }; + _ctrlL = _display displayCtrl LEFT_LISTBOX_ID; + if(isNil'ctrlL_pos_orig')then{ctrlL_pos_orig = ctrlPosition _ctrlL;}; + if(isNil'ctrleditSearch_pos_orig')then{ctrleditSearch_pos_orig = ctrlPosition _editSearch;}; + if(isNil'ctrlbtnItems_pos_orig')then{ctrlbtnItems_pos_orig = ctrlPosition _btnItems;}; + _ctrlL_pos = ctrlL_pos_orig; + _ctrleditSearch_pos = ctrleditSearch_pos_orig; + _ctrlbtnItems_pos = ctrlbtnItems_pos_orig; + if(FILLMAINSTATE in [0,3,4])then + { + _btnItems ctrlSetText 'Reset PlayerSearch'; + _btnItems buttonSetAction ' + ((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) ctrlSetText ''''; + [] call fnc_fill_infiSTAR_Player; + '; + _ctrlL_pos = [(_ctrlL_pos select 0),(_ctrlL_pos select 1)+.165,(_ctrlL_pos select 2),(_ctrlL_pos select 3)-.165]; + _ctrleditSearch_pos = [SafeZoneX,(_ctrleditSearch_pos select 1)-0.045,(_ctrlL_pos select 2),(_ctrleditSearch_pos select 3)*0.75]; + _ctrlbtnItems_pos = [SafeZoneX,(_ctrlbtnItems_pos select 1)-0.035,(_ctrlL_pos select 2),(_ctrlbtnItems_pos select 3)]; + }; + _ctrlL ctrlSetPosition _ctrlL_pos; + _ctrlL ctrlCommit 0.3; + _editSearch ctrlSetPosition _ctrleditSearch_pos; + _editSearch ctrlCommit 0.3; + _btnItems ctrlSetPosition _ctrlbtnItems_pos; + _btnItems ctrlCommit 0.3; + + if(FILLMAINSTATE == 1)then{ + _btnItems ctrlSetText 'Items'; + _btnItems buttonSetAction ' + LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons; + '; + }; + + _btnVehs = _display displayCtrl 37; + _btnVehs ctrlEnable _others; + _btnVehs ctrlShow _others; + _btnVehs buttonSetAction ' + LASTSUBBUTTON = 1;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons; + '; + if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then + { + _btnVehs ctrlEnable false; + _btnVehs ctrlShow false; + }; + + _btnTrader = _display displayCtrl 38; + _btnTrader ctrlSetText 'Trader'; + if('Trader Menu' call ADMINLEVELACCESS)then + { + _btnTrader ctrlEnable _others; + _btnTrader ctrlShow _others; + _btnTrader buttonSetAction ' + LASTSUBBUTTON = 2;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons; + '; + } + else + { + _btnTrader ctrlEnable false; + _btnTrader ctrlShow false; + _btnTrader buttonSetAction 'systemChat ''Access not allowed'';'; + }; + + call fnc_searchNfill; +}; +fnc_Loadoutmenu = { + disableSerialization; + if(isNil'missionNamespaceLoadouts')then{missionNamespaceLoadouts=[];}; + _display = findDisplay MAIN_DISPLAY_ID; + _ctrl = [_display,'IGUIBack',44464] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.554062 * safezoneW + safezoneX, + 0.8, + 0.3, + 0.2 * safezoneH + ]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscListbox',44465] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.554062 * safezoneW + safezoneX, + 0.8 + ]; + _ctrl ctrlCommit 0; + fnc_load_LoadOuts = { + infiSTAR_LoadOutARRay = profileNamespace getVariable['infiSTAR_LoadOutARRay',[]]; + lbClear (findDisplay MAIN_DISPLAY_ID displayCtrl 44465); + if!(infiSTAR_LoadOutARRay isEqualTo [])then + { + {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach infiSTAR_LoadOutARRay; + (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd ''; + }; + if!(missionNamespaceLoadouts isEqualTo [])then + { + {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach missionNamespaceLoadouts; + (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd ''; + }; + }; + call fnc_load_LoadOuts; + + _ctrl = [_display,'RscEdit',44469] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.554062 * safezoneW + safezoneX, + 0.81+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3), + (ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 2), + 0.033 * safezoneH + ]; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscButton',44466] call fnc_createctrl; + _ctrl ctrlSetText 'LOAD'; + _ctrl ctrlSetPosition [ + 0.68 * safezoneW + safezoneX, + 0.8, + 0.3, + 0.033 * safezoneH + ]; + fnc_ButtonClick_44466 = { + _txt = lbtext[44465,(lbCurSel 44465)]; + if(_txt != '')then + { + _startloadout = getunitloadout player; + + if(_txt in missionNamespaceLoadouts)exitWith + { + _m = missionNamespace getVariable _txt; + if((!isNil '_m')&&{(typeName _m == 'CODE')})then + { + call _m; + }; + + _log = format ['Changed Loadout to %1 | old: %2 | new: %3',str _txt,_startloadout,getunitloadout player]; + _log call fnc_adminLog; + }; + + if(isNil'FNC_CUSTOM_fn_loadInventory')then + { + FNC_CUSTOM_fn_loadInventory = (preprocessfile 'A3\functions_f\Inventory\fn_loadInventory.sqf') call fnc_admin_c; + }; + _fnc_scriptName='';[player, [profileNamespace, _txt]] call FNC_CUSTOM_fn_loadInventory; + _log = format ['Changed Loadout to %1 | old: %2 | new: %3',str _txt,_startloadout,getunitloadout player]; + _log call fnc_adminLog; + }; + }; + _ctrl ctrlCommit 0; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44466']; + + _ctrl = [_display,'RscButton',44467] call fnc_createctrl; + _ctrl ctrlSetText 'DELETE'; + _ctrl ctrlSetPosition [ + 0.68 * safezoneW + safezoneX, + 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2), + 0.3, + 0.033 * safezoneH + ]; + fnc_ButtonClick_44467 = { + _txt = lbtext[44465,(lbCurSel 44465)]; + if(_txt != '')then + { + if(_txt in infiSTAR_LoadOutARRay)then + { + _id = infiSTAR_LoadOutARRay find _txt; + if(_id == -1)exitWith{systemchat 'can not find Loadout';}; + _return = infiSTAR_LoadOutARRay deleteAt _id; + systemchat format['Deleted Loadout: %1',_return]; + profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace; + _fnc_scriptName='';[player, [profileNamespace, _txt]] call BIS_fnc_deleteInventory; + } + else + { + _id = missionNamespaceLoadouts find _txt; + if(_id == -1)exitWith{systemchat 'can not find Loadout';}; + _return = missionNamespaceLoadouts deleteAt _id; + systemchat format['Deleted Loadout: %1',_return]; + }; + }; + call fnc_load_LoadOuts; + }; + _ctrl ctrlCommit 0; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44467']; + + _ctrl = [_display,'RscButton',44468] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.68 * safezoneW + safezoneX, + 0.8+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3), + 0.3, + 0.033 * safezoneH + ]; + fnc_ButtonClick_44468 = { + _txt = ctrlText 44469; + if(_txt == '')exitWith{systemchat 'Type a Loadout name to save!';}; + if(count _txt > 30)exitWith{systemchat 'Loadout name should have max 30 characters!';}; + call fnc_get_selected_object; + if(isNull SELECTED_TARGET_PLAYER)exitWith{systemchat 'Player selected is NULL-OBJECT';}; + + _exit = false; + {if(toUpper _txt isEqualTo toUpper _x)exitWith{_exit=true};} forEach missionNamespaceLoadouts; + if(_exit)exitWith{systemchat 'can not overwrite missionNamespaceLoadouts Admin Loadouts';}; + + _index = infiSTAR_LoadOutARRay pushBackUnique _txt; + if(_index > -1)then + { + profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace; + }; + _fnc_scriptName='';[SELECTED_TARGET_PLAYER, [profileNamespace, _txt]] call BIS_fnc_saveInventory; + call fnc_load_LoadOuts; + }; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44468']; + _ctrl ctrlSetText 'SAVE FROM SELECTED'; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscButton',44471] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.81 * safezoneW + safezoneX, + 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2), + 0.3, + 0.033 * safezoneH + ]; + fnc_ButtonClick_44471 = { + [format['player setUnitLoadout (getUnitLoadout (objectFromNetId ''%1''))',netId player],SELECTED_TARGET_PLAYER] call admin_d0_target; + + _log = format['Cloned Gear on %1(%2)!',SELECTED_TARGET_PLAYER call fnc_get_exileObjName,getPlayerUID SELECTED_TARGET_PLAYER]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + }; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44471']; + _ctrl ctrlSetText 'CLONE ON SELECTED'; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscButton',44472] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.81 * safezoneW + safezoneX, + 0.8, + 0.3, + 0.033 * safezoneH + ]; + fnc_ButtonClick_44472 = { + player setUnitLoadout (getUnitLoadout SELECTED_TARGET_PLAYER); + + _log = format['Cloned Gear of %1(%2) on yourself!',SELECTED_TARGET_PLAYER call fnc_get_exileObjName,getPlayerUID SELECTED_TARGET_PLAYER]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + }; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44472']; + _ctrl ctrlSetText 'CLONE FROM SELECTED'; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RSCText',44463] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.677 * safezoneW + safezoneX, + 0.75, + 0.2 * safezoneW, + 0.03 * safezoneH + ]; + _ctrl ctrlSetText format['SELECTED TARGET: %1',call fnc_get_selected_object]; + _ctrl ctrlCommit 0; +}; +fnc_reallyAdditem = { + params[['_target',player],['_class','']]; + if(_class == '')exitWith{systemChat 'No Item selected!';}; + + if(local _target)then + { + _ret = [_target, _class] call ExileClient_util_playerEquipment_add; + if(!_ret)then{[_target, _class] call ExileClient_util_playerCargo_add;}; + } + else + { + _toserver = ' + _target = (objectFromNetId '+str (netId _target)+'); + _class = '+str _class+'; + + _driver = driver _target; + if(isPlayer _driver)then + { + _target setOwner (owner _driver); + } + else + { + _crew = fullCrew _target; + if!(_crew isEqualTo [])then + { + { + _unit = _x select 0; + if(isPlayer _unit)exitWith + { + _target setOwner (owner _unit); + }; + } forEach _crew; + }; + }; + + _owner = owner _target; + _code = { + params[''_target'',''_class'']; + _ret = [_target, _class] call ExileClient_util_playerEquipment_add; + if(!_ret)then{[_target, _class] call ExileClient_util_playerCargo_add;}; + }; + [[_target,_class],_code,_owner,false] call FN_infiSTAR_S; + '; + [_toserver] call admin_d0_server; + }; +}; +fnc_HTML_LOAD = { + disableSerialization; + _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin'; + if(ctrlHTMLLoaded _html)exitWith{_html ctrlEnable true;_html ctrlShow true;}; + + [ + '', + { + if(!isNil'START_LOADING_HTML')then{terminate START_LOADING_HTML;START_LOADING_HTML=nil;}; + START_LOADING_HTML = [] spawn { + disableSerialization; + _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin'; + _html htmlLoad HTML_LOAD_URL_EXILE; + _start = diag_tickTime + .2; + waitUntil {diag_tickTime > _start}; + if(!ctrlHTMLLoaded _html)exitWith{_html ctrlEnable false;_html ctrlShow false;}; + }; + } + ] execFSM 'call.fsm'; +}; +fnc_FULLinit = { + disableSerialization; + if(isNull findDisplay MAIN_DISPLAY_ID)then + { + createdialog 'infiSTAR_AdminMenu'; + call fnc_initOnceOnOpen; + call fnc_initOnKeyPress; + }; +}; +fnc_btn_html = { + infiSTAR_HTML_LOAD = !infiSTAR_HTML_LOAD; + if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;}; + [] call fnc_colorButtons; +}; +fnc_initOnceOnOpen = { + _display = findDisplay MAIN_DISPLAY_ID; + + _btn = [_display,'RscButton',1338001] call fnc_createctrl; + _btn ctrlSetText 'SAVE TOGGLE STATE'; + _btn ctrlSetPosition [ + 0.39 * safezoneW + safezoneX + (0.15 * safezoneW), + 0.0379694 * safezoneH + safezoneY, + 0.12 * safezoneW, + 0.02 * safezoneH + ]; + _btn buttonSetAction ' + profileNamespace setVariable [''infiSTAR_saveToggle'',infiSTAR_toggled_A]; + saveprofileNamespace; + _log = ''Saved currently toggled/enabled admin functions. Next time you login as admin, they will automatically turn on.''; + _log call FN_SHOW_LOG; + systemChat ('' ''+_log); + '; + _btn ctrlCommit 0; + + if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;}; +}; +fnc_initOnKeyPress = { + if!(FILLMAINSTATE in [1,2])then{FILLMAINSTATE = 0;}; + _display = findDisplay MAIN_DISPLAY_ID; + + _ctrlL = _display displayCtrl LEFT_LISTBOX_ID; + _ctrlL ctrlRemoveAllEventHandlers 'LBDblClick'; + _ctrlL ctrlRemoveAllEventHandlers 'LBSelChanged'; + _ctrlL ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_LEFT;[] call fnc_setFocus;']; + _ctrlL ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_LEFT;[] call fnc_setFocus;']; + [] call fnc_fill_infiSTAR_Player; + + _ctrlR = _display displayCtrl RIGHT_LISTBOX_ID; + _ctrlR ctrlRemoveAllEventHandlers 'LBDblClick'; + _ctrlR ctrlRemoveAllEventHandlers 'LBSelChanged'; + _ctrlR ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_RIGHT;[] call fnc_setFocus;']; + _ctrlR ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_RIGHT;[] call fnc_setFocus;']; + [] call fnc_fill_infiSTAR_MAIN; + + _ctrl = _display displayCtrl 2; + _ctrl ctrlSetText format['Players loaded in: %1 of %2 SERVER UPTIME: %3 SERVER FPS: %4 SERVER THREADS: %5 infiSTAR.de Admin Menu 10-02-2018 12-02-40 - v90',count (call fnc_get_plr),((playersNumber west)+(playersNumber east)+(playersNumber civilian)+(playersNumber resistance)),time call FN_GET_TIME_TIME,SERVER_FPS,SERVER_THREADS]; + + _btnMainMenu = _display displayCtrl 20; + _btnMainMenu buttonSetAction 'FILLMAINSTATE=0;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;'; + + _btnSpawnMenu = _display displayCtrl 21; + _btnSpawnMenu buttonSetAction 'FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;'; + + if('==== Loadouts ====' call ADMINLEVELACCESS)then{call fnc_Loadoutmenu;}; + + call fnc_SearchFieldButtons; + [] call fnc_setFocus; + [] call fnc_colorButtons; +}; +fnc_colorizeMain = { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + _lsize = lbSize RIGHT_LISTBOX_ID; + for '_i' from 0 to _lsize do + { + _lbtxt = lbtext [RIGHT_LISTBOX_ID,_i]; + if(_lbtxt in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then + { + if(_lbtxt in infiSTAR_toggled_A)then + { + _ctrl lbSetColor [_i,[0,1,0,1]]; + } + else + { + _ctrl lbSetColor [_i,[1,0,0,1]]; + }; + }; + if(_lbtxt in infiSTAR_SubMenus)then + { + _ctrl lbSetColor [_i,[0.67,0.97,0.97,1]]; + }; + if(_lbtxt in infiSTAR_OnTargetNICE)then + { + _ctrl lbSetColor [_i,[0,0.8,1,1]]; + }; + if(_lbtxt in infiSTAR_OnTargetEVIL)then + { + _ctrl lbSetColor [_i,[0.99,0.8,0.8,1]]; + }; + if(_lbtxt in infiSTAR_CUSTOM_OnTarget)then + { + _ctrl lbSetColor [_i,[0.78,0.66,0,1]]; + }; + }; +}; +fnc_colorButtons = { + call fnc_SearchFieldButtons; + disableSerialization; + _display = findDisplay MAIN_DISPLAY_ID; + _btnMainMenu = _display displayCtrl 20; + if(FILLMAINSTATE isEqualTo 0)then{_btnMainMenu ctrlSetTextColor [0,1,0,1];} else {_btnMainMenu ctrlSetTextColor [1,1,1,1];}; + _btnSpawnMenu = _display displayCtrl 21; + if(FILLMAINSTATE isEqualTo 1)then{_btnSpawnMenu ctrlSetTextColor [0,1,0,1];} else {_btnSpawnMenu ctrlSetTextColor [1,1,1,1];}; + + _btnAntiHackLog = _display displayCtrl 23; + _btnAntiHackLog ctrlSetText (format['AHLogs: %1',count AH_HackLogArray + count AH_SurvLogArray + count PVAH_AHTMPBAN]); + _btnAntiHackLog buttonSetAction 'FILLMAINSTATE=3;[] call fnc_fill_HackLog;[] call fnc_setFocus;[] call fnc_colorButtons;'; + if(FILLMAINSTATE isEqualTo 3)then{_btnAntiHackLog ctrlSetTextColor [0,1,0,1];} else {_btnAntiHackLog ctrlSetTextColor [1,1,1,1];}; + + _btnAdminLog = _display displayCtrl 24; + _btnAdminLog ctrlSetText (format['AdminLogs: %1',count AH_AdmiLogArray]); + _btnAdminLog buttonSetAction 'FILLMAINSTATE=4;[] call fnc_fill_AdminLog;[] call fnc_setFocus;[] call fnc_colorButtons;'; + if(FILLMAINSTATE isEqualTo 4)then{_btnAdminLog ctrlSetTextColor [0,1,0,1];} else {_btnAdminLog ctrlSetTextColor [1,1,1,1];}; + + _btnItems = _display displayCtrl 36; + if((LASTSUBBUTTON isEqualTo 0)&&(FILLMAINSTATE isEqualTo 1))then + { + _btnItems ctrlSetTextColor [0,1,0,1]; + + _ctrlpos = + [ + 0.2 * safezoneW + safezoneX, + 0.173 * safezoneH + safezoneY, + 0.15 * safezoneW, + 0.025 * safezoneH + ]; + + _RSCButton33401 = [_display,'RscButton',33401] call fnc_createctrl; + _RSCButton33401 ctrlSetText 'INFRONT OF TARGET'; + _RSCButton33401 ctrlSetPosition _ctrlpos; + _RSCButton33401 buttonSetAction 'BTN_GET_ITEM_SEL = 0;[] call fnc_colorButtons;'; + _RSCButton33401 ctrlCommit 0; + _RSCButton33402 = [_display,'RscButton',33402] call fnc_createctrl; + _RSCButton33402 ctrlSetText 'ON TARGET'; + _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3]; + _RSCButton33402 buttonSetAction 'BTN_GET_ITEM_SEL = 1;[] call fnc_colorButtons;'; + _RSCButton33402 ctrlCommit 0; + + if(BTN_GET_ITEM_SEL isEqualTo 0)then + { + _RSCButton33401 ctrlSetTextColor [0,1,0,1]; + _RSCButton33402 ctrlSetTextColor [1,1,1,1]; + } + else + { + _RSCButton33401 ctrlSetTextColor [1,1,1,1]; + _RSCButton33402 ctrlSetTextColor [0,1,0,1]; + }; + } + else + { + _btnItems ctrlSetTextColor [1,1,1,1]; + + ctrlDelete (_display displayCtrl 33401); + ctrlDelete (_display displayCtrl 33402); + }; + _btnVehs = _display displayCtrl 37; + if((LASTSUBBUTTON isEqualTo 1)&&(FILLMAINSTATE isEqualTo 1))then + { + _btnVehs ctrlSetTextColor [0,1,0,1]; + if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then + { + _ctrlpos = + [ + 0.2 * safezoneW + safezoneX, + 0.173 * safezoneH + safezoneY, + 0.15 * safezoneW, + 0.025 * safezoneH + ]; + + _RSCButton33401 = [_display,'RscButton',33403] call fnc_createctrl; + _RSCButton33401 ctrlSetText 'NonPersistent'; + _RSCButton33401 ctrlSetPosition _ctrlpos; + _RSCButton33401 buttonSetAction 'BTN_SPAWN_VEH_SEL = 0;[] call fnc_colorButtons;'; + _RSCButton33401 ctrlCommit 0; + _RSCButton33402 = [_display,'RscButton',33404] call fnc_createctrl; + _RSCButton33402 ctrlSetText 'Persistent'; + _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3]; + _RSCButton33402 buttonSetAction 'BTN_SPAWN_VEH_SEL = 1;[] call fnc_colorButtons;'; + _RSCButton33402 ctrlEnable true; + _RSCButton33402 ctrlCommit 0; + + if(BTN_SPAWN_VEH_SEL isEqualTo 0)then + { + _RSCButton33401 ctrlSetTextColor [0,1,0,1]; + _RSCButton33402 ctrlSetTextColor [1,1,1,1]; + } + else + { + _RSCButton33401 ctrlSetTextColor [1,1,1,1]; + _RSCButton33402 ctrlSetTextColor [0,1,0,1]; + }; + }; + } + else + { + _btnVehs ctrlSetTextColor [1,1,1,1]; + if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then + { + ctrlDelete (_display displayCtrl 33403); + ctrlDelete (_display displayCtrl 33404); + }; + }; + _btnTrader = _display displayCtrl 38; + if(LASTSUBBUTTON isEqualTo 2)then{_btnTrader ctrlSetTextColor [0,1,0,1];} else {_btnTrader ctrlSetTextColor [1,1,1,1];}; + _mytime = 0.3; + _ctrlR = _display displayCtrl RIGHT_LISTBOX_ID; + if(isNil 'ctrlposR')then{ctrlposR = ctrlPosition _ctrlR;}; + _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1),(ctrlposR select 2)*2.35,(ctrlposR select 3)]; + if(FILLMAINSTATE isEqualTo 0)then + { + _ctrlRTMP = ctrlposR; + }; + if(FILLMAINSTATE isEqualTo 1)then + { + _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1)+.25,(ctrlposR select 2),(ctrlposR select 3)-.25]; + }; + _ctrlR ctrlSetPosition _ctrlRTMP; + _ctrlR ctrlCommit _mytime; + + _btnHTML = _display displayCtrl 25; + if(infiSTAR_HTML_LOAD)then{_btnHTML ctrlSetTextColor [1,0,0,1];_btnHTML ctrlSetText 'HIDE HTML';}else{_btnHTML ctrlSetTextColor [0,1,0,1];_btnHTML ctrlSetText 'SHOW HTML';}; + (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlEnable infiSTAR_HTML_LOAD; + (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlShow infiSTAR_HTML_LOAD; +}; +fnc_fill_HackLog = { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + lbclear _ctrl; + _ctrl lbAdd 'clear ingame HackLog'; + _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT'; + _ctrl lbAdd '--------------------'; + + _ctrl lbAdd ''; + _ctrl lbAdd format['BanLog: %1',count PVAH_AHTMPBAN]; + if!(PVAH_AHTMPBAN isEqualTo [])then + { + _ctrl lbAdd 'DBL-CLICK TO REMOVE'; + { + _reason = PVAH_AHTMPBAN_REASON select _forEachIndex; + _lbid = _ctrl lbAdd format['%1',if(_reason find _x > -1)then{_x + ' | ' + _reason}else{_reason}]; + _ctrl lbSetData [_lbid,_x]; + } forEach PVAH_AHTMPBAN; + }; + + _cnt = count AH_HackLogArray; + _ctrl lbAdd format['HackLog: %1',_cnt]; + for '_i' from (_cnt - 1) to 0 step -1 do + { + _ctrl lbAdd (AH_HackLogArray select _i); + }; + + _ctrl lbAdd ''; + _cnt = count AH_SurvLogArray; + _ctrl lbAdd format['SurveillanceLog: %1',_cnt]; + for '_i' from (_cnt - 1) to 0 step -1 do + { + _ctrl lbAdd (AH_SurvLogArray select _i); + }; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; +}; +fnc_fill_AdminLog = { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + lbclear _ctrl; + if('AdminLog' call ADMINLEVELACCESS)then + { + _ctrl lbAdd 'clear ingame AdminLog'; + _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT'; + {_ctrl lbAdd _x;} forEach AH_AdmiLogArray; + } + else + { + _ctrl lbAdd 'Nothin to see here'; + }; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; +}; +infiSTAR_SubMenus = +[ + '==== Vehicles ====','==== OnTarget ====','==== Toggleable ====','==== Custom Functions ====' +]; +infiSTAR_SubMenus append newAllItems_CATEGORY; +infiSTAR_OnTargetNICE = +[ + 'Teleport - Target To Me','Teleport - Me To Target', + 'Request Steam Name','Revive','Heal','Restore','Flip Vehicle', + 'Move In My Vehicle','Move In Target Vehicle','Parachute Target', + 'Remove Unconscious','UnFreeze','UnRestrain', + 'Change Money on Player','Change Money on Bank','Change Respect' +]; +infiSTAR_OnTargetEVIL = +[ + 'Restrain','Freeze', + 'Remove Gear','Kill','Light','Explode','Force Suicide','Delete Vehicle','Eject','Eject Crew','Unconscious', + 'Force Disconnect','Kick (Silent)','Kick (Announce)', + 'Ban (Silent)','Ban (Announce)','TempBan (Silent)','TempBan (Announce)' +]; +if!(getArray(configfile >> 'CfgPatches' >> 'Ryanzombies' >> 'units') isEqualTo [])then +{ + infiSTAR_OnTargetEVIL pushBackUnique 'Spawn Zombie on Target Location!'; +}; +infiSTAR_OnTarget = infiSTAR_OnTargetNICE + infiSTAR_OnTargetEVIL; +infiSTAR_Toggleable = +[ + 'Player ESP','Player ESP (safezone style)','AI ESP','Dead ESP','Loot ESP', + 'MapIcons','Vehicle Marker','Flag Marker (with radius)','Box/Safe/Container Marker','DeadPlayer Marker','Stealth / Invisible', + 'God Mode','God Mode (no stats change)','Vehicle God Mode','Vehboost','UnlimAmmo','noRecoil','FastFire','Lower Terrain', + 'Disable Announces','Teleport In Facing Direction (10m steps)','Show Server Information','Drag and drop units on the map' +]; +fnc_fill_infiSTAR_MAIN = { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + lbclear _ctrl; + if(FILLMAINSTATE == 1)then + { + switch (LASTSUBBUTTON) do { + case 0:{ + if('Items spawn menu' call ADMINLEVELACCESS)then + { + { + _category = _x; + _ctrl lbAdd _category; + + _varstate = missionNamespace getVariable (_category+'SHOW_STATE'); + if(!isNil '_varstate')then + { + _variable = missionNamespace getVariable (_category+'_ARRAY'); + { + _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName'); + if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');}; + if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');}; + + _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + } forEach _variable; + }; + + } forEach newAllItems_CATEGORY; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; + }; + }; + case 1:{ + if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then + { + _ctrl lbAdd '==== Vehicles ===='; + if(!isNil 'infiSTAR_add_vehicles')then + { + _lbid = _ctrl lbAdd 'Exile vehicles:'; + _ctrl lbSetColor [_lbid, [0,1,0,1]]; + { + _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + _ctrl lbSetColor [_lbid, [0,1,0,1]]; + } forEach ALL_VEHS_TO_SEARCH_C_EXILE; + + _ctrl lbAdd ''; + _ctrl lbAdd 'Other vehicles:'; + { + _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + } forEach ALL_VEHS_TO_SEARCH_C_OTHER; + }; + }; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; + }; + case 2:{ + _lbid = _ctrl lbAdd '!!! ATTENTION !!!';_ctrl lbSetData [_lbid,'-1337']; + _lbid = _ctrl lbAdd 'Trader menus might be a bit buggy.';_ctrl lbSetData [_lbid,'-1337']; + { + _lbid = _ctrl lbAdd (_x select 0); + if(count _x isEqualTo 1)then{_ctrl lbSetData [_lbid,'-1337'];}else{_ctrl lbSetData [_lbid,str _forEachIndex];}; + } forEach TRADER_FUNCTION_ARRAY; + }; + default {lbclear _ctrl;}; + }; + }; + if(FILLMAINSTATE == 0)then + { + _onTarget = []; + {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetNICE; + + if!(_onTarget isEqualTo [])then{_onTarget pushBack '---';}; + {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetEVIL; + if!(_onTarget isEqualTo [])then + { + _ctrl lbAdd '==== OnTarget ===='; + if(isNil 'infiSTAR_add_OnTarget')then + { + {_ctrl lbAdd _x;} forEach _onTarget; + }; + }; + + + _Toggleable = []; + {if(_x call ADMINLEVELACCESS)then{_Toggleable pushBack _x;};} forEach infiSTAR_Toggleable; + if!(_Toggleable isEqualTo [])then + { + _ctrl lbAdd '==== Toggleable ===='; + if(isNil 'infiSTAR_add_Toggleable')then + { + {_ctrl lbAdd _x;} forEach _Toggleable; + }; + }; + + + if('Spawn Ammo' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Spawn Ammo';}; + if('Change ViewDistance' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Change ViewDistance';}; + if('FreeRoam Cam (does not work with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'FreeRoam Cam (does not work with ESP)'}; + if('BIS FreeRoam Cam (works with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'BIS FreeRoam Cam (works with ESP)'}; + + if('Spawn Support-Boxes' call ADMINLEVELACCESS)then + { + _ctrl lbAdd ''; + { + _ctrl lbAdd _x; + } forEach allSupportBoxesNames; + }; + + if('Create Billboard' call ADMINLEVELACCESS)then + { + _ctrl lbAdd ''; + { + _index = _ctrl lbAdd format['Create Billboard: %1',_x select 0]; + } forEach pathToCustomBillBoardTextures; + }; + + _ctrl lbAdd ''; + if('Arsenal' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Arsenal';}; + if('Arsenal' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Arsenal (Mousewheel)';}; + if('Copy Worldspace(coords) to RPT & Chat' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Copy Worldspace(coords) to RPT & Chat';}; + if('Mass Message' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Mass Message';}; + if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Day'}; + if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Night'}; + if('AdminConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'AdminConsole';}; + if('DebugConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'DebugConsole';}; + if('Login as Arma Admin' call ADMINLEVELACCESS)then + { + if(isNil 'serverCommandLoginDone')then{_ctrl lbAdd 'Login';}else{_ctrl lbAdd 'Logout';}; + }; + _ctrl lbAdd 'Unban (opens a field to type in a UID)'; + + _ctrl lbAdd ''; + _ctrl lbAdd 'Self Disconnect'; + _ctrl lbAdd ''; + + if('==== Base Deleter ====' call ADMINLEVELACCESS)then + { + _index = _ctrl lbAdd '==== Base Deleter ===='; + _ctrl lbSetColor [_index, [0.2,0.4,1,1]]; + if(isNil 'infiSTAR_add_BaseDeleter')then + { + _ctrl lbAdd 'BD: Set Center'; + if(!isNil 'CCGbdCenter')then{ + _ctrl lbAdd 'BD: Set Radius'; + }; + if(!isNil 'CCGbdCenter' && !isNil 'CCGbdRadius')then{ + _ctrl lbAdd ''; + _objects = call CCG_fnc_bdGetObjectsToDelete; + _ctrl lbAdd format['BD: Selected %1 Objects', count _objects]; + _index = _ctrl lbAdd 'BD: Delete Base'; + _ctrl lbSetColor [_index, [0.8,0,0,1]]; + + _ctrl lbAdd ''; + + _objects = call CCG_fnc_bdGetWeaponHoldersToDelete; + _ctrl lbAdd format['BD: Selected %1 WeaponHolder', count _objects]; + _index = _ctrl lbAdd 'BD: Delete Weaponholder'; + _ctrl lbSetColor [_index, [0.8,0,0,1]]; + _ctrl lbAdd ''; + }; + _ctrl lbAdd 'BD: Cancel / Remove'; + _ctrl lbAdd ''; + }; + }; + + if(!isNil'infiSTAR_customFunctions')then + { + _customFunctions = []; + {if((_x select 1) call ADMINLEVELACCESS)then{_customFunctions pushBack (_x select 1);};} forEach infiSTAR_customFunctions; + if!(_customFunctions isEqualTo [])then + { + + _ctrl lbAdd '==== Custom Functions ===='; + if(isNil 'infiSTAR_add_customFunctions')then + { + {_ctrl lbAdd _x;} forEach _customFunctions; + }; + }; + }; + + _ctrl lbAdd ''; + _ctrl lbAdd 'Keybinds:'; + _ctrl lbAdd 'F1 - Default AdminMenu Key'; + _ctrl lbAdd 'TAB - infiSTAR Custom Keybinds Menu'; + _ctrl lbAdd 'TYPE !admin in Chat to relog as player/admin'; + }; + [] call fnc_colorizeMain; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; +}; +fnc_get_plr = {allPlayers}; +fnc_fill_infiSTAR_Player_REAL = { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_LISTBOX_ID; + lbclear _ctrl; + _unsorted = call fnc_get_plr; + _sorted = _unsorted; + lbclear _ctrl; + if!(_sorted isEqualTo [])then + { + _fnc_addPlayerToList = { + if(isNull _x)exitWith{}; + _PUIDX = getPlayerUID _x; + if(_PUIDX == '')exitWith{}; + _side = side _x; + + _grp = group _x; + _xname = _x call fnc_get_exileObjName; + _name = format['%1 [%2]',_xname,_side]; + if(count units _grp > 1)then + { + _name = format['%1 [%2 (%3)]',_xname,_side,_grp]; + }; + _index = _ctrl lbAdd _name; + + _veh = vehicle _x; + _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture'); + if(alive _x)then + { + if(_x == _veh)then + { + _wpnstate = weaponState _x; + _cwep = _wpnstate select 0; + if(_cwep != '')then + { + _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture'); + }; + }; + }; + if(_xpic call fn_STAR_validpic)then + { + _ctrl lbSetPicture [_index,_xpic]; + _ctrl lbSetPictureColor [_index,[1, 1, 1, 1]]; + }; + _alpha = 1; + _clr = _x call FN_GET_CLR; + _ctrl lbSetColor [_index,_clr]; + }; + if(!isNil'SortAlphaPlease')exitWith + { + {call _fnc_addPlayerToList} forEach _sorted; + }; + if(!isNil'SortGroupsPlease')exitWith + { + _shown = []; + { + _grp = group _x; + if!(_grp in _shown)then + { + _shown pushBack _grp; + + _ctrl lbAdd format['______%1______',_grp]; + { + call _fnc_addPlayerToList; + } forEach (units _grp); + }; + } forEach _sorted; + }; + if(!isNil'SortRangePlease')exitWith + { + sortRangePos = if(positionCameraToWorld [0,0,0] distance cameraOn > 10)then{positionCameraToWorld [0,0,0]}else{cameraOn}; + _sorted = [_unsorted,[],{sortRangePos distance _x},'ASCEND'] call BIS_fnc_sortBy; + {call _fnc_addPlayerToList} forEach _sorted; + }; + }; + _display = findDisplay MAIN_DISPLAY_ID; + _btnSortAlpha = _display displayCtrl 10;if(!isNil 'SortAlphaPlease')then{lbSort _ctrl;_btnSortAlpha ctrlSetTextColor [0,1,0,1];} else {_btnSortAlpha ctrlSetTextColor [1,1,1,1];}; + _btnSortGroups = _display displayCtrl 11;if(!isNil 'SortGroupsPlease')then{_btnSortGroups ctrlSetTextColor [0,1,0,1];} else {_btnSortGroups ctrlSetTextColor [1,1,1,1];}; + _btnSortRange = _display displayCtrl 12;if(!isNil 'SortRangePlease')then{_btnSortRange ctrlSetTextColor [0,1,0,1];} else {_btnSortRange ctrlSetTextColor [1,1,1,1];}; + _ctrl lbAdd '-----------------------------------'; + _index = _ctrl lbAdd '[Selected]';_ctrl lbSetColor [_index,[1,0.7,0.15,1]]; + _index = _ctrl lbAdd '[In Vehicle]';_ctrl lbSetColor [_index,[0.047,0.502,1,1]]; + _index = _ctrl lbAdd '[Player]';_ctrl lbSetColor [_index,[1,0.17,0.17,1]]; + _index = _ctrl lbAdd '[Group]';_ctrl lbSetColor [_index,[1,0.95,0,1]]; + _index = _ctrl lbAdd '[Admin]';_ctrl lbSetColor [_index,[0,1,0,1]]; + _index = _ctrl lbAdd '[Dead Player]';_ctrl lbSetColor [_index,[1,1,1,1]]; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; +}; +fnc_fill_infiSTAR_Player = { + [ + '', + { + call fnc_fill_infiSTAR_Player_REAL + } + ] execFSM 'call.fsm'; +}; +fnc_LBDblClick_LEFT = { + if(!isNil 'SELECTED_TARGET_PLAYER')then + { + if(!isNull SELECTED_TARGET_PLAYER)then + { + if('spectating' call ADMINLEVELACCESS)then{SELECTED_TARGET_PLAYER call fnc_beginspectate;}; + }; + }; +}; +fnc_LBSelChanged_LEFT = { + _obj = call fnc_get_selected_object; + if(!isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 44463))then + { + (findDisplay MAIN_DISPLAY_ID displayCtrl 44463) ctrlSetText format['SELECTED TARGET: %1',SELECTED_TARGET_PLAYER]; + }; + if(visibleMap)then + { + (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlMapAnimAdd [1, 0.1, getPos _obj]; + ctrlMapAnimCommit (uiNamespace getVariable 'A3MAPICONS_mainMap'); + }; + _obj +}; +fnc_GET_ITEM = { + _target = call fnc_get_selected_object; + if((BTN_GET_ITEM_SEL isEqualTo 0)&&!(FILLMAINSTATE isEqualTo 6))then + { + _posATL = getPosATL _target; + _pos = _target modelToWorld [0,1.5,0]; + _pos set[2,_posATL select 2]; + [3,netId _target,_pos,_class] call fn_ACR; + + _log = format['Spawning %1 on the ground infront of %2!',_click,_target call fnc_get_exileObjName]; + _log call fnc_adminLog; + _log call FN_SHOW_LOG; + } + else + { + [_target,_class] call fnc_reallyAdditem; + _log = format['Spawning %1 on %2!',_click,_target call fnc_get_exileObjName]; + _log call fnc_adminLog; + _log call FN_SHOW_LOG; + }; +}; +FN_EXILE_VEH_TRADER_ADMIN = { + if((player isEqualTo (vehicle player))&&((_this select 2 isEqualTo 1)))exitWith + { + systemChat ' You need to be in a Vehicle to use this!' + }; + _obj = (_this select 0) createVehicleLocal (getPos player); + _obj setVariable ['ExileTraderType',(_this select 0)]; + _obj call (missionNamespace getVariable (_this select 1)); + deleteVehicle _obj; +}; +fnc_toggleables = { + _stop = false; + switch (_this) do { + case 'Player ESP':{call fnc_PlayerESP_NORM;}; + case 'Player ESP (safezone style)':{call fnc_PlayerESP_SS;}; + case 'AI ESP':{if(isNil 'fnc_infiESP_stateAI')then{fnc_infiESP_stateAI = 1;}else{fnc_infiESP_stateAI = nil;};call fnc_call_single_esps;}; + case 'Dead ESP':{if(isNil 'fnc_infiESP_stateDEAD')then{fnc_infiESP_stateDEAD = 1;}else{fnc_infiESP_stateDEAD = nil;};call fnc_call_single_esps;}; + case 'Loot ESP':{call fnc_LootESP;}; + case 'MapIcons':{call infiSTAR_A3MAPICONS;}; + case 'Vehicle Marker':{call adminVehicleMarker;}; + case 'Flag Marker (with radius)':{call adminFlagMark;}; + case 'Box/Safe/Container Marker':{call adminContainerMark;}; + case 'DeadPlayer Marker':{call adminDeadPlayer;}; + case 'God Mode':{if('God Mode (no stats change)' in infiSTAR_toggled_A)exitWith{systemChat 'Please disable God Mode (no stats change) first.';_stop=true;};call infiSTAR_A3Invulnerability;}; + case 'God Mode (no stats change)':{if('God Mode' in infiSTAR_toggled_A)exitWith{systemChat 'Please disable God Mode first.';_stop=true;};call infiSTAR_A3Invulnerability2;}; + case 'Vehicle God Mode':{call fnc_infiSTAR_A3cargod;}; + case 'Lower Terrain':{call fnc_LowerTerrain;}; + case 'Vehboost':{call infiSTAR_VehicleBoost;}; + case 'UnlimAmmo':{call fnc_infiSTAR_A3UnlAmmo;}; + case 'noRecoil':{call fnc_infiSTAR_A3noRecoil;}; + case 'FastFire':{call fnc_infiSTAR_A3FF;}; + case 'Stealth / Invisible':{call fnc_infiSTARHIDE;}; + case 'Disable Announces':{call fnc_DisableAnnouncements;}; + case 'Teleport In Facing Direction (10m steps)':{if(isNil'infiSTAR_TpdirectionENABLED')then{infiSTAR_TpdirectionENABLED=true}else{infiSTAR_TpdirectionENABLED=nil;};}; + case 'Show Server Information':{call FN_SERVER_INFORMATION_OVERLAY;}; + case 'Drag and drop units on the map':{if(isNil'infiSTAR_dad_state')then{infiSTAR_dad_state=true}else{infiSTAR_dad_state=nil;};}; + }; + if(_stop)exitWith{}; + if(_this in infiSTAR_CUSTOM_Toggleable)then + { + _id = infiSTAR_CUSTOM_Toggleable find _this; + if!(_id isEqualTo -1)then + { + call (missionNamespace getVariable format['FNC_CUSTOM_TOGGLEABLE_%1',_id]); + }; + }; + if(_this in infiSTAR_toggled_A)then + { + lbSetColor [RIGHT_LISTBOX_ID,1,[1,0,0,1]]; + infiSTAR_toggled_A = infiSTAR_toggled_A - [_this]; + _log = format['%1 - OFF',_this]; + _log call fnc_adminLog; + _log call FN_SHOW_LOG; + } + else + { + lbSetColor [RIGHT_LISTBOX_ID,1,[0,1,0,1]]; + infiSTAR_toggled_A pushBack _this; + _log = format['%1 - ON',_this]; + _log call fnc_adminLog; + _log call FN_SHOW_LOG; + }; +}; +fnc_LBDblClick_RIGHT = { + _click = lbtext[RIGHT_LISTBOX_ID,(lbCurSel RIGHT_LISTBOX_ID)]; + _lbData = lbData[RIGHT_LISTBOX_ID,(lbCurSel RIGHT_LISTBOX_ID)]; + if(_click isEqualTo '')exitWith{}; + if(_lbData in PVAH_AHTMPBAN)exitWith{ + [-667,_lbData] call fn_ACR; + systemchat format['Removed %1 from TempBan Variable. Might still be banned in ban(s).txt',_lbData]; + [] call fnc_fill_HackLog;[] call fnc_setFocus; + }; + if(FILLMAINSTATE isEqualTo 1 && LASTSUBBUTTON isEqualTo 2)exitWith + { + _num = parseNumber _lbData; + if(_num isEqualTo -1337)exitWith{}; + (TRADER_FUNCTION_ARRAY select _num) call FN_EXILE_VEH_TRADER_ADMIN; + }; + if(_click in infiSTAR_CUSTOM_RUN)exitWith + { + _id = infiSTAR_CUSTOM_RUN find _click; + if!(_id isEqualTo -1)then + { + call (missionNamespace getVariable format['FNC_CUSTOM_RUN_%1',_id]); + }; + }; + if('==== Base Deleter ====' call ADMINLEVELACCESS)then{[_click] call CCG_fnc_adminClick;}; + if(_click in AH_HackLogArray)exitWith{systemchat _click;diag_log _click;}; + if(_click in AH_SurvLogArray)exitWith{systemchat _click;diag_log _click;}; + if(_click in AH_AdmiLogArray)exitWith{systemchat _click;diag_log _click;}; + if(_click in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then{_click call fnc_toggleables;}; + if(_click in (infiSTAR_OnTarget+infiSTAR_CUSTOM_OnTarget))then + { + _unit = call fnc_get_selected_object; + + if(_click == 'Light')exitWith{[_unit] call fnc_Light_selected;}; + if(_click == 'Kill')exitWith{[_unit] call fnc_Kill_selected;}; + if(_click == 'Explode')exitWith{[_unit] call fnc_Explode_selected;}; + if(_click == 'Force Suicide')exitWith{[_unit] call fnc_fsuicide_selected;}; + if(_click == 'Delete Vehicle')exitWith{[_unit] call fnc_deleteVeh_selected;}; + + if(_click == 'Change Money on Player')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,0] spawn fnc_ExileMoneyRespectChange;}; + if(_click == 'Change Money on Bank')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,1] spawn fnc_ExileMoneyRespectChange;}; + if(_click == 'Change Respect')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,2] spawn fnc_ExileMoneyRespectChange;}; + + _log = format['%1 - %2(%3)',_click,_unit call fnc_get_exileObjName,getPlayerUID _unit];_log call fnc_adminLog; + + if(_click == 'Teleport - Target To Me')exitWith{[_unit] call fnc_TP2ME;}; + if(_click == 'Teleport - Me To Target')exitWith{[_unit] call fnc_TPME2;}; + if(_click == 'Request Steam Name')exitWith{[_unit] call fnc_getSteamName;}; + if(_click == 'Revive')exitWith{[_unit] call fnc_ReviveTarget;}; + if(_click == 'Heal')exitWith{[_unit] call fnc_HealTarget;}; + if(_click == 'Restore')exitWith{[_unit] call fnc_RepairTarget;}; + if(_click == 'Flip Vehicle')exitWith{[_unit] call fnc_flipVeh;}; + if(_click == 'Move In My Vehicle')exitWith{[_unit] call fnc_MoveInMyVehicle;}; + if(_click == 'Move In Target Vehicle')exitWith{[_unit] call fnc_MoveInTargetVehicle;}; + if(_click == 'Parachute Target')exitWith{[_unit] call fnc_MoveInParachute;}; + if(_click == 'Freeze')exitWith{[_unit,true] call fnc_freezeTarget;}; + if(_click == 'UnFreeze')exitWith{[_unit,false] call fnc_freezeTarget;}; + if(_click == 'Unconscious')exitWith{[_unit,true] call fnc_unconscious;}; + if(_click == 'Remove Unconscious')exitWith{[_unit,false] call fnc_unconscious;}; + if(_click == 'Spawn Zombie on Target Location!')exitWith{[_unit,true] call fnc_zombieOnTarget;}; + if(_click == 'Restrain')exitWith{[_unit,true] call fnc_restrainTarget;}; + if(_click == 'UnRestrain')exitWith{[_unit,false] call fnc_restrainTarget;}; + if(_click == 'Remove Gear')exitWith{[_unit] call fnc_RemoveGear;}; + if(_click == 'Eject')exitWith{[_unit] call fnc_EjectTargetVeh;}; + if(_click == 'Eject Crew')exitWith{[_unit] call fnc_EjectCrewTargetVeh;}; + if(_click == 'Force Disconnect')exitWith{[_unit] call fnc_Disconnect_selected;}; + if(_click == 'Kick (Silent)')exitWith{[_unit,0,0] call fnc_do_target;}; + if(_click == 'Kick (Announce)')exitWith{[_unit,0,1] call fnc_do_target;}; + if(_click == 'Ban (Silent)')exitWith{[_unit,1,0] call fnc_do_target;}; + if(_click == 'Ban (Announce)')exitWith{[_unit,1,1] call fnc_do_target;}; + if(_click == 'TempBan (Silent)')exitWith{[_unit,2,0] call fnc_do_target;}; + if(_click == 'TempBan (Announce)')exitWith{[_unit,2,1] call fnc_do_target;}; + if(_click in infiSTAR_CUSTOM_OnTarget)then + { + _id = infiSTAR_CUSTOM_OnTarget find _click; + if!(_id isEqualTo -1)then + { + _unit call (missionNamespace getVariable format['FNC_CUSTOM_ON_TARGET_%1',_id]); + }; + }; + }; + + _exitHere = false; + { + if(_click isEqualTo _x)exitWith{[_x,_forEachIndex] call fnc_create_Box;_exitHere=true;}; + } forEach allSupportBoxesNames; + if(_exitHere)exitWith{true}; + + _exitHere = false; + { + if(_click isEqualTo format['Create Billboard: %1',_x select 0])exitWith + { + _forEachIndex call fnc_createBillboard; + }; + } forEach pathToCustomBillBoardTextures; + if(_exitHere)exitWith{true}; + + switch (_click) do { + case '==== OnTarget ====':{if(isNil 'infiSTAR_add_OnTarget')then{infiSTAR_add_OnTarget = true;} else {infiSTAR_add_OnTarget = nil;};}; + case '==== Toggleable ====':{if(isNil 'infiSTAR_add_Toggleable')then{infiSTAR_add_Toggleable = true;} else {infiSTAR_add_Toggleable = nil;};}; + case '==== Base Deleter ====':{if(isNil 'infiSTAR_add_BaseDeleter')then{infiSTAR_add_BaseDeleter = true;} else {infiSTAR_add_BaseDeleter = nil;};}; + case '==== Custom Functions ====':{if(isNil 'infiSTAR_add_customFunctions')then{infiSTAR_add_customFunctions = true;} else {infiSTAR_add_customFunctions = nil;};}; + case '==== Vehicles ====':{if(isNil 'infiSTAR_add_vehicles')then{infiSTAR_add_vehicles = true;} else {infiSTAR_add_vehicles = nil;};}; + case 'clear ingame HackLog':{[0] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_HackLog;}; + case 'clear ingame AdminLog':{[1] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_AdminLog;}; + case 'BIS FreeRoam Cam (works with ESP)':{call fnc_BIS_FreeRoamCam;_click call fnc_adminLog;}; + case 'FreeRoam Cam (does not work with ESP)':{call fnc_FreeRoamCam;_click call fnc_adminLog;}; + case 'Day':{11 call fnc_changeTime;_click call fnc_adminLog;}; + case 'Night':{23 call fnc_changeTime;_click call fnc_adminLog;}; + case 'AdminConsole':{[] call fnc_workplace;}; + case 'DebugConsole':{[] spawn fnc_RscDisplayDebugPublic;}; + case 'Arsenal':{['Open',true] call BIS_fnc_arsenal;}; + case 'Arsenal (Mousewheel)':{ [] call fn_addArsenalAction; }; + case 'Copy Worldspace(coords) to RPT & Chat':{[] call fnc_worldspace;}; + case 'Mass Message':{[] call fnc_mass_message;}; + case 'Spawn Ammo':{[] call infiSTAR_A3addAmmo;}; + case 'Change ViewDistance':{[] call FN_CHANGE_VIEWDISTANCE;}; + case 'Self Disconnect':{_click call fnc_adminLog;(finddisplay 46) closeDisplay 0;}; + case 'Unban (opens a field to type in a UID)':{_click call fnc_adminLog;[] call fn_infiSTAR_Unban;}; + }; + if(_click in newAllItems_CATEGORY)then + { + _varstate = missionNamespace getVariable (_click+'SHOW_STATE'); + if(isNil '_varstate')then + { + missionNamespace setVariable[(_click+'SHOW_STATE'),true]; + } + else + { + missionNamespace setVariable[(_click+'SHOW_STATE'),nil]; + }; + }; + _class = lbData[RIGHT_LISTBOX_ID,(lbCurSel RIGHT_LISTBOX_ID)]; + if(_class in ALLC_ITEMS)exitWith + { + call fnc_GET_ITEM; + }; + if(_class in ALL_VEHS_TO_SEARCH_C)exitWith + { + if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))exitWith{}; + + _target = call fnc_get_selected_object; + _position = AGLToASL (_target modelToWorld [0,10,0]); + _dir = getDir (vehicle _target); + + if(BTN_SPAWN_VEH_SEL isEqualTo 0)then + { + _log = format['Spawning %1 infront of %2! (NonPersistent)',_click,_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + [0,_class,_position,_dir,netId _target,false] call fn_ACR; + format['spawning %1 (NonPersistent)',_click] call fnc_adminLog; + } + else + { + _log = format['Spawning %1 infront of %2! (Persistent)',_click,_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + [0,_class,_position,_dir,netId _target,true] spawn { + disableSerialization; + _array = _this; + call ExileClient_gui_interactionMenu_unhook; + ExileClientInteractionObject = player; + _pincode = 4 call ExileClient_gui_keypadDialog_show; + _array pushBack _pincode; + _array call fn_ACR; + }; + format['spawning %1 (Persistent)',_click] call fnc_adminLog; + }; + }; + if(_click == 'Login')then{serverCommandLoginDone = true;serverCommand ('#login '+passwordAdmin);}; + if(_click == 'Logout')then{serverCommandLoginDone = nil;serverCommand '#logout';}; + if((FILLMAINSTATE == 0)||(FILLMAINSTATE == 1))then{[] call fnc_fill_infiSTAR_MAIN;}; +}; +fnc_LBSelChanged_RIGHT = { + _class = lbData[RIGHT_LISTBOX_ID,(lbCurSel RIGHT_LISTBOX_ID)]; + _cfg = call { + if(isClass (configFile >> 'CfgWeapons' >> _class))exitWith{'CfgWeapons'}; + if(isClass (configFile >> 'CfgMagazines' >> _class))exitWith{'CfgMagazines'}; + if(isClass (configFile >> 'CfgVehicles' >> _class))exitWith{'CfgVehicles'}; + '' + }; + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8406); + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8407); + if(_cfg != '')then + { + _txt = gettext(configFile >> _cfg >> _class >> 'Library' >> 'libTextDesc'); + if(_txt isEqualTo '')then{_txt = 'by infiSTAR.de';}; + if(_cfg isEqualTo 'CfgVehicles')then + { + _salesPrice = getNumber(missionConfigFile >> 'CfgExileArsenal' >> _class >> 'price'); + if(_salesPrice isEqualTo 0)then{_salesPrice = 'unknown';}else{_salesPrice = format['%1 PopTabs',_salesPrice];}; + _vehicleConfig = configFile >> _cfg >> _class; + _info = format['Capacity: %1 Armor: %2 Fuel: %3 MaxSpeed: %4 Price: %5',getNumber(_vehicleConfig>>'maximumLoad'),getNumber(_vehicleConfig>>'armor'),getNumber(_vehicleConfig>>'fuelCapacity'),getNumber(_vehicleConfig>>'maxSpeed'),_salesPrice]; + _log = format['Class: %1 %2',_class,_info]; + _txt=(_info+'
'+_txt); + }; + _ctrlText = ''+_txt+' '; + _pic = (getText (configFile >> _cfg >> _class >> 'picture')); + if(_pic call fn_STAR_validpic)then + { + _ctrlText = _ctrlText + '
'; + }; + _ctrl = [findDisplay MAIN_DISPLAY_ID,'RscStructuredText',8406] call fnc_createctrl; + _ctrl ctrlSetPosition [1.05,0.355 * safezoneH + safezoneY,0.65,0.5]; + _ctrl ctrlSetBackgroundColor [0,0,0,0.6]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetStructuredText parseText _ctrlText; + + _ctrl = [findDisplay MAIN_DISPLAY_ID,'RSCEdit',8407] call fnc_createctrl; + _ctrl ctrlSetPosition [0.59,safezoneY + safezoneH - 0.06,count _class / 100,0.05]; + _ctrl ctrlSetPosition [1.05,(0.355 * safezoneH + safezoneY)-0.05,0.65,0.05]; + _ctrl ctrlSetBackgroundColor [0,0,0,0.6]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetText _class; + }; +}; +fnc_getConfig = { + _cfg = ''; + if(isClass (configFile >> 'CfgWeapons' >> _this))then + { + _cfg = 'CfgWeapons'; + } + else + { + if(isClass (configFile >> 'CfgMagazines' >> _this))then + { + _cfg = 'CfgMagazines'; + } + else + { + if(isClass (configFile >> 'CfgVehicles' >> _this))then + { + _cfg = 'CfgVehicles'; + }; + }; + }; + _cfg +}; +admin_showGear = { + if(!isNull cameraOn)then + { + if(!isNil'show_gear_thread')then{terminate show_gear_thread;show_gear_thread=nil;}; + show_gear_thread = [] spawn { + waitUntil {closeDialog 0;!dialog}; + createGearDialog [cameraOn,'RscDisplayInventory']; + }; + _log = format['Showing Gear of %1',cameraOn call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + }; +}; +show_spectate_overlay = true; +fn_infiSTAR_admin_ToggleSpectateOverlay = { + show_spectate_overlay = !show_spectate_overlay; + if(show_spectate_overlay)then + { + _log = '+ Showing spectate overlay'; + _log call FN_SHOW_LOG; + } + else + { + _log = '- Removed spectate overlay'; + _log call FN_SHOW_LOG; + }; +}; +fn_infiSTAR_admin_endSpectate = { + if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;}; + (vehicle player) switchCamera cameraView; + ctrlDelete ((findDisplay 46) displayCtrl 3025); + if(cameraOn isEqualTo (vehicle player))exitWith{}; + _log = 'Finished spectating.'; + _log call FN_SHOW_LOG; +}; +fnc_beginspectate = { + if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;}; + SPECTATE_THREAD = _this spawn { + disableSerialization; + _unit = _this; + _uid = getPlayerUID _unit; + _log = format['SPECTATE - switchedCamera on %1(%2) - %3',_unit call fnc_get_exileObjName,_uid,typeOf (vehicle _unit)]; + _log call fnc_adminLog; + + _ctrl = [findDisplay 46,'RscStructuredText',3025] call fnc_createctrl; + _ctrl ctrlSetPosition [safezoneX+0.2,safezoneY+0.1,0.8,1]; + _ctrl ctrlCommit 0; + while {true} do + { + _uid = getPlayerUID _unit; + if(_uid isEqualTo '')exitWith{call fn_infiSTAR_admin_endSpectate;}; + _veh = vehicle _unit; + if!(_veh isEqualTo cameraOn)then + { + player reveal _unit; + player reveal _veh; + _veh switchCamera cameraView; + }; + if(show_spectate_overlay)then + { + _ctrlText = 'Spectating - F9 to show inventory, SHIFT + F9 to hide/show overlay, F10 to exit/stop spectating
'; + _log = format['%1 (%2) @%3',_unit call fnc_get_exileObjName, _uid, mapGridPosition _veh]; + _ctrlText = _ctrlText + ''+_log+''; + + _moneyP = _unit getVariable ['ExileMoney', 0]; + _moneyP = if(_moneyP > 1000)then{format['%1K',_moneyP / 1000]}else{_moneyP}; + + _moneyB = _unit getVariable ['ExileLocker', 0]; + _moneyB = if(_moneyB > 1000)then{format['%1K',_moneyB / 1000]}else{_moneyB}; + + _respect = _unit getVariable ['ExileScore', 0]; + _log2 = format['Health: %1 Cash: %2 Bank: %3 Respect: %4',(1-(damage _unit))*100, _moneyP, _moneyB, _respect]; + _ctrlText = _ctrlText + '
'+_log2+''; + + _cwep = ''; + _cammo = ''; + _cmags = ''; + _wpnstate = weaponState _unit; + if(!isNil '_wpnstate')then + { + if(str _wpnstate != '[]')then + { + _cwep = _wpnstate select 0; + _cmags = {_wpnstate select 3 == _x} count magazines _unit; + _cammo = _wpnstate select 4; + }; + }; + if(_cwep == '')then + { + _ctrlText = _ctrlText + '
Bare Fists'; + } + else + { + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _pic = getText (configFile >> _cfg >> _type >> 'picture'); + _log3 = format[' %1 [%2] (%3/%4)',_displayName, _cwep, _cammo, _cmags]; + _ctrlText = _ctrlText + '
'+_log3+''; + + if(_veh != _unit)then + { + _cwepsV = []; + { + if(_x find 'Horn' == -1)then + { + _cwepsV pushBack _x; + }; + } forEach (weapons _veh); + + if(count _cwepsV > 0)then + { + _YPOS = safezoneY+0.355; + + { + _cwep = _x; + _cammo = _veh ammo _cwep; + _cmags = {currentMagazine _veh == _x} count magazines _veh; + + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + + _log3a = format[' %1 [%2] (%3/%4)',_displayName, _cwep, _cammo, _cmags]; + _ctrlText = _ctrlText + '
'+_log3a+''; + _YPOS = _YPOS - 0.03; + } forEach _cwepsV; + }; + }; + }; + + _ct = cursorTarget; + if(!isNull _ct)then + { + if(getPlayerUID _ct != '')then + { + _cwep_ct = currentWeapon _ct; + _cammo_ct = _ct ammo _cwep_ct; + _cmags_ct = {currentMagazine _ct == _x} count magazines _ct; + + _log4 = format['%1 (%2) @%3',_ct call fnc_get_exileObjName, getPlayerUID _ct, mapGridPosition _ct]; + _ctrlText = _ctrlText + '
'+_log4+''; + + _log5 = format['Health: %1 Distance: %2m',(1-(damage _ct))*100, round(cameraOn distance _ct)]; + _ctrlText = _ctrlText + '
'+_log5+''; + + _type = _cwep_ct; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _pic = getText (configFile >> _cfg >> _type >> 'picture'); + _log6 = format[' %1 [%2] (%3/%4)',_displayName, _cwep_ct, _cammo_ct, _cmags_ct]; + _ctrlText = _ctrlText + '

'+_log6+''; + } + else + { + _type = typeOf _ct; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _log4 = format['%1 [%2] @%3',_displayName, _type, mapGridPosition _ct]; + _ctrlText = _ctrlText + '
'+_log4+''; + + _log5 = format['Health: %1 - Distance: %2m',(1-(damage _ct))*100, round(cameraOn distance _ct)]; + _ctrlText = _ctrlText + '
'+_log5+''; + }; + + _vehCT = vehicle _ct; + if((_vehCT isKindOf 'LandVehicle') || (_vehCT isKindOf 'Air') || (_vehCT isKindOf 'Ship') || (_vehCT isKindOf 'Tank') || (_vehCT isKindOf 'Static'))then + { + _cwepsV = []; + { + if(_x find 'Horn' == -1)then + { + _cwepsV pushBack _x; + }; + } forEach (weapons _vehCT); + + if(count _cwepsV > 0)then + { + _YPOS = safezoneY+0.655; + + { + _cwep = _x; + _cammo = _vehCT ammo _cwep; + _cmags = {currentMagazine _vehCT == _x} count magazines _vehCT; + + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + + _log6a = format[' %1 [%2] (%3/%4)',_displayName, _cwep, _cammo, _cmags]; + _ctrlText = _ctrlText + '
'+_log6a+''; + _YPOS = _YPOS + 0.03; + } forEach _cwepsV; + }; + }; + }; + _ctrl ctrlSetStructuredText parseText _ctrlText; + } + else + { + _ctrl ctrlSetStructuredText parseText ''; + }; + uiSleep .15; + }; + }; +}; +fnc_clearLogArray = { + [-668,_this select 0] call fn_ACR; + _log = 'ingame Log(s) cleared!'; + _log call FN_SHOW_LOG; + [] call fnc_FULLinit; +}; +fnc_getSteamName = { + [9876,getPlayerUID (_this select 0)] call fn_ACR; + _log = format['Requested Steam Name of %1(%2)',(_this select 0) call fnc_get_exileObjName,getPlayerUID (_this select 0)]; + _log call FN_SHOW_LOG; +}; +fnc_TP2ME = { + _unit = _this select 0; + _pos = player modelToWorld [0,12,0]; + if(_unit isEqualTo vehicle _unit)then{_pos = player modelToWorld [0,1,0];}; + [1,netId _unit,_pos] call fn_ACR; + + _log = format['Teleported %1 to you',_unit call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; +}; +fnc_TPME2 = { + _unit = _this select 0; + _unit = vehicle _unit; + _object = vehicle player; + prevLoc = getPosATL _object; + _distance = -1;if!(_object isEqualTo player)then{_distance = -5;}; + _pos = _unit modelToWorldVisual [0,_distance,0]; + if(local _object)then + { + _object setPosATL _pos; + } + else + { + [1,netId player,_pos] call fn_ACR; + }; + _log = format['Teleported to %1 - press BACKSPACE to revert teleport',_unit call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; +}; +fnc_MoveInMyVehicle = { + _unit = _this select 0; + _unit moveInAny (vehicle player); +}; +fnc_MoveInTargetVehicle = { + _unit = _this select 0; + player moveInAny (vehicle _unit); +}; +fnc_MoveInParachute = { + _target = _this select 0; + openMap true; + + _log = format['Click on Map to Parachute %1..',_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + + ParachuteTarget = _target; + fnc_getParachutePos = { + _obj = vehicle ParachuteTarget; + if(_obj isKindOf 'Steerable_Parachute_F')then + { + deleteVehicle _obj; + } + else + { + [ParachuteTarget] call fnc_EjectTargetVeh; + }; + + + [' + _parachuteObject = createVehicle [''Steerable_Parachute_F'', ['+str _this+' select 0,'+str _this+' select 1,300], [], 0, ''FLY'']; + _target = objectFromNetId '+str (netId ParachuteTarget)+'; + [[_target,_parachuteObject], {(_this select 0) moveInDriver (_this select 1)}] remoteExecCall [''spawn'',_target,false]; + '] call admin_d0_server; + + openMap false; + ParachuteTarget = nil; + fnc_getParachutePos = nil; + }; +}; +fnc_EjectTargetVeh = { + _unit = _this select 0; + moveOut _unit; + unassignVehicle _unit; + _unit action ['eject', (vehicle _unit)]; +}; +fnc_EjectCrewTargetVeh = { + _unit = _this select 0; + _veh = (vehicle _unit); + _uids = []; + { + moveOut _x; + unassignVehicle _x; + _x action ['eject', _veh]; + _uids pushBack (getPlayerUID _x) + } forEach (crew _veh); +}; +fnc_RemoveGear = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(!isNull _target)then + { + [11,netId _target] call fn_ACR; + + _log = format['Removed Gear of %1!',_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + }; +}; +fnc_worldspace = { + disableSerialization; + _name = cameraOn call fnc_get_exileObjName; + _puid = getPlayerUID cameraOn; + _dir = getDir cameraOn; + _pos = getPosATL cameraOn; + _worldspace = format['[%1,%2]',_dir,_pos]; + _log = format['Worldspace of %1(%2): %3',_name,_puid,_worldspace]; + systemChat format['%1 - saved to RPT',_log]; + diag_log [_log,'PLAIN DOWN']; + if(isNull (findDisplay 24))then{(findDisplay 46) createDisplay 'RscDisplayChat';}; + _display = (findDisplay 24); + _chat = _display displayCtrl 101; + _chat ctrlSetText _worldspace; + _log call fnc_adminLog; +}; +fnc_mass_message = { + disableSerialization; + _display = findDisplay 24; + if(isNull _display)exitWith + { + _log = 'open your chat, type a message and start this function again!'; + _log call FN_SHOW_LOG; + systemchat _log; + }; + _chat = _display displayCtrl 101; + _msg = ctrlText _chat; + (_display) closeDisplay 0; + [7,toArray _msg] call fn_ACR; + format['Mass Message: %1',_msg] call fnc_adminLog; + + _log = 'message sent!'; + _log call FN_SHOW_LOG; +}; +fnc_changeTime = { + [17,_this] call fn_ACR; + _log = format['changed time to hour: %1',_this]; + _log call FN_SHOW_LOG; +}; +fnc_get_addvalue = { + disableSerialization; + _display = findDisplay MAIN_DISPLAY_ID; + + _ctrl = [_display,'IGUIBack',77764] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.6, + 0-(0.033 * safezoneH), + 0.7, + 0.099 * safezoneH + ]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscEdit',77769] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.6, + 0, + 0.7, + 0.033 * safezoneH + ]; + ctrlSetFocus _ctrl; + _ctrl ctrlCommit 0; + + fnc_ButtonClick_77766 = { + _txt = ctrlText 77769; + if(_txt != '')then + { + fnc_get_addvalue_VALUE = (parseNumber _txt); + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77764); + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769); + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77766); + ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77765); + }; + }; + + _ctrl = [_display,'RscButton',77766] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.8, + 0.033 * safezoneH, + 0.3, + 0.033 * safezoneH + ]; + _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_77766']; + + fnc_get_addvalue_VALUE = nil; + _ctrl = [_display,'RscText',77765] call fnc_createctrl; + _ctrl ctrlSetPosition [ + 0.6, + 0-(0.033 * safezoneH), + 0.7, + 0.033 * safezoneH + ]; + waitUntil { + _curval = 0; + _curname = call { + if(_this isEqualTo 0)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileMoney', 0];'Money on player'}; + if(_this isEqualTo 1)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileLocker', 0];'Money on bank'}; + if(_this isEqualTo 2)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileScore', 0];'Respect'}; + }; + (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlSetText format['+/- %1',_curname]; + _addval = parseNumber(ctrlText 77769); + (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlEnable true; + (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlCommit 0; + ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769); + + (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlSetText format['Current %1: %2 - after change: %3',_curname,_curval,_curval + _addval]; + (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlCommit 0; + + !isNil 'fnc_get_addvalue_VALUE' || + isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 77769) + }; + if(isNil 'fnc_get_addvalue_VALUE')exitWith{0}; + fnc_get_addvalue_VALUE +}; +fnc_ExileMoneyRespectChange = { + _target = _this select 0; + _option = _this select 1; + if(typeName _target != 'OBJECT')exitWith + { + _log = 'Target is not an Object!'; + _log call FN_SHOW_LOG; + }; + if!(isPlayer _target)exitWith + { + _log = 'Target is not a Player!'; + _log call FN_SHOW_LOG; + }; + _value = _option call fnc_get_addvalue; + if(_value isEqualTo 0)exitWith{systemChat 'WHY WOULD YOU WANT TO ADD OR REMOVE 0 POP-TABS..?';}; + + _nameit = _option call { + if(_this isEqualTo 0)exitWith{'Money to player'}; + if(_this isEqualTo 1)exitWith{'Money to bank of player'}; + if(_this isEqualTo 2)exitWith{'Respect to'}; + 'ERROR' + }; + if(_nameit isEqualTo 'ERROR')exitWith{systemChat 'ERROR';}; + + _log = format['%1 %2 %3 %4',if(_value < 0)then{'Removed'}else{'Added'},_nameit,_value,_target call fnc_get_exileObjName]; + [12001 + _option,netId _target,_value] call fn_ACR; + _log call FN_SHOW_LOG; + (_log+'('+getPlayerUID _target+')') call fnc_adminLog; +}; +fnc_freezeTarget = { + _target = _this select 0; + _value = _this select 1; + if(typeName _target != 'OBJECT')exitWith + { + _log = 'Target is not an Object!'; + _log call FN_SHOW_LOG; + }; + if!(isPlayer _target)exitWith + { + _log = 'Target is not a Player!'; + _log call FN_SHOW_LOG; + }; + [13,netId _target,_value] call fn_ACR; + _log = format['UnFroze %1!',_target call fnc_get_exileObjName]; + if(_value)then{_log = format['Froze %1!',_target call fnc_get_exileObjName];}; + _log call FN_SHOW_LOG; +}; +fnc_unconscious = { + _target = _this select 0; + _value = _this select 1; + if(typeName _target != 'OBJECT')exitWith + { + _log = 'Target is not an Object!'; + _log call FN_SHOW_LOG; + }; + if!(isPlayer _target)exitWith + { + _log = 'Target is not a Player!'; + _log call FN_SHOW_LOG; + }; + [18,netId _target,_value] call fn_ACR; + _log = format['Removed unconscious from %1!',_target call fnc_get_exileObjName]; + if(_value)then{_log = format['Put %1 unconscious!',_target call fnc_get_exileObjName];}; + _log call FN_SHOW_LOG; +}; +fnc_zombieOnTarget = { + _target = _this select 0; + if(typeName _target != 'OBJECT')exitWith + { + _log = 'Target is not an Object!'; + _log call FN_SHOW_LOG; + }; + if!(isPlayer _target)exitWith + { + _log = 'Target is not a Player!'; + _log call FN_SHOW_LOG; + }; + [12,_target] call fn_ACR; + _log = format['Spawned Zombie on %1!',_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; +}; +fnc_restrainTarget = { + _target = _this select 0; + _value = _this select 1; + if(typeName _target != 'OBJECT')exitWith + { + _log = 'Target is not an Object!'; + _log call FN_SHOW_LOG; + }; + if!(isPlayer _target)exitWith + { + _log = 'Target is not a Player!'; + _log call FN_SHOW_LOG; + }; + [15,netId _target,netId player,_value] call fn_ACR; + _log = format['UnRestrained %1!',_target call fnc_get_exileObjName]; + if(_value)then{_log = format['Restrained %1!',_target call fnc_get_exileObjName];}; + _log call FN_SHOW_LOG; +}; +fnc_create_Box = { + private['_boxname','_select','_target']; + _boxname = _this select 0; + _select = _this select 1; + _target = call fnc_get_selected_object; + [5000,netId _target,_select] call fn_ACR; + _log = format['%1 created for %2(%3)!',_boxname,_target call fnc_get_exileObjName,getPlayerUID _target]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; +}; +admin_showinfo_catch = { + if!(remoteExecutedOwner isEqualTo 2)exitWith{true}; + {player reveal _x;} foreach (cameraOn nearObjects 50); + if(!isNil'delete_old_show_thread')then{terminate delete_old_show_thread;delete_old_show_thread=nil;}; + delete_old_show_thread = _this spawn { + disableSerialization; + params['_obj','_pin','_ownername','_owneruid']; + + + _buildRightsUids = []; + _nearestFlags = nearestObjects [_obj, ['Exile_Construction_Flag_Static'], 150]; + if!(_nearestFlags isEqualTo [])then + { + { + _flag = _x; + _radius = _flag getVariable ['ExileTerritorySize', -1]; + if((_obj distance _flag) < _radius)exitWith + { + _buildRightsUids append (_flag getVariable ['ExileTerritoryBuildRights', []]); + }; + } forEach _nearestFlags; + }; + + + if!(_pin isEqualTo '')then{_obj setVariable ['ExileAlreadyKnownCode',_pin];}; + _timer = diag_tickTime + 20; + while {_timer > diag_tickTime} do + { + _pinshown = _pin; + if(_pinshown isEqualTo '')then + { + _pinshown = 'none'; + }; + _locked = locked _obj isEqualTo 2; + _ExileIsLocked = _obj getVariable ['ExileIsLocked', 1] isEqualTo -1; + _color = if(_locked || _ExileIsLocked)then{'#FF0000'}else{'#00FF00'}; + _inject = ''; + _pinshown = format['%1 %2',_pinshown,if(_locked || _ExileIsLocked)then{_inject+'(LOCKED)'}else{_inject+'(UNLOCKED)'}]; + + _ownedby = 'server'; + if!(_owneruid isEqualTo '')then + { + _isOnline = if({_owneruid isEqualTo (getPlayerUID _x)} count (call fnc_get_plr) > 0)then{true}else{false}; + _color = if(_isOnline)then{'#00FF00'}else{'#FF0000'}; + _inject = ''; + _ownedby = format['%1 (%2) %3',_ownername,_owneruid,if(_isOnline)then{_inject+'(ONLINE)'}else{_inject+'(OFFLINE)'}]; + }; + + _pos = getPosATL _obj; + _type = typeOf _obj; + _health = format['%1%2',ceil((1-(damage _obj))*100),'%']; + + + _txt = ''; + _txt = _txt + format['type: %1
',_type]; + _txt = _txt + format['code: %1
',_pinshown]; + _txt = _txt + format['owner: %1
',_ownedby]; + _txt = _txt + format['direction: %1
',getDir _obj]; + _txt = _txt + format['position: %1
',_pos]; + _txt = _txt + format['grid: %1
',mapGridPosition _pos]; + _txt = _txt + format['health: %1
',_health]; + _txt = _txt + format['model info: %1
',getModelInfo _obj]; + + if!(_buildRightsUids isEqualTo [])then + { + _txt = _txt + '
buildrights:
'; + { + _xuid = _x; + _xname = profileNamespace getVariable[format['last_name_%1',_xuid],'Unknown']; + + _isOnline = false; + _color = '#FF0000'; + + { + if(getPlayerUID _x isEqualTo _xuid)exitWith + { + _xname = _x call fnc_get_exileObjName; + _isOnline = true; + _color = '#00FF00'; + }; + } forEach (call fnc_get_plr); + + _inject = '
'; + _xstate = format['%1 (%2) %3',_xname,_xuid,if(_isOnline)then{_inject+'(ONLINE)'}else{_inject+'(OFFLINE)'}]; + _txt = _txt + format[' %1
',_xstate]; + } forEach _buildRightsUids; + }; + + _ctrl = [findDisplay 46,'RscStructuredText',5555314] call fnc_createctrl; + _ctrl ctrlSetPosition [safeZoneX + (safeZoneW * 0.71), safeZoneY + (safeZoneH * 0.02), safeZoneW * 0.26, (safeZoneH * 0.21)+((count _buildRightsUids)*(safeZoneH * 0.0205))]; + _ctrl ctrlSetBackgroundColor [0,0,0,0.65]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetStructuredText parseText _txt; + + uiSleep 0.1; + }; + ctrlDelete ((findDisplay 46) displayCtrl 5555314); + }; +}; +admin_showinfo = { + {player reveal _x;} foreach ((screenToWorld [0.5,0.5]) nearObjects 50); + {player reveal _x;} foreach (cameraOn nearObjects 50); + _obj = cursortarget; + if(!isNull _obj)then + { + [14,netId _obj] call fn_ACR; + _log = format['used showinfo on: %1 @%2',typeOf _obj,mapGridPosition _obj]; + _log call fnc_adminLog; + }; +}; +fnc_infiSTAR_A3cargod = { + if(isNil 'A3carGodRun')then + { + MY_VEHICLES = []; + _code = { + _obj = cameraOn; + if(local _obj)then + { + if(_obj isKindOf 'Man')then + { + if!(MY_VEHICLES isEqualTo [])then + { + {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES; + MY_VEHICLES = []; + }; + } + else + { + MY_VEHICLES pushBackUnique _obj; + _obj allowDamage false; + _obj removeAllEventhandlers 'HandleDamage'; + _obj addEventHandler['HandleDamage',{false}]; + }; + }; + }; + A3carGodRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask; + } + else + { + [A3carGodRun] call ExileClient_system_thread_removeTask;A3carGodRun=nil; + {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES; + }; +}; +fnc_LowerTerrain = { if(getTerrainGrid > 25)then{setTerrainGrid 12.5;}else{setTerrainGrid 50;}; }; +fnc_infiSTAR_A3UnlAmmo = { + if(isNil'lastMagazineUNLAMMO')then{lastMagazineUNLAMMO = '';}; + if(isNil 'unlimAmmRun')then + { + _code = { + private['_secondaryWeapon','_muzzle','_vehicle','_turretPath','_mags','_magArray','_magazineClass']; + _secondaryWeapon = secondaryWeapon player; + _muzzle = currentWeapon player; + _vehicle = vehicle player; + if(player isEqualTo _vehicle)then + { + if(_muzzle isEqualTo _secondaryWeapon)then + { + if!(_secondaryWeapon isEqualTo '')then + { + _curmag = currentMagazine player; + if!(_curmag isEqualTo '')then + { + if!(_curmag isEqualTo lastMagazineUNLAMMO)then + { + lastMagazineUNLAMMO = _curmag; + }; + }; + if!(lastMagazineUNLAMMO isEqualTo '')then + { + _magArray = getArray(configFile >> 'CfgWeapons' >> _secondaryWeapon >> 'magazines'); + if(lastMagazineUNLAMMO in _magArray)then + { + if(player ammo _secondaryWeapon isEqualTo 0)then + { + player addSecondaryWeaponItem lastMagazineUNLAMMO; + if({lastMagazineUNLAMMO == _x} count (magazines player) < 2)then + { + player addMagazine lastMagazineUNLAMMO; + }; + }; + }; + }; + }; + } + else + { + _vehicle setAmmo [_muzzle,999]; + }; + } + else + { + _assignedVehicleRole = assignedVehicleRole player; + if((_assignedVehicleRole select 0) isEqualTo 'Turret')then + { + _turretPath = _assignedVehicleRole select 1; + _mags = _vehicle magazinesTurret _turretPath; + if(_mags isEqualTo [''])then + { + _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines'); + + { + _vehicle addMagazineTurret [_x,_turretPath]; + systemChat format['Added %1 to your Turret!',_x]; + } forEach _magArray; + } + else + { + _magazineClass = _vehicle currentMagazineTurret _turretPath; + _vehicle setMagazineTurretAmmo [_magazineClass,999,_turretPath]; + }; + }; + }; + _vehicle setVehicleAmmo 1; + }; + unlimAmmRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask; + } + else + { + [unlimAmmRun] call ExileClient_system_thread_removeTask;unlimAmmRun=nil; + }; +}; +fnc_infiSTAR_A3noRecoil = { + if(isNil 'noRecoilRun')then + { + _code = { + (vehicle player) setUnitRecoilCoefficient 0; + player setUnitRecoilCoefficient 0; + player setCustomAimCoef 0; + }; + noRecoilRun = [1, _code, [], true] call ExileClient_system_thread_addtask; + } + else + { + [noRecoilRun] call ExileClient_system_thread_removeTask;noRecoilRun=nil; + (vehicle player) setUnitRecoilCoefficient 1; + player setUnitRecoilCoefficient 1; + }; +}; +fnc_infiSTAR_A3FF = { + if(isNil 'A3FFrun')then + { + _code = { + _muzzle = currentWeapon player; + if(_muzzle isEqualType '')then + { + (vehicle player) setWeaponReloadingTime [player, _muzzle, 0]; + }; + }; + A3FFrun = [0.1, _code, [], true] call ExileClient_system_thread_addtask; + } + else + { + [A3FFrun] call ExileClient_system_thread_removeTask;A3FFrun=nil; + }; +}; +fnc_infiSTARHIDE = { + if(isNil 'A3HIDErun')then + { + _code = { + if(!isObjectHidden player)then + { + [2,true] call fn_ACR; + }; + }; + A3HIDErun = [1, _code, [], true] call ExileClient_system_thread_addtask; + } + else + { + [A3HIDErun] call ExileClient_system_thread_removeTask;A3HIDErun=nil; + [2,false] call fn_ACR; + }; +}; +fnc_DisableAnnouncements = { + if(isNil 'A3DANNrun')then{A3DANNrun = 0;}; + if(A3DANNrun==0)then + { + A3DANNrun=1; + AdminAnnounceDisabled = true; + } + else + { + A3DANNrun=0; + AdminAnnounceDisabled = nil; + }; +}; +fnc_FreeRoamCam = { + if(isNil 'freeFlightCam')then + { + camDestroy freeFlightCam; + freeFlightCam = nil; + _getPos = player modelToWorld[0,3, 1.75]; + freeFlightCam = 'camera' camCreate _getPos; + freeFlightCam setDir([_getPos, player] call BIS_fnc_dirTo); + freeFlightCam camCommand 'MANUAL ON'; + freeFlightCam camCommand 'INERTIA OFF'; + freeFlightCam cameraEffect['INTERNAL', 'BACK']; + showCinemaBorder false; + _log = 'Right Click To Cancel!'; + _log call FN_SHOW_LOG; + } + else + { + camDestroy freeFlightCam; + freeFlightCam = nil; + }; +}; +fnc_BIS_FreeRoamCam = { + if(!isNil'camerathread')then{terminate camerathread;camerathread=nil;}; + camerathread = [] spawn (uiNamespace getvariable 'bis_fnc_camera'); +}; +fnc_createBillboard = { + _textureid = _this; + _selected = pathToCustomBillBoardTextures select _textureid; + _name = _selected select 0; + _texture = _selected select 1; + _dir = getDir player + 90; + _location = player modelToWorld [0,5,0]; + + [4,_texture,_textureid,_dir,_location] call fn_ACR; + + _log = format['Billoard %1 created!',_name]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; +}; +DELETE_TARGET = objNull; +fnc_deleteVeh_selected = { + {player reveal _x;} foreach (cameraOn nearObjects 50); + _target = _this select 0; + if(typeName _target != 'OBJECT')then{_target = cursorTarget;}; + if(isNull _target)then{_target = cursorObject;}; + if(!isNull _target)then + { + if(isPlayer _target && vehicle _target isKindOf 'Man')exitWith{systemChat ' can not delete a player..';}; + _delete = (vehicle _target); + if(str DELETE_TARGET != str _delete)exitWith + { + _type = typeOf _delete; + _distance = round(cameraOn distance _delete); + + + if(_type isEqualTo '')then{ + _type = _delete; + } + else + { + _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'); + _type = format['%1(%2)',_type,_displayName]; + }; + _log = format['DELETE: %1 distance %2m? (press continue and delete again)',_type,_distance]; + + + _log call FN_SHOW_LOG; + DELETE_TARGET = _delete; + }; + + if(isNil 'ToDeleteArray')then{ToDeleteArray = [];}; + if(_delete in ToDeleteArray)then + { + _log = format['%1 - IN DELETE QUEUE',_delete]; + _log call FN_SHOW_LOG; + } + else + { + _netId = netId _delete; + if(_netId isEqualTo '0:0')then + { + deleteVehicle _delete; + } + else + { + ToDeleteArray pushBack _delete; + [-4,netId _delete] call fn_ACR; + }; + + _log = format['Deleting %1 @%2..',typeOf _delete,mapGridPosition _delete]; + if(getPlayerUID _target != '')then + { + _log = format['Deleting %1(%2) vehicle: %3 @%4..',_target call fnc_get_exileObjName,getPlayerUID _target,typeOf _delete,mapGridPosition _delete]; + }; + _log call FN_SHOW_LOG; + systemchat _log; + diag_log _log; + _log call fnc_adminLog; + }; + }; +}; +fnc_flipVeh = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + _target = vehicle _target; + if((!isNull _target) && {alive _target} && {_target isKindOf 'Landvehicle' || _target isKindOf 'Air' || _target isKindOf 'Ship' || _target isKindOf 'Tank'})then + { + if(local _target)then + { + _target setVectorUp [0,0,1]; + } + else + { + [-3,netId _target] call fn_ACR; + }; + + _log = format['Flipping %1 @%2..',typeOf _target,mapGridPosition _target]; + _log call FN_SHOW_LOG; + }; +}; +fnc_Light_selected = { + _target = _this select 0; + _pos = screenToWorld [0.5,0.5]; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + + _log = format['Lightning @%1 %2',_pos,mapGridPosition _pos]; + if(!isNull _target)then + { + _pos = getPos _target; + + _log = format['Lightning %1 @%2 %3',typeOf _target,_pos,mapGridPosition _pos]; + if(getPlayerUID _target != '')then + { + _log = format['Lightning %1(%2) @%3 %4',_target call fnc_get_exileObjName,getPlayerUID _target,_pos,mapGridPosition _pos]; + }; + }; + _log call FN_SHOW_LOG; + + _log call fnc_adminLog; + [-1,_pos] call fn_ACR; +}; +fnc_Kill_selected = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + if(!isNull _target)then + { + if(alive _target)then + { + if!(_target getVariable ['killed',''] isEqualTo '')exitWith{}; + + _log = format['Killing %1 @%2',typeOf _target,mapGridPosition _target]; + if(getPlayerUID _target != '')then + { + _log = format['Killing %1(%2) @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + }; + _log call FN_SHOW_LOG; + + _log call fnc_adminLog; + _target setVariable ['killed',format['%1(%2)',profileName,getPlayerUID player]]; + [-2,netId _target] call fn_ACR; + }; + }; +}; +fnc_Explode_selected = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + _pos = screenToWorld [0.5,0.5]; + _log = format['Exploding @%1',mapGridPosition _pos]; + if(!isNull _target)then + { + _log = format['Exploding %1 @%2',typeOf _target,mapGridPosition _target]; + if(isPlayer _target)then + { + _log = format['Exploding %1(%2) @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + }; + + _eyepos = ASLToATL eyepos _target;if(surfaceIsWater _eyepos)then{_eyepos = eyepos _target;}; + _pos = getPosVisual _target; + _pos set[2,_eyepos select 2]; + }; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + + _bomb = 'HelicopterExploSmall' createVehicleLocal _pos; +}; +fnc_fsuicide_selected = { + _target = _this select 0; + if(!isNull _target)then + { + if(isPlayer _target)then + { + _log = format['Force Suicide on %1(%2) @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + [21,netId _target] call fn_ACR; + }; + }; +}; +fnc_Disconnect_selected = { + _target = _this select 0; + if(!isNull _target)then + { + [-664,netId _target] call fn_ACR; + _log = format['Disconnect %1(%2)',_target call fnc_get_exileObjName,getPlayerUID _target]; + _log call FN_SHOW_LOG; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +fnc_get_inputText = { + params [ + ['_function','',['']], + ['_input',[],[[]]] + ]; + disableSerialization; + if(isNull findDisplay -1341)then{(findDisplay MAIN_DISPLAY_ID) closeDisplay 0;createdialog 'infiSTAR_EDITBOX';}; + _display = findDisplay -1341; + + _ctrl = [_display,'RscButton',7337] call fnc_createctrl; + _ctrl ctrlSetText 'OK'; + _ctrl ctrlSetPosition [.5,.75,.25,.033 * safezoneH]; + _ctrl ctrlSetEventHandler['ButtonClick','[ctrlText ((findDisplay -1341) displayCtrl 1336),'+str _input+'] call (missionNamespace getVariable['+str _function+',{}]);true']; + _ctrl ctrlCommit 0; + + _ctrl = [_display,'RscButton',7338] call fnc_createctrl; + _ctrl ctrlSetText 'CLOSE'; + _ctrl ctrlSetPosition [.25,.75,.25,.033 * safezoneH]; + _ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true']; + _ctrl ctrlCommit 0; +}; +fn_infiSTAR_Unban_action = { + params['_text']; + ['['+str _text+'] call FNC_A3_infiSTARUNBAN;'] call admin_d0_server; +}; +fn_infiSTAR_Unban = { + ['fn_infiSTAR_Unban_action', []] call fnc_get_inputText; +}; +fnc_do_target_action = { + params['_text','_input']; + _input params['_adminreq','_opt','_TNAME','_TUID','_what']; + + _text = if(_text isEqualTo '')then{'ADMIN DECISION'}else{_text select [0,300]}; + _adminreq pushBack (toArray _text); + _adminreq call fn_ACR; + + if(_opt isEqualTo 1)then + { + _code = format[' + _text = ''%1 has been %2!''; + systemChat _text; + [''ErrorTitleAndText'', [''infiSTAR.de'', _text]] call ExileClient_gui_toaster_addTemplateToast; + ',_TNAME,_what]; + [_code] call admin_d0; + } + else + { + _log = format['%4 %1(%2): %3',_TNAME,_TUID,_text,_what]; + _log call FN_SHOW_LOG; + }; +}; +fnc_do_target = { + _target = _this select 0; + _option = _this select 1; + _suboption = _this select 1; + + if(!isNull _target)then + { + _TUID = getPlayerUID _target; + if(_TUID != '')then + { + _TNAME = _target call fnc_get_exileObjName; + _input = call { + if(_option isEqualTo 0)exitWith{[[-665,netId _target],_suboption,_TNAME,_TUID,'KICKED']}; + if(_option isEqualTo 1)exitWith{[[-666,0,netId _target],_suboption,_TNAME,_TUID,'BANNED']}; + if(_option isEqualTo 2)exitWith{[[-666,1,netId _target],_suboption,_TNAME,_TUID,'TEMP-BANNED']}; + [] + }; + if(_input isEqualTo [])exitWith + { + _log = 'error! bad input'; + _log call FN_SHOW_LOG; + }; + ['fnc_do_target_action', _input] call fnc_get_inputText; + }; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +fnc_ATTACH_TO = { + if(isNil'LastAttachedObject')then{LastAttachedObject=objNull;}; + if(!isNull LastAttachedObject)exitWith{detach LastAttachedObject;LastAttachedObject = nil;}; + + _target = _this select 0; + if!(_target isEqualType objNull)then + { + _target = cursorTarget; + }; + if(!isNull _target)then + { + _class = typeOf _target; + if(parseNumber((netId _target) select [0,((netId _target) find ':')]) < 2)exitWith + { + _log = format['Can not attach local object [%1] to player',if(_class isEqualTo '')then{_target}else{_class}]; + _log call FN_SHOW_LOG; + }; + + _bbr = boundingBoxReal _target; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _offset = 5; + _maxWidth = abs ((_p2 select 0) - (_p1 select 0)); + _maxLength = abs ((_p2 select 1) - (_p1 select 1)); + if(_maxWidth > _offset)then{_offset = _maxWidth;}; + if(_maxLength > _offset)then{_offset = _maxLength;}; + + _bbr = boundingBoxReal vehicle player; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + + [5,netId _target,_offset,_maxHeight] call fn_ACR; + LastAttachedObject = _target; + + _log = format['Attaching [%1] to player',if(_class isEqualTo '')then{_target}else{_class}]; + _log call FN_SHOW_LOG; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +fnc_ReviveTarget = { + _target = _this select 0; + if(!isNull _target)then + { + if(alive _target)exitWith + { + _log = 'target already alive..!'; + _log call FN_SHOW_LOG; + }; + if((getPlayerUID _target) isEqualTo '')exitWith + { + _log = 'target object not a player anymore..!'; + _log call FN_SHOW_LOG; + }; + + moveOut _target; + unassignVehicle _target; + _target action ['eject', (vehicle _target)]; + + _log = format['Revived %1(%2) @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + _log call FN_SHOW_LOG; + [19,netId _target] call fn_ACR; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +fnc_HealTarget = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + if(!isNull _target)then + { + _log = format['Healed %1 @%2',typeOf _target,mapGridPosition _target]; + if(getPlayerUID _target != '')then + { + _log = format['Healed %1(%2) @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + }; + _log call FN_SHOW_LOG; + + [9,netId _target] call fn_ACR; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +fnc_RepairTarget = { + _target = _this select 0; + if(typeName _target != 'OBJECT')then + { + _target = cursorTarget; + }; + if(isNull _target)then{_target = cursorObject;}; + if(!isNull _target)then + { + _log = format['%1 @%2 - Repaired & Refueled',typeOf _target,mapGridPosition _target]; + if(getPlayerUID _target != '')then + { + _log = format['%1 @%2 - Repaired & Refueled @%3',_target call fnc_get_exileObjName,getPlayerUID _target,mapGridPosition _target]; + }; + _log call FN_SHOW_LOG; + + [9,netId (vehicle _target)] call fn_ACR; + } + else + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; +}; +infiSTAR_A3Heal = { + [9,netId cameraOn] call fn_ACR; + if!(cameraOn isEqualTo player)then{[9,netId player] call fn_ACR;}; + _log = format['Healed %1(%2)',cameraOn call fnc_get_exileObjName,getPlayerUID cameraOn]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + playsound 'AddItemOK'; +}; +infiSTAR_A3RestoreNear = { + _done = []; + { + _crewandobject = [_x]; + _crewandobject append (crew _x); + + { + _id = _done pushBackUnique _x; + if(_id > -1)then + { + [9,netId _x] call fn_ACR; + }; + } forEach _crewandobject; + } forEach (cameraOn nearEntities ['AllVehicles',15]); + + _log = format['Restored Near %1(%2)',cameraOn call fnc_get_exileObjName,getPlayerUID cameraOn]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + playsound 'AddItemOK'; +}; +fn_addArsenalAction = { + if('Arsenal' call ADMINLEVELACCESS)then + { + _log = ''; + _id = player getVariable ['arsenal_action_id',-1]; + if(_id > -1)then + { + player removeAction _id; + _id = -1; + _log = 'Arsenal Action removed from player.'; + } + else + { + _id = player addAction ['Arsenal',{['Open',true] call BIS_fnc_arsenal;}]; + _log = 'Arsenal Action added to player.'; + }; + player setVariable ['arsenal_action_id',_id]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + }; +}; +infiSTAR_A3addAmmo = { + if(isNil'SELECTED_TARGET_PLAYER')then{SELECTED_TARGET_PLAYER=player;}; + if(!alive SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;}; + _veh = vehicle SELECTED_TARGET_PLAYER; + if(_veh isEqualTo SELECTED_TARGET_PLAYER)then + { + [] call fnc_FULLinit; + LASTSUBBUTTON = 0; + FILLMAINSTATE = 6; + + _muzzle = currentWeapon SELECTED_TARGET_PLAYER; + _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines'); + if((((toLower _muzzle) find '_gl' != -1) && {((toLower _muzzle) find '_glock' == -1)})||((toLower _muzzle) find 'm203' != -1))then + { + _pewpews = []; + {if(((toLower _x) select [0,4] in ['1rnd','3rnd'])||((toLower _x) find 'ugl_' != -1))then{_pewpews pushBack _x;};} forEach ALL_MAGS_TO_SEARCH_C; + _magArray append _pewpews; + }; + + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_LISTBOX_ID; + lbclear _ctrl; + _ctrl lbAdd '==== Magazines ===='; + { + _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgMagazines' >> _x >> 'displayName'),_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + } forEach _magArray; + + { + _cat = _x; + _ctrl lbAdd '==== '+_cat+' ===='; + { + _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgWeapons' >> _x >> 'displayName'),_x]; + _ctrl lbSetData [_lbid,_x]; + _x call fnc_addpic; + } forEach (getArray(configfile >> 'CfgWeapons' >> currentWeapon player >> 'WeaponSlotsInfo' >> _cat >> 'compatibleItems')); + } forEach ['CowsSlot','MuzzleSlot','PointerSlot','UnderBarrelSlot']; + + [] call fnc_colorizeMain; + for '_i' from 0 to 12 do {_ctrl lbAdd '';}; + } + else + { + _log = format['%1 added Ammo to %2',SELECTED_TARGET_PLAYER call fnc_get_exileObjName,typeOf _veh]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + + { + _wep = _x; + { + [_veh,_x] call fnc_reallyAdditem; + } forEach (getArray (configFile >> 'CfgWeapons' >> _wep >> 'magazines')); + } forEach (weapons _veh); + }; + cameraOn setVehicleAmmo 1; +}; +infiSTAR_A3Invulnerability = { + if(isNil 'A3Invulnerability')then + { + A3Invulnerability = [] spawn { + [22,netId player] call fn_ACR; + while {true} do + { + if(alive player)then + { + player allowDamage false; + player removeAllEventHandlers 'HandleDamage'; + player addEventHandler ['HandleDamage', {false}]; + + ExileClientPlayerAttributes = [100,100,100,100,0,37,0]; + ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes; + ExileClientPlayerLastHpRegenerationAt = diag_tickTime; + ExileClientPlayerIsOverburdened = false; + ExileClientPlayerOxygen = 100; + ExileClientPlayerIsAbleToBreathe = true; + ExileClientPlayerIsDrowning = false; + ExileClientPlayerIsInjured = false; + ExileClientPlayerIsBurning = false; + ExileClientPlayerIsBleeding = false; + ExileClientPlayerIsExhausted = false; + ExileClientPlayerIsHungry = false; + ExileClientPlayerIsThirsty = false; + player setBleedingRemaining 0; + player setOxygenRemaining 1; + player setFatigue 0; + if(damage player > 0)then{player setDamage 0;}; + if(!isNil'ExileRadiationThreadHandle')then + { + [] call ExileClient_system_radiation_event_onPlayerDied; + ExilePlayerRadiation = 0; + ExilePlayerRadiationLastCheck = 0; + }; + }; + + sleep 0.2; + }; + }; + } + else + { + terminate A3Invulnerability;A3Invulnerability=nil; + player allowDamage true; + player removeAllEventHandlers 'HandleDamage'; + player addEventHandler ['HandleDamage', { call ExileClient_object_player_event_onHandleDamage; }]; + [] call ExileClient_system_radiation_event_onPlayerSpawned; + }; +}; +infiSTAR_A3Invulnerability2 = { + if(isNil 'A3Invulnerability2')then + { + A3Invulnerability2 = [] spawn { + [22,netId player] call fn_ACR; + while {true} do + { + if(alive player)then + { + player allowDamage false; + player removeAllEventHandlers 'HandleDamage'; + player addEventHandler ['HandleDamage', {false}]; + }; + sleep 1; + }; + }; + } + else + { + terminate A3Invulnerability2;A3Invulnerability2=nil; + player allowDamage true; + player removeAllEventHandlers 'HandleDamage'; + player addEventHandler ['HandleDamage', { call ExileClient_object_player_event_onHandleDamage; }]; + }; +}; +fnc_draw3dhandlerAI = "" + if(!isNull cameraOn)then + { + ALLVEHICLES_OBJECTS_1500m = cameraOn nearEntities ['Allvehicles',1500]; + { + if(!isNull _x)then + { + if(alive _x)then + { + _PUIDX = getPlayerUID _x; + if(_PUIDX == '')then + { + if(_x isKindOf 'Animal_Base_F')exitWith{}; + _crew = crew _x; + if!(_crew isEqualTo [])then + { + _distance = cameraOn distance _x; + _txt = 'AI'; + _type = typeOf _x; + if(_x isKindOf 'Man')then + { + if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then + { + _txt = format['%1 (%2m)',_type,round _distance]; + } + else + { + _txt = format['AI (%1m)',round _distance]; + }; + } + else + { + _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance]; + }; + + _grp = group _x; + if(!isNull _grp)then + { + _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp]; + }; + _pos = ASLToATL eyepos _x; + if(surfaceIsWater _pos)then{_pos = eyepos _x;}; + drawIcon3D['iconManMedic',[1,0,0.75,0.7],_pos,.1,.1,0,_txt,1,.03]; + }; + }; + }; + }; + } forEach ALLVEHICLES_OBJECTS_1500m; + }; +""; +fnc_draw3dhandlerDEAD = "" + { + if(!isNull _x)then + { + if!(getPlayerUID _x isEqualTo '')exitWith{}; + + _distance = cameraOn distance _x; + if(_distance < 500)then + { + _name = _x call fnc_get_exileObjName; + _clr = [1,1,1,0.7]; + _txt = format['%1 %2m',_name,round _distance]; + _pos = _x modelToWorldVisual [0,0,1]; + drawIcon3D['iconManMedic',_clr,_pos,.1,.1,0,_txt,0,.032]; + }; + }; + } forEach allDeadMen; +""; +fnc_call_single_esps = { + if(!isNil'infiSTAREspEHVAR')then{ + removeMissionEventHandler ['Draw3D',infiSTAREspEHVAR]; + infiSTAREspEHVAR=nil; + }; + _string = ''; + if(!isNil 'fnc_infiESP_stateAI')then + { + _string = _string + fnc_draw3dhandlerAI; + }; + if(!isNil 'fnc_infiESP_stateDEAD')then + { + _string = _string + fnc_draw3dhandlerDEAD; + }; + if(_string != '')then + { + _string = ('if(isNull findDisplay 49)exitWith{'+_string+';true};'); + infiSTAREspEHVAR = addMissionEventHandler ['Draw3D',_string]; + }; +}; +fnc_PlayerESP_NORM_CODE = { + private['_distance','_alpha','_clr','_crew','_pos']; + + { + _distance = round(cameraOn distance _x); + if(_distance < ESPDistance)then + { + _alpha = (1-(_distance/ESPDistance/1.5)); + _isOnFoot = isNull objectParent _x; + if(_isOnFoot)then + { + _name = _x call fnc_get_exileObjName; + _clr = _x call FN_GET_CLR; + _curwep = currentWeapon _x; + _hp = round((damage _x - 1) * -100); + _txt = format['unarmed - %1HP',_hp]; + + _pos = _x modelToWorldVisual (_x selectionPosition 'head'); + _pos2D = worldToScreen _pos; + + + _txt2 = ''; + if(alive _x)then + { + _txt2 = format['%1 - %2m',_name,_distance]; + } + else + { + _txt2 = format['%1 - %2m (DEAD, but still watching)',_name,_distance]; + }; + if(abs(_pos2D select 0) < 1)then + { + if(_curwep != '')then + { + _txt = format['%1 - [%2/%3] - %4HP',gettext(configFile >> 'CfgWeapons' >> _curwep >> 'displayName'),_x ammo _curwep,getNumber(configFile >> 'CfgMagazines' >> currentMagazine _x >> 'count'),_hp]; + }; + + _dir = _x getRelDir cameraOn; + drawIcon3D['iconManMedic',_clr,_pos,.5,.5,if(_x isEqualTo cameraOn)then{_dir}else{_dir+180},_txt,1,0.03,'PuristaMedium','',true]; + drawIcon3D['',_clr,_pos,.5,0,0,_txt2,1,0.03,'PuristaMedium','',true]; + } + else + { + drawIcon3D['iconManMedic',_clr,_pos,.5,.5,(_x getRelDir cameraOn)+180,_txt2,1,0.03,'PuristaMedium','',true]; + }; + } + else + { + _veh = vehicle _x; + _class = typeOf _veh; + _speed = round(speed _veh*100)/100; + _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> _class >> 'maxSpeed'); + _typename = gettext(configFile >> 'CfgVehicles' >> _class >> 'displayName'); + _icon = gettext(configFile >> 'CfgVehicles' >> _class >> 'Picture'); + + _crew = fullCrew _veh; + _vehclr = [0.047,0.502,1,_alpha]; + if(!alive _veh)then{_vehclr = [1,1,1,_alpha]}; + + _pos = _veh modelToWorldVisual [0,0,0]; + _pos2D = worldToScreen _pos; + if(abs(_pos2D select 0) < 1)then + { + _cnt = count _crew; + if(_cnt > 0)then + { + _num = _cnt * -1; + { + _height = _num + _forEachIndex; + _unit = _x select 0; + _role = _x select 1; + _txt = format['%1. %2 - %3 %4HP',_forEachIndex,_role,_unit call fnc_get_exileObjName,round((1-(damage _unit))*100)]; + drawIcon3D['\A3\ui_f\data\map\Markers\Military\dot_ca.paa',[1,0.17,0.17,_alpha],_unit modelToWorldVisual (_unit selectionPosition 'head'),0,0,0,format['%1',_forEachIndex],1,0.03,'PuristaMedium','',true]; + drawIcon3D['',_unit call FN_GET_CLR,_pos,.5,_height,0,_txt,1,0.03,'PuristaMedium','',true]; + } forEach _crew; + }; + + _txt = format['%1 - %2m',_typename,_distance]; + drawIcon3D['',_vehclr,_pos,.5,0,0,_txt,1,0.03,'PuristaMedium','',true]; + + _txt = format['%1/%2km/h %3HP',_speed,_maxSpeed,round((1-(damage _veh))*100)]; + drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true]; + } + else + { + _crewnames = ''; + { + _unit = _x select 0; + if(_crewnames == '')then + { + _crewnames = _unit call fnc_get_exileObjName; + } + else + { + _crewnames = format['%1, %2',_crewnames,_unit call fnc_get_exileObjName]; + }; + } forEach _crew; + + _txt = format['%1 - %2 - %3HP - %4m',_crewnames,_typename,round((1-(damage _veh))*100),_distance]; + drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true]; + }; + }; + }; + } forEach plr_in_sd; + true +}; +fnc_PlayerESP_NORM = { + if(!isNil'plr_in_sd_task')then{[plr_in_sd_task] call ExileClient_system_thread_removeTask;plr_in_sd_task=nil;}; + if(isNil'fnc_PlayerESP_NORM_ID')then + { + plr_in_sd = (call fnc_get_plr); + _code = { + ESPDistance = (getObjectViewDistance select 0)+100; + plr_in_sd = [];{if(cameraOn distance _x < ESPDistance)then{plr_in_sd pushBackUnique _x;};} forEach (call fnc_get_plr); + }; + plr_in_sd_task = [3, _code, [], true] call ExileClient_system_thread_addtask; + fnc_PlayerESP_NORM_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{[] call fnc_PlayerESP_NORM_CODE;};true } ]; + } + else + { + plr_in_sd = []; + removeMissionEventHandler ['Draw3D', fnc_PlayerESP_NORM_ID];fnc_PlayerESP_NORM_ID=nil; + }; +}; +fnc_PlayerESP_SS_CODE = { + private['_espRenderRange','_distance','_alpha','_clr','_crew','_pos']; + _espRenderRange = _this; + if (!isNull cameraOn) then + { + { + if(!isNull _x)then + { + if(isPlayer _x)then + { + _distance = round(cameraOn distance _x); + _alpha = (1-(_distance/_espRenderRange/1.5)); + _clr = [1,1,1,_alpha]; + _crew = fullCrew (vehicle _x); + _name = ''; + { + if(_forEachIndex == 0) then + { + _name = format['%1(%2m)',(_x select 0) call fnc_get_exileObjName,_distance]; + } + else + { + _name = _name + format[', %1(%2m)',(_x select 0) call fnc_get_exileObjName,_distance]; + }; + } forEach _crew; + _pos = _x modelToWorldVisual (_x selectionPosition 'head'); + drawIcon3D['\A3\ui_f\data\map\Markers\Military\dot_ca.paa',_clr,_pos,.3,.3,0,_name,1,0.03]; + }; + }; + } forEach ((cameraOn nearEntities[['Exile_Unit_Player', 'LandVehicle', 'Ship', 'Air', 'Tank'], _espRenderRange]) - [cameraOn]); + }; +}; +fnc_PlayerESP_SS = { + if(isNil'fnc_PlayerESP_SS_ID')then + { + ESPDistance = (getObjectViewDistance select 0)+100; + fnc_PlayerESP_SS_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{ESPDistance call fnc_PlayerESP_SS_CODE;};true } ]; + } + else + { + removeMissionEventHandler ['Draw3D', fnc_PlayerESP_SS_ID];fnc_PlayerESP_SS_ID=nil; + }; +}; +iconTextSize = 250 * pixelH; +nameTextSize = 15 * pixelH; +fnc_LootESP_CODE = { + if (!isNull cameraOn) then + { + _pos = getPos cameraOn; + _distance = 300; + + _getinfo = { + _cnt = count weaponCargo _this;if(_cnt > 0)exitWith{[[1,0,0,1],'Weapon',_cnt]}; + _cnt = count magazineCargo _this;if(_cnt > 0)exitWith{[[1,1,0,1],'Magazine',_cnt]}; + _cnt = count itemCargo _this;if(_cnt > 0)exitWith{[[0,0,1,1],'Item',_cnt]}; + _cnt = count backpackCargo _this;if(_cnt > 0)exitWith{[[0,1,0,1],'Backpack',_cnt]}; + [[1,1,1,1],typeOf _this,1] + }; + + { + _ret = _x call _getinfo; + _clr = _ret select 0; + _txt = _ret select 1; + _cnt = _ret select 2; + drawIcon3D['A3\ui_f\data\map\Markers\Military\dot_ca.paa',_clr,getPosATL _x,iconTextSize,iconTextSize,0,format['%1(%2)',_txt,_cnt],0,nameTextSize,'PuristaMedium','',true]; + } forEach (nearestObjects [cameraOn, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated'],_distance]); + }; +}; +fnc_LootESP = { + if(isNil'LootESPid')then + { + LootESPid = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{call fnc_LootESP_CODE;};true } ]; + systemChat ' Loot ESP showing loot within 300m'; + } + else + { + removeMissionEventHandler ['Draw3D',LootESPid]; + LootESPid=nil; + }; +}; +fnc_draw_MapIcons = { + _icon = ''; + _alpha = 1; + _iscale = ((1 - ctrlMapScale _ctrl) max .2) * 28; + if(mapiconsshowplayer)then + { + _shown = []; + { + if(!isNull _x)then + { + _veh = vehicle _x; + if(_veh in _shown)exitWith{}; + _shown pushBack _veh; + _PUIDX = getPlayerUID _x; + if(_PUIDX != '')then + { + _name = _x call fnc_get_exileObjName; + _type = typeOf _veh; + _dist = round(_veh distance player); + _clr = _x call FN_GET_CLR; + _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist]; + if(alive _x)then + { + if(_x isEqualTo _veh)then + { + _txt = format['%1 (%2m)',_name,_dist]; + } + else + { + _names = ''; + { + if(_forEachIndex isEqualTo 0)then + { + _names = _names + format['%1',(_x select 0) call fnc_get_exileObjName]; + } + else + { + _names = _names + format[', %1',(_x select 0) call fnc_get_exileObjName]; + }; + } forEach (fullCrew _veh); + _typename = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'); + _txt = format['%1 - %2 (%3m)',_names,_typename,_dist]; + }; + }; + + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _grpx = group _x; + if(!isNull _grpx)then + { + _alive = {alive _x} count units _grpx; + if(_alive > 1)then + { + _txt = _txt + format[' GRP:%1 PLR:%2',allGroups find _grpx,_alive]; + }; + }; + + _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt]; + }; + }; + } forEach (call fnc_get_plr); + }; + if(mapiconsshowvehicles||mapiconsshowai)then + { + { + if(!isNull _x)then + { + _PUIDX = getPlayerUID _x; + if(_PUIDX isEqualTo '')then + { + _veh = vehicle _x; + _type = typeOf _veh; + if(mapiconsshowvehicles)then + { + if!(_veh isKindOf 'Man')then + { + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _drawcode = [_icon, [0.67,0.97,0.97,1], getPosASL _veh, _iscale, _iscale, getDir _veh]; + _displayName = ''; + if(mapiconsshowvehiclestypes)then + { + _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'); + _drawcode pushBack _displayName; + }; + if(mapiconsshowvehicleslockstate)then + { + _locked = locked _veh; + if!(_locked isEqualTo 1)then + { + if(_locked isEqualTo 0)then + { + _drawcode set[1,[0,0.55,0.15,1]]; + } + else + { + _drawcode set[1,[1,0.4,0,1]]; + }; + }; + }; + _ctrl drawIcon _drawcode; + }; + }; + if(mapiconsshowai)then + { + if(_x isKindOf 'Animal_Base_F')exitWith{}; + _crew = crew _x; + if!(_crew isEqualTo [])then + { + _distance = cameraOn distance _x; + _txt = 'AI'; + _type = typeOf _x; + if(_x isKindOf 'Man')then + { + if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then + { + _txt = format['%1 (%2m)',_type,round _distance]; + } + else + { + _txt = format['AI (%1m)',round _distance]; + }; + } + else + { + _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance]; + }; + + _grp = group _x; + if(!isNull _grp)then + { + _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp]; + }; + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _ctrl drawIcon [_icon, [1,0,0.75,1], getPosASL _x, _iscale, _iscale, getDir _x,_txt]; + }; + }; + }; + }; + } forEach ([0,0,0] nearEntities ['Allvehicles',1000000]); + }; + if(mapiconsshowdeadvehicles)then + { + { + if((_x isKindOf 'Air')||(_x isKindOf 'Landvehicle')||(_x isKindOf 'Tank'))then + { + _veh = vehicle _x; + _type = typeOf _veh; + _clr = [1,1,1,1]; + if(_x isEqualTo SELECTED_TARGET_PLAYER)then{_clr = [1,0.7,0.15,1];}; + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _ctrl drawIcon [_icon, _clr, getPosASL _x, _iscale, _iscale, getDir _x]; + }; + } forEach allDead; + }; + if(mapiconsshowdeadplayer)then + { + { + if(!isNull _x)then + { + _name = _x call fnc_get_exileObjName; + _veh = vehicle _x; + _dist = round(_veh distance player); + _txt = format['%1 (%2m)',_name,_dist]; + if(getPlayerUID _x != '')then + { + _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist]; + }; + _type = typeOf _veh; + _clr = [1,1,1,1]; + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt]; + }; + } forEach allDeadMen; + }; +}; +fnc_mapiconsshowflags = { + { + _ctrl drawIcon ['iconObject_1x1', [0,1,1,1], getPosASL _x, _size, _size, getDir _x]; + } forEach Exile_Construction_Flag_Static_ARRAY; +}; +fnc_mapiconsshowbuildings = { + { + _ctrl drawIcon ['iconObject_1x1', [1,1,1,1], getPosASL _x, _size, _size, getDir _x]; + } forEach Exile_Construction_Abstract_Static_ARRAY; +}; +fnc_mapiconsshowcameras = { + { + _ctrl drawIcon ['iconObject_1x1', [1,0,1,1], getPosASL _x, _size, _size, getDir _x]; + } forEach Exile_Construction_BaseCamera_Static_ARRAY; +}; +fnc_removeButtons = {disableSerialization;{ctrlDelete _x;} forEach MapIconsButtonCTRLs;}; +fnc_addButtons = { + _xpos = 0.5; + _y = safeZoneY+0.0105; + MapIconsButtonCTRLs = []; + + for '_i' from 2084 to 2093 do + { + _y = _y + 0.0495; + _ctrl = [_display,'RscButton',_i] call fnc_createctrl; + _ctrl ctrlSetPosition [_xpos,_y,0.3,0.05]; + MapIconsButtonCTRLs pushBack _ctrl; + }; +}; +infiSTAR_A3MAPICONS = { + if(isNil 'fnc_MapIcons_run')then + { + fnc_MapIcons_run = true; + if(isNil'timerForBaseParts')then{timerForBaseParts = 0;}; + if(isNil'Exile_Construction_Flag_Static_ARRAY')then{Exile_Construction_Flag_Static_ARRAY = [];}; + if(isNil'Exile_Construction_Abstract_Static_ARRAY')then{Exile_Construction_Abstract_Static_ARRAY = [];}; + if(isNil'Exile_Construction_BaseCamera_Static_ARRAY')then{Exile_Construction_BaseCamera_Static_ARRAY = [];}; + + if(isNil'mapiconsshowflags')then{mapiconsshowflags=false;}; + if(isNil'mapiconsshowbuildings')then{mapiconsshowbuildings=false;}; + if(isNil'mapiconsshowcameras')then{mapiconsshowcameras=false;}; + if(isNil'mapiconsshowplayer')then{mapiconsshowplayer=true;}; + if(isNil'mapiconsshowvehicles')then{mapiconsshowvehicles=false;}; + if(isNil'mapiconsshowvehiclestypes')then{mapiconsshowvehiclestypes=false;}; + if(isNil'mapiconsshowvehicleslockstate')then{mapiconsshowvehicleslockstate=false;}; + if(isNil'mapiconsshowdeadplayer')then{mapiconsshowdeadplayer=false;}; + if(isNil'mapiconsshowdeadvehicles')then{mapiconsshowdeadvehicles=false;}; + if(isNil'mapiconsshowai')then{mapiconsshowai=false;}; + + if(!isNil'MAP_BUTTON_THREAD')exitWith{}; + MAP_BUTTON_THREAD = [] spawn { + disableSerialization; + private['_display','_button','_state','_text','_function','_color']; + _display = findDisplay 12; + while{true}do + { + if(visibleMap)then + { + if(mapiconsshowflags || mapiconsshowbuildings || mapiconsshowcameras)then + { + if(time > timerForBaseParts)then + { + timerForBaseParts = time + 25; + + Exile_Construction_Flag_Static_ARRAY = allMissionObjects 'Exile_Construction_Flag_Static'; + Exile_Construction_Abstract_Static_ARRAY = allMissionObjects 'Exile_Construction_Abstract_Static'; + Exile_Construction_BaseCamera_Static_ARRAY = allMissionObjects 'Exile_Construction_BaseCamera_Static'; + }; + }; + if(isNil'EventHandlerDrawAdded')then + { + call fnc_addButtons; + EventHandlerDrawAdded = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['Draw',' + if(visibleMap)then + { + _ctrl = _this select 0; + _myscale = 33.2012; + _scale = ctrlMapScale _ctrl; + _size = 10 max (_myscale*(_myscale/(_scale * 10000))); + if(mapiconsshowflags)then{call fnc_mapiconsshowflags}; + if(mapiconsshowbuildings)then{call fnc_mapiconsshowbuildings}; + if(mapiconsshowcameras)then{call fnc_mapiconsshowcameras}; + call fnc_draw_MapIcons + } + ']; + }; + + { + _var = _x select 0; + _text = _x select 1; + _button = MapIconsButtonCTRLs select _forEachIndex; + + _state = missionNamespace getVariable [_var,false]; + _color = if(_state)then{[0.56,0.04,0.04,1]}else{[0,1,0,1]}; + _BTNtext = if(_state)then{format['Hide %1',_text]}else{format['Show %1',_text]}; + _onoff = if(_state)then{'OFF'}else{'ON'}; + _button ctrlSetText _BTNtext; + _button ctrlSetTextColor _color; + _button ctrlRemoveAllEventHandlers 'ButtonDown'; + _button ctrlAddEventHandler ['ButtonDown', + format[' + ''MapIcons: %1 - %2'' call fnc_adminLog; + missionNamespace setVariable [''%3'',!(missionNamespace getVariable [''%3'',false])]; + ', + _text,_onoff,_var] + ]; + if!(format['MapIcons: %1',_text] call ADMINLEVELACCESS)then{_button ctrlEnable false;}; + _button ctrlCommit 0; + } forEach [ + ['mapiconsshowflags','Flags'], + ['mapiconsshowbuildings','Buildings'], + ['mapiconsshowcameras','Cameras'], + ['mapiconsshowplayer','Player'], + ['mapiconsshowdeadplayer','DeadPlayer'], + ['mapiconsshowvehicles','Vehicles'], + ['mapiconsshowvehiclestypes','Vehicle Types'], + ['mapiconsshowvehicleslockstate','Vehicle lockstate'], + ['mapiconsshowdeadvehicles','DeadVehicles'], + ['mapiconsshowai','AI'] + ]; + + if(mapiconsshowvehicles)then + { + MapIconsButtonCTRLs select 6 ctrlEnable true; + MapIconsButtonCTRLs select 7 ctrlEnable true; + } + else + { + MapIconsButtonCTRLs select 6 ctrlEnable false; + MapIconsButtonCTRLs select 7 ctrlEnable false; + mapiconsshowvehiclestypes = false; + mapiconsshowvehicleslockstate=false; + }; + } + else + { + if(!isNil'EventHandlerDrawAdded')then + { + call fnc_removeButtons; + (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil; + }; + }; + uiSleep 0.3; + }; + }; + } + else + { + fnc_MapIcons_run = nil; + terminate MAP_BUTTON_THREAD;MAP_BUTTON_THREAD=nil; + if(!isNil'EventHandlerDrawAdded')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil;}; + call fnc_removeButtons; + }; +}; +adminVehicleMarkers = { + while {true} do + { + { + _typename = gettext (configFile >> 'CfgVehicles' >> typeOf _x >> 'displayName'); + _xPos = getPos _x; + + _cm = ('adminVehicleMarkers' + (str _forEachIndex)); + _pos = getMarkerPos _cm; + if((_pos select 0 != _xPos select 0) || (_pos select 1 != _xPos select 1))then + { + deleteMarkerLocal _cm; + _vm = createMarkerLocal [_cm,_xPos];ADMIN_LOCAL_MARKER=true; + _vm setMarkerDirLocal (getDir _x); + _vm setMarkerTypeLocal 'mil_start'; + _vm setMarkerColorLocal 'ColorBlue'; + _vm setMarkerTextLocal format['%1',_typename]; + }; + } forEach ([0,0,0] nearEntities[['LandVehicle','Ship','Air','Tank'],1000000]); + uiSleep 1; + }; + for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));}; +}; +adminVehicleMarker = { + if(isNil 'markadVehicleMarker')then + { + markadVehicleMarker = [] spawn adminVehicleMarkers; + } + else + { + terminate markadVehicleMarker;markadVehicleMarker=nil; + for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));}; + }; +}; +adminFlagMark = { + if(isNil 'FLAG_MARK_THREAD')then + { + timerForFlags = 0; + FLAG_MARK_THREAD = [] spawn { + while {true} do + { + if(time > timerForFlags)then + { + timerForFlags = time + 25; + Exile_Construction_Flag_Static_ARRAY = (allMissionObjects 'Exile_Construction_Flag_Static'); + }; + for '_i' from 0 to (count Exile_Construction_Flag_Static_ARRAY)-1 do + { + _c = Exile_Construction_Flag_Static_ARRAY select _i; + if(!isNull _c)then + { + deleteMarkerLocal ('adminFlagMarks' + (str _i)); + _vm = createMarkerLocal [('adminFlagMarks' + (str _i)), getPos _c]; + _vm setMarkerAlphaLocal 0.8; + _vm setMarkerBrushLocal 'Grid'; + _radius = _c getVariable['ExileTerritorySize', 15]; + _vm setMarkerSizeLocal [_radius,_radius]; + _vm setMarkerShapeLocal 'ELLIPSE'; + _vm setMarkerColorLocal 'ColorGreen'; + + _k = _i + 30000; + deleteMarkerLocal ('adminFlagMarks' + (str _k)); + _vm = createMarkerLocal [('adminFlagMarks' + (str _k)), getPos _c]; + _vm setMarkerColorLocal 'ColorGreen'; + _vm setMarkerTypeLocal 'selector_selectable'; + _vm setMarkerSizeLocal [0.5,0.5]; + + _level = _c getVariable['ExileTerritoryLevel', 1]; + _vm setMarkerTextLocal format['LVL %1',_level]; + }; + }; + uiSleep 30; + }; + }; + } + else + { + terminate FLAG_MARK_THREAD;FLAG_MARK_THREAD=nil; + _flagCount = (count Exile_Construction_Flag_Static_ARRAY)+300; + for '_i' from 0 to _flagCount do {deleteMarkerLocal ('adminFlagMarks' + (str _i));deleteMarkerLocal ('adminFlagMarks' + (str (_i+30000)));}; + }; +}; +adminContainerMark = { + if(isNil 'CONTAINER_MARK_THREAD')then + { + CONTAINER_MARK_CREATED = []; + timerForContainer = 0; + CONTAINER_MARK_THREAD = [] spawn { + private ['_objects']; + while {true} do + { + if(time > timerForContainer)then + { + timerForContainer = time + 33; + _objects = []; + _objects append (allMissionObjects 'Exile_Container_SupplyBox'); + _objects append (allMissionObjects 'Exile_Container_Abstract'); + _objects append (allMissionObjects 'Exile_Container_Safe'); + }; + + { + _markerName = format['adminContainerMarks_%1',netId _x]; + _mText = markerText _markerName; + if(_mText isEqualTo '')then + { + _m = createMarkerLocal [_markerName, getPos _x]; + _m setMarkerColorLocal 'ColorPink'; + _m setMarkerTypeLocal 'selector_selectable'; + _m setMarkerSizeLocal [0.5,0.5]; + _m setMarkerTextLocal (gettext (configFile >> 'CfgVehicles' >> typeOf _x >> 'displayName')); + CONTAINER_MARK_CREATED pushBackUnique _m; + }; + } forEach _objects; + + { + if(_x select [0,19] isEqualTo 'adminContainerMarks')then + { + _container = objectFromNetId (_x select [20]); + if(isNull _container)then + { + deleteMarkerLocal _x; + CONTAINER_MARK_CREATED = CONTAINER_MARK_CREATED - [_x]; + }; + }; + } forEach CONTAINER_MARK_CREATED; + uiSleep 40; + }; + }; + } + else + { + terminate CONTAINER_MARK_THREAD;CONTAINER_MARK_THREAD=nil; + { deleteMarkerLocal _x; } forEach CONTAINER_MARK_CREATED; + CONTAINER_MARK_CREATED = []; + }; +}; +adminDeadPlayers = +{ + while {true} do + { + ADMIN_DeadPlayer_LIST = [] + allDeadMen; + for '_i' from 0 to (count ADMIN_DeadPlayer_LIST)-1 do + { + deleteMarkerLocal ('adminDeadPlayers' + (str _i)); + _c = ADMIN_DeadPlayer_LIST select _i; + if(!isNull _c)then + { + _txt = _c call fnc_get_exileObjName; + _txt = format['%1 (DEAD)',_txt]; + _vm = createMarkerLocal [('adminDeadPlayers' + (str _i)), getPos _c];ADMIN_LOCAL_MARKER=true; + _vm setMarkerTypeLocal 'waypoint'; + _vm setMarkerColorLocal 'ColorBlack'; + _vm setMarkerTextLocal _txt; + }; + }; + uiSleep 20; + }; + for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));}; +}; +adminDeadPlayer = { + if(isNil 'markadDeadPlayer')then + { + markadDeadPlayer = [] spawn adminDeadPlayers; + } + else + { + terminate markadDeadPlayer;markadDeadPlayer=nil; + for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));}; + }; +}; +fnc_infiSTAR_vehboostKeydown = { + _key = _this select 1; + _shiftState = _this select 2; + _ctrlState = _this select 3; + _altState = _this select 4; + + _obj = cameraOn; + if(!local _obj)exitWith{}; + if(_obj == player)exitWith{}; + + + if(_key isEqualTo 0x39)exitWith + { + _vel = velocity _obj; + _obj setVelocity [ + (_vel select 0) * 0.96, + (_vel select 1) * 0.96, + (_vel select 2) * 0.98 + ]; + false + }; + + _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> typeOf _obj >> 'maxSpeed'); + _speed = speed _obj; + _absspeed = abs _speed; + if(((_absspeed > _maxSpeed * 2.5)&&(_obj isKindOf 'Air'))||((_absspeed > _maxSpeed * 1.1)&&!(_obj isKindOf 'Air')))exitWith{false}; + + if(isEngineOn _obj)then + { + if(_shiftState)exitWith + { + if(visibleMap)exitWith{false}; + if(_key isEqualTo 0x05)exitWith{false}; + _vel = velocity _obj; + if(_speed < 30)then + { + _dir = direction _obj; + _obj setVelocity [ + (_vel select 0) + (sin _dir * 1.02), + (_vel select 1) + (cos _dir * 1.02), + (_vel select 2) + ]; + } + else + { + _obj setVelocity [ + (_vel select 0) * 1.015, + (_vel select 1) * 1.015, + (_vel select 2) + ]; + }; + }; + }; + false +}; +infiSTAR_VehicleBoost = { + if(isNil 'infiSTAR_vehboost_keybind')then + { + infiSTAR_vehboost_keybind = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiSTAR_vehboostKeydown']; + systemChat ' Vehboost Keybinds added: SHIFT FOR SPEED - SPACEBAR TO BREAK'; + } + else + { + (findDisplay 46) displayRemoveEventHandler ['KeyDown',infiSTAR_vehboost_keybind]; + infiSTAR_vehboost_keybind = nil; + systemChat ' Vehboost Keybinds removed'; + }; +}; +infiSTAR_FlyUp = { + _obj = cameraOn; + if(local _obj)then + { + _vel = velocity _obj; + if(_obj isKindOf 'Air')then { + _obj setVelocity [(_vel select 0),(_vel select 1),30]; + } else { + _obj setVelocity [(_vel select 0),(_vel select 1),8]; + }; + }; +}; +infiSTAR_TpUp = { + _obj = cameraOn; + if(!local _obj)exitWith{}; + _obj setPos (_obj modelToWorld [0,0,3]); +}; +fn_doHover = { + _height = getPos hover_obj select 2; + if(_height < hover_height)then{hover_velocity set[2,1];}else{hover_velocity set[2,0];}; + hover_obj setVelocity hover_velocity; +}; +fnc_Hover = { + _obj = cameraOn; + if(!local _obj)exitWith{ + _log = 'Object not local. Get in driver first!'; + _log call FN_SHOW_LOG; + }; + hover_obj = _obj; + hover_pos = getPos _obj; + hover_height = getPos _obj select 2; + hover_velocity = [0,0,0]; + if(isNil 'hovverthread')then + { + hover_obj setPos hover_pos; + hovverthread = addMissionEventHandler ['Draw3D', {call fn_doHover}]; + _log = 'Now Hovering'; + _log call FN_SHOW_LOG; + } + else + { + removeMissionEventHandler ['Draw3D',hovverthread];hovverthread=nil; + _log = 'No longer Hovering'; + _log call FN_SHOW_LOG; + }; +}; +infiSTAR_go_down = { + _veh = vehicle player; + if(local _veh)then + { + _vel = velocity _veh; + _posZ = (getPos _veh) select 2; + if(_posZ > 6)then { + _veh setVelocity [(_vel select 0),(_vel select 1),-80]; + } else { + if(_posZ < 10)then{_veh setVelocity [0,0,-3];}; + }; + if(isTouchingGround _veh)then{_veh setVectorUp [0,0,1];}; + }; +}; +infiSTAR_shortTP = { + if(isNil'infiSTAR_TpdirectionENABLED')exitWith{['ErrorTitleAndText', ['infiSTAR.de', 'Function not enabled!']] call ExileClient_gui_toaster_addTemplateToast;false}; + if(player isEqualTo vehicle player)then + { + _distance = 1; + _object = player; + _dir = getdir _object; + _pos = getPos _object; + if(surfaceIsWater _pos)then + { + _pos = getPosASL _object; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _object setPosASL _pos; + } + else + { + _pos = getPosATL _object; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _object setPosATL _pos; + }; + {player reveal _x;} foreach (_pos nearObjects 50); + }; +}; +infiSTAR_Tpdirection = { + if(isNil'infiSTAR_TpdirectionENABLED')exitWith{['ErrorTitleAndText', ['infiSTAR.de', 'Function not enabled!']] call ExileClient_gui_toaster_addTemplateToast;false}; + _distance = 10; + _veh = vehicle player; + if(local _veh)then + { + _dir = getdir _veh; + if(surfaceIsWater position _veh)then + { + _pos = getPosASL _veh; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _veh setPosASL _pos; + } + else + { + _pos = getPosATL _veh; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _veh setPosATL _pos; + }; + }; + {player reveal _x;} foreach (_pos nearObjects 50); +}; +infiSTAR_A3Togglelock = { + private ['_veh']; + {player reveal _x;} foreach (cameraOn nearObjects 50); + _veh = cameraOn; + if(isNull objectParent player)then{_veh = cursorTarget;}; + if(isNull _veh)then{_veh = cursorObject;}; + if(isNull _veh)exitWith + { + _log = 'target does not exist'; + _log call FN_SHOW_LOG; + }; + if(!alive _veh)exitWith + { + _log = 'target is destroyed '; + _log call FN_SHOW_LOG; + }; + if((_veh isKindOf 'AllVehicles')&&!(_veh isKindOf 'Man'))exitWith + { + _locked = locked _veh; + if(_locked isEqualTo 1)exitWith + { + _log = format['vehicle [%1] not persistent and will not be locked!',typeOf _veh]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + }; + if(_locked isEqualTo 2)then + { + _log = format['unlocked - [%1]',typeOf _veh]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + } + else + { + _log = format['locked - [%1]',typeOf _veh]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + }; + [10,netId _veh] call fn_ACR; + }; + + { + _animationPhase = cursorTarget animationPhase _x; + cursorTarget animate [_x,if(_animationPhase > 0)then{0}else{1}]; + } forEach ['DoorRotation','DoorRotationLeft','DoorRotationRight','open_left','open_right','lock_cGarage','Open_Door','lock_Door','raise','Open_top','Open_bot']; +}; +_stayLocalNumber = 48300; +fnc_RscDisplayDebugPublic = { + if!('DebugConsole' call ADMINLEVELACCESS)exitWith{systemChat 'You are not allowed to use this! (missing DebugConsole in Adminpowers)';}; + disableSerialization; + if(isNull findDisplay 316000)then{createdialog 'RscDisplayDebugPublic';}; + waitUntil {!isNull findDisplay 316000}; + _display = findDisplay 316000; + + { + if!(ctrlIDC _x in [13284,13288])then + { + _x ctrlRemoveAllEventHandlers 'ButtonDown'; + _x ctrlRemoveAllEventHandlers 'ButtonClick'; + _x ctrlRemoveAllEventHandlers 'MouseButtonClick'; + _x ctrlRemoveAllEventHandlers 'MouseButtonDown'; + }; + } forEach (allControls _display); + + _testRscListBox1 = [_display,'RscListBox',122000] call fnc_createctrl; + _testRscListBox1 ctrlSetposition [0.83,0,0.5,1]; + _testRscListBox1 ctrlEnable true; + _testRscListBox1 ctrlCommit 0; + lbClear _testRscListBox1; + _testRscListBox1 lbadd format['Player connected: %1',{getPlayerUID _x != ''} count (call fnc_get_plr)]; + _names = []; + { + if(getPlayerUID _x != '')then + { + _names pushBackUnique (_x call fnc_get_exileObjName); + }; + } forEach (units (group player)); + { + if(getPlayerUID _x != '')then + { + _names pushBackUnique (_x call fnc_get_exileObjName); + }; + } forEach (call fnc_get_plr); + { + _testRscListBox1 lbadd _x; + } forEach _names; + + for '_i' from 0 to 12 do {_testRscListBox1 lbAdd '';}; + + _watchField1 = _display displayCtrl 12285; + _watchField2 = _display displayCtrl 12287; + _watchField3 = _display displayCtrl 12289; + _watchField4 = _display displayCtrl 12291; + waitUntil + { + _title = _display displayCtrl 11884; + _title ctrlSetText 'DebugConsole - modified by infiSTAR.de'; + + _titleBox = _display displayCtrl 11892; + _titleBox ctrlSetText 'ENTER: CODE TO RUN'; + + _btnSpectator = _display displayCtrl 13287; + _btnSpectator ctrlEnable true; + _btnSpectator ctrlShow true; + _btnSpectator ctrlSetText 'clear'; + _btnSpectator buttonSetAction ' + diag_log (ctrlText ((findDisplay 316000) displayCtrl 12284)); + ((findDisplay 316000) displayCtrl 12284) ctrlSetText ''''; + '; + + _btnCamera = _display displayCtrl 13288; + _btnCamera ctrlEnable true; + _btnCamera ctrlShow true; + + _btnFunctions = _display displayCtrl 13289; + _btnFunctions ctrlSetText 'lock'; + if('Lock Server (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnFunctions buttonSetAction ' + [-662,1] call fn_ACR; + '; + } + else + { + _btnFunctions ctrlEnable false; + }; + + _btnConfig = _display displayCtrl 13290; + _btnConfig ctrlSetText 'unlock'; + if('UnLock Server (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnConfig buttonSetAction ' + [-662,2] call fn_ACR; + '; + } + else + { + _btnConfig ctrlEnable false; + }; + + _btnAnimations = _display displayCtrl 13291; + _btnAnimations ctrlSetText 'ban'; + _btnAnimations ctrlRemoveAllEventHandlers 'ButtonClick'; + _btnAnimations buttonSetAction ''; + if('Ban (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnAnimations buttonSetAction ' + _lbtxt = lbtext[122000,(lbCurSel 122000)]; + { + _xUID = getPlayerUID _x; + if(_xUID != '''')then + { + if((_x call fnc_get_exileObjName) isEqualTo _lbtxt)exitWith + { + _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284)); + if(_reason == '''')then{_reason=''Admin Ban'';}; + _input = [3,netId _x,toArray _reason]; + [-662,_input] call fn_ACR; + }; + }; + } forEach (call fnc_get_plr); + '; + } + else + { + _btnAnimations ctrlEnable false; + }; + + _btnGuiEditor = _display displayCtrl 13292; + _btnGuiEditor ctrlSetText 'kick'; + _btnGuiEditor ctrlRemoveAllEventHandlers 'ButtonClick'; + _btnGuiEditor buttonSetAction ''; + if('Kick (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnGuiEditor buttonSetAction ' + _lbtxt = lbtext[122000,(lbCurSel 122000)]; + { + _xUID = getPlayerUID _x; + if(_xUID != '''')then + { + if((_x call fnc_get_exileObjName) isEqualTo _lbtxt)exitWith + { + _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284)); + if(_reason == '''')then{_reason=''Admin Kick'';}; + _input = [4,netId _x,toArray _reason]; + [-662,_input] call fn_ACR; + }; + }; + } forEach (call fnc_get_plr); + '; + } + else + { + _btnGuiEditor ctrlEnable false; + }; + + + _btnSE = _display displayCtrl 13286; + _btnSE ctrlRemoveAllEventHandlers 'ButtonClick'; + if('Execute code on server (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnSE buttonSetAction ''; + _btnSE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0_server;true']; + } + else + { + _btnSE ctrlEnable false; + }; + + + _btnGE = _display displayCtrl 13285; + _btnGE ctrlRemoveAllEventHandlers 'ButtonClick'; + if('Execute code global (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnGE buttonSetAction ''; + _btnGE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0;true']; + } + else + { + _btnGE ctrlEnable false; + }; + + + _btnLE = _display displayCtrl 1; + _btnLE ctrlRemoveAllEventHandlers 'ButtonClick'; + if('Execute code local (DebugConsole)' call ADMINLEVELACCESS)then + { + _btnLE buttonSetAction ''; + _btnLE ctrlSetEventHandler['ButtonClick','(ctrlText((findDisplay 316000) displayCtrl 12284)) call fnc_admin_cc;true']; + } + else + { + _btnLE ctrlEnable false; + }; + + isNull findDisplay 316000 + }; +}; +FN_SERVER_INFORMATION_OVERLAY = { + if(isNil'DEBUG_OVERLAY_THREAD')then + { + DEBUG_OVERLAY_THREAD = [] spawn { + private['_timer1','_timer2','_code','_ALL','_allMissionObjects','_allMissionObjectsTypeAll','_ObjectsSimulated','_Exile_Construction','_Exile_Flag','_Vehicles','_LandVehicleAirShipStatic','_allDead','_allDeadMen','_DeadPlayers','_Players','_AI','_SERVERTHREADS','_FPS','_MissionRunningTime','_nearestObject','_nearestObjectHealth','_nearestObjects','_LootWeaponHolder','_GroundWeaponHolder','_WeaponHolderSimulated','_Exile_Flag150m','_Exile_Construction150m','_LootWeaponHolder150m','_GroundWeaponHolder150m','_WeaponHolderSimulated150m','_ctrlTXT']; + disableSerialization; + _ctrlTXT = [findDisplay 46,'RscStructuredText',5555313] call fnc_createctrl; + _ctrlTXT ctrlSetPosition [safeZoneX+safeZoneW-0.6,safeZoneY+0.1,0.55,1.2]; + _ctrlTXT ctrlCommit 0; + + _timer1 = 0; + _timer2 = 0; + while{true}do + { + if(time > _timer1)then + { + _timer1 = time + 10; + + _ALL = (allMissionObjects ''); + _Exile_Flag = {_x isKindOf 'Exile_Construction_Flag_Static'} count _ALL; + _Exile_Construction = { + _x isKindOf 'Exile_Construction_Abstract_Static' || + _x isKindOf 'Exile_Container_SupplyBox' || + _x isKindOf 'Exile_Container_Abstract' || + _x isKindOf 'Exile_Container_Safe' + } count _ALL; + _allMissionObjects = count _ALL; + _ObjectsSimulated = {simulationEnabled _x} count _ALL; + + _Vehicles = count vehicles; + _LandVehicleAirShipStatic = count ([0,0,0] nearEntities [['LandVehicle','Air','Ship','Tank','Static'], 10000000]); + + _LootWeaponHolder = {_x isKindOf 'LootWeaponHolder'} count _ALL; + _GroundWeaponHolder = {_x isKindOf 'GroundWeaponHolder'} count _ALL; + _WeaponHolderSimulated = {_x isKindOf 'WeaponHolderSimulated'} count _ALL; + }; + if(time > _timer2)then + { + _timer2 = time + 3; + + _allDead = count allDead; + _allDeadMen = count allDeadMen; + _DeadPlayers = {!alive _x} count (call fnc_get_plr); + _Players = count (call fnc_get_plr); + _AI = {(!(isPlayer _x) && (!isNull group _x))} count allUnits; + + _Exile_Flag150m = count (player nearObjects ['Exile_Construction_Flag_Static', 150]); + _Exile_Construction150m = count (player nearObjects ['Exile_Construction_Abstract_Static', 150]); + _LootWeaponHolder150m = count (player nearObjects ['LootWeaponHolder', 150]); + _GroundWeaponHolder150m = count (player nearObjects ['GroundWeaponHolder', 150]); + _WeaponHolderSimulated150m = count (player nearObjects ['WeaponHolderSimulated', 150]); + }; + _MissionRunningTime = if(time > 0)then{_hours = floor(time / 60 / 60);_minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);_seconds = time - (_hours*60*60) - (_minutes * 60);format['%1h %2min %3s',_hours,_minutes,round _seconds]}else{0}; + _nearestObject = ''; + _nearestObjectHealth = ''; + _nearestObjects = nearestObjects [screenToWorld [0.5,0.5], [], 10]; + { + if(!isNull _x)exitWith + { + _nearestObject = _x; + _nearestObjectHealth = (1-(damage _x))*100; + }; + }forEach _nearestObjects; + _txt = format[' +Exile_Flags on Map: %1
+Exile_Constructions on Map: %2
+LootWeaponHolder on Map: %20
+GroundWeaponHolder on Map: %21
+WeaponHolderSimulated on Map: %22
+
+Exile_Flags in 150m: %3
+Exile_Constructions in 150m: %27
+LootWeaponHolder in 150m: %23
+GroundWeaponHolder in 150m: %24
+WeaponHolderSimulated in 150m: %25
+
+allMissionObjects: %4
+Vehicles: %6
+LandVehicleAirShipStatic: %7
+ObjectsSimulated: %5
+
+Players: %11
+DeadPlayers: %10
+allDeadMen: %9
+allDead: %8
+AI: %12
+
+CLIENT: [FPS: %16|THREADS: %26]
+SERVER: [FPS: %15|THREADS: %13]
+MissionRunningTime: %14
+
+Server looptime: %28
+
+TARGET TYPE: %17
+TARGET DISTANCE: %18
+TARGET HEALTH: %19
+ ', + _Exile_Flag, + _Exile_Construction, + _Exile_Flag150m, + _allMissionObjects, + _ObjectsSimulated, + _Vehicles, + _LandVehicleAirShipStatic, + _allDead, + _allDeadMen, + _DeadPlayers, + _Players, + _AI, + SERVER_THREADS, + _MissionRunningTime, + SERVER_FPS, + diag_fps, + if(isNull cursorTarget)then{_nearestObject}else{typeOf cursorTarget}, + if(isNull cursorTarget)then{player distance (screenToWorld [0.5,0.5])}else{player distance cursorTarget}, + if(isNull cursorTarget)then{_nearestObjectHealth}else{(1-(damage cursorTarget))*100}, + _LootWeaponHolder, + _GroundWeaponHolder, + _WeaponHolderSimulated, + _LootWeaponHolder150m, + _GroundWeaponHolder150m, + _WeaponHolderSimulated150m, + count diag_activeSQFScripts, + _Exile_Construction150m, + SERVER_LOOPTIME + ]; + _ctrlTXT ctrlSetStructuredText parseText _txt; + uiSleep .5; + }; + }; + } + else + { + terminate DEBUG_OVERLAY_THREAD;DEBUG_OVERLAY_THREAD=nil; + ctrlDelete ((findDisplay 46) displayCtrl 5555313); + }; +}; +FN_GEAR_ON_TARGET = { + disableSerialization; + _tvctrl = [findDisplay 46 createDisplay 'RscCredits','RscTree',55667] call fnc_createctrl; + _tvctrl ctrlSetFont 'PuristaBold'; + _tvctrl ctrlSetTextColor[1,1,1,1]; + _tvctrl ctrlSetBackgroundColor[0,0,0,0.7]; + _tvctrl ctrlSetPosition[0.1,safeZoneY,1,safeZoneH]; + _tvctrl ctrlRemoveAllEventHandlers 'TreeDblClick'; + _tvctrl ctrlAddEventHandler ['TreeDblClick',{ + _tvctrl = _this select 0; + _tvCurSel = _this select 1; + _class = _tvctrl tvData _tvCurSel; + if(_class != '')then + { + _click = _tvctrl tvText _tvCurSel; + if(isNull SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;}; + _target = SELECTED_TARGET_PLAYER; + _log = format['Spawning %1 on %2!',_click,_target call fnc_get_exileObjName]; + _log call FN_SHOW_LOG; + _log call fnc_adminLog; + [_target,_class] call fnc_reallyAdditem; + }; + }]; + _tvctrl ctrlCommit 0; + { + _category = _x; + _index = _forEachIndex; + _tvctrl tvAdd [[],_category]; + + _variable = missionNamespace getVariable (_category+'_ARRAY'); + { + _class = _x call { + if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'}; + if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'}; + 'CfgVehicles' + }; + + _displayName = getText(configFile >> _class >> _x >> 'displayName'); + _picture = getText(configFile >> _class >> _x >> 'picture'); + + _tvctrl tvAdd [[_index],format['%1 (%2)',_displayName,_x]]; + _tvctrl tvSetPicture [[_index,_forEachIndex],_picture]; + _tvctrl tvSetData [[_index,_forEachIndex],_x]; + } forEach _variable; + }forEach newAllItems_CATEGORY; +}; +FN_CHANGE_VIEWDISTANCE = { + disableSerialization; + _display = findDisplay 999; + if(isNull _display)then{_display = findDisplay 46 createDisplay 'RscCredits';}; + _ctrl = [_display,'RSCText',44667] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0,1,.1]; + _ctrl ctrlSetText format['ViewDistance: %1',viewDistance]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44668] call fnc_createctrl; + _ctrl sliderSetRange [150, 6000]; + _ctrl sliderSetPosition viewDistance; + _ctrl ctrlSetPosition [0.2,0.075]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + setViewDistance (_this select 1); + setObjectViewDistance [(_this select 1),(getObjectViewDistance select 1)]; + ((findDisplay 999) displayCtrl 44670) sliderSetPosition (_this select 1); + ((findDisplay 999) displayCtrl 44667) ctrlSetText format[''ViewDistance: %1'',viewDistance]; + ((findDisplay 999) displayCtrl 44669) ctrlSetText format[''ObjectViewDistance: %1'',(getObjectViewDistance select 0)]; + ']; + _ctrl ctrlCommit 0; + + + _ctrl = [_display,'RSCText',44669] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.1,1,.1]; + _ctrl ctrlSetText format['ObjectViewDistance: %1',getObjectViewDistance select 0]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44670] call fnc_createctrl; + _ctrl sliderSetRange [150, 6000]; + _ctrl sliderSetPosition (getObjectViewDistance select 0); + _ctrl ctrlSetPosition [0.2,0.175]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + setViewDistance (_this select 1); + setObjectViewDistance [(_this select 1),(getObjectViewDistance select 1)]; + ((findDisplay 999) displayCtrl 44668) sliderSetPosition (_this select 1); + ((findDisplay 999) displayCtrl 44667) ctrlSetText format[''ViewDistance: %1'',viewDistance]; + ((findDisplay 999) displayCtrl 44669) ctrlSetText format[''ObjectViewDistance: %1'',(getObjectViewDistance select 0)]; + ']; + _ctrl ctrlCommit 0; + + + _ctrl = [_display,'RSCText',44671] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.2,1,.1]; + _ctrl ctrlSetText format['ShadowViewDistance: %1',getObjectViewDistance select 1]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44672] call fnc_createctrl; + _ctrl sliderSetRange [0, 300]; + _ctrl sliderSetPosition (getObjectViewDistance select 1); + _ctrl ctrlSetPosition [0.2,0.275]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + setObjectViewDistance [(getObjectViewDistance select 0),_this select 1]; + ((findDisplay 999) displayCtrl 44671) ctrlSetText format[''ShadowViewDistance: %1'',_this select 1]; + ']; + _ctrl ctrlCommit 0; + + + _ctrl = [_display,'RSCText',44673] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.3,1,.1]; + _ctrl ctrlSetText format['TerrainGrid: %1',getTerrainGrid]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44674] call fnc_createctrl; + _ctrl sliderSetRange [3.125, 50]; + _ctrl sliderSetPosition getTerrainGrid; + _ctrl ctrlSetPosition [0.2,0.375]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + setTerrainGrid (_this select 1); + ((findDisplay 999) displayCtrl 44673) ctrlSetText format[''TerrainGrid: %1'',getTerrainGrid]; + ']; + _ctrl ctrlCommit 0; + + + OVERCAST_VALUE = overcast; + _ctrl = [_display,'RSCText',44675] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.45,1,.1]; + _ctrl ctrlSetText format['Overcast (only changes when globally executed!): %1',overcast]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44676] call fnc_createctrl; + _ctrl sliderSetRange [0, 1]; + _ctrl sliderSetPosition OVERCAST_VALUE; + _ctrl ctrlSetPosition [0.2,0.525]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + OVERCAST_VALUE = _this select 1; + 0 setOvercast OVERCAST_VALUE; + ((findDisplay 999) displayCtrl 44675) ctrlSetText format[''Overcast: %1'',overcast]; + ']; + _ctrl ctrlCommit 0; + + FOG_VALUE = fog; + _ctrl = [_display,'RSCText',44677] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.55,1,.1]; + _ctrl ctrlSetText format['Fog: %1',FOG_VALUE]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44678] call fnc_createctrl; + _ctrl sliderSetRange [0, 1]; + _ctrl sliderSetPosition FOG_VALUE; + _ctrl ctrlSetPosition [0.2,0.625]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + FOG_VALUE = _this select 1; + ((findDisplay 999) displayCtrl 44677) ctrlSetText format[''Fog: %1'',FOG_VALUE]; + ']; + _ctrl ctrlCommit 0; + if(!isNil'FOG_VALUE_THREAD')then{terminate FOG_VALUE_THREAD;FOG_VALUE_THREAD=nil;}; + FOG_VALUE_THREAD = [] spawn { + while {!isNull ((findDisplay 999) displayCtrl 44678)} do + { + 0 setFog FOG_VALUE; + }; + }; + + RAIN_VALUE = rain; + _ctrl = [_display,'RSCText',44679] call fnc_createctrl; + _ctrl ctrlSetPosition [0.2,0.65,1,.1]; + _ctrl ctrlSetText format['Rain: %1',RAIN_VALUE]; + _ctrl ctrlCommit 0; + _ctrl = [_display,'RscXSliderH',44680] call fnc_createctrl; + _ctrl sliderSetRange [0, 1]; + _ctrl sliderSetPosition RAIN_VALUE; + _ctrl ctrlSetPosition [0.2,0.725]; + _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1]; + _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged'; + _ctrl ctrlAddEventHandler ['SliderPosChanged',' + RAIN_VALUE = _this select 1; + ((findDisplay 999) displayCtrl 44679) ctrlSetText format[''Rain: %1'',RAIN_VALUE]; + ']; + _ctrl ctrlCommit 0; + if(!isNil'RAIN_VALUE_THREAD')then{terminate RAIN_VALUE_THREAD;RAIN_VALUE_THREAD=nil;}; + RAIN_VALUE_THREAD = [] spawn { + while {!isNull ((findDisplay 999) displayCtrl 44676)} do + { + 0 setRain RAIN_VALUE; + }; + }; + + _ctrl = [_display,'RscButton',44681] call fnc_createctrl; + _ctrl ctrlSetText 'CHANGE WEATHER GLOBAL'; + _ctrl ctrlSetPosition [0.2,0.775,0.4,0.033 * safezoneH]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetEventHandler['ButtonClick','[16,FOG_VALUE,OVERCAST_VALUE,RAIN_VALUE] call fn_ACR;']; +}; +fnc_infiAdminKeyDown = { + params ['_editctrl','_keycode', '_keyshift', '_keyctrl', '_keyalt']; + SHIFT_IS_PRESSED = _keyshift; + CTRL_IS_PRESSED = _keyctrl; + ALT_IS_PRESSED = _keyalt; + if(_keycode isEqualTo 0x0E)then{ if(!isNil'prevLoc')then{ [1,netId player,prevLoc] call fn_ACR;prevLoc = nil; }; }; + false +}; +fnc_infiAdminKeyUp = { + params ['_editctrl','_keycode', '_keyshift', '_keyctrl', '_keyalt']; + SHIFT_IS_PRESSED = false; + CTRL_IS_PRESSED = false; + ALT_IS_PRESSED = false; + if(_keycode in (actionKeys 'User9'))then{ if('Arsenal' call ADMINLEVELACCESS)then{ ['Open',true] call BIS_fnc_arsenal; }; }; + false +}; +_oldValues = profileNamespace getVariable ['infiSTAR_saveToggle',[]]; +if!(_oldValues isEqualTo [])then +{ + { + if(_x call ADMINLEVELACCESS)then + { + if!(_x in infiSTAR_toggled_A)then + { + _x call fnc_toggleables; + }; + }; + } forEach _oldValues; +}; + +if(!isNil 'infiAdminKeyDown')then{(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiAdminKeyDown];infiAdminKeyDown = nil;}; +infiAdminKeyDown = (findDisplay 46) displayAddEventHandler ['KeyDown',{ _this call fnc_infiAdminKeyDown }]; + +if(!isNil 'infiAdminKeyUp')then{(findDisplay 46) displayRemoveEventHandler ['KeyUp',infiAdminKeyUp];infiAdminKeyUp = nil;}; +infiAdminKeyUp = (findDisplay 46) displayAddEventHandler ['KeyUp',{ _this call fnc_infiAdminKeyUp }]; + +if('Teleport On Map Click' call ADMINLEVELACCESS)then +{ + if(!isNil'infiAdminMouseButtonDown')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonDown',infiAdminMouseButtonDown];infiAdminMouseButtonDown=nil;}; + infiAdminMouseButtonDown = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonDown','call fnc_MouseButtonDown']; + + if(!isNil'infiAdminMouseButtonUp')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonUp',infiAdminMouseButtonUp];infiAdminMouseButtonUp=nil;}; + infiAdminMouseButtonUp = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonUp','call fnc_MouseButtonUp']; +}; +FN_SHOW_LOG = {['SuccessTitleAndText', ['infiSTAR.de', _this]] call ExileClient_gui_toaster_addTemplateToast;}; + +_log = format[' %1 - Menu Loaded!',time call FN_GET_TIME_TIME];systemchat _log;diag_log _log; +HTML_LOAD_URL_EXILE = 'http://htmlload.infistar.de/admin.php'; +"; +/* ********************************************************************************* */ +/* *********************************www.infiSTAR.de********************************* */ +/* *******************Developed by infiSTAR (infiSTAR23@gmail.com)****************** */ +/* ********************infiSTAR Copyright®© All rights reserved.******************** */ +/* ********************************************************************************* */ diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/PboPrefix.txt b/@ExileServer/addons/a3_infiSTAR_Exile/PboPrefix.txt new file mode 100644 index 0000000..ff4d4d3 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/PboPrefix.txt @@ -0,0 +1 @@ +a3_infiSTAR_Exile \ No newline at end of file diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/config.cpp b/@ExileServer/addons/a3_infiSTAR_Exile/config.cpp new file mode 100644 index 0000000..4771587 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/config.cpp @@ -0,0 +1,38 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + + Copyright infiSTAR - 2011 - 2018. All rights reserved. + Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR +*/ +#include "EXILE_AHAT_CONFIG.hpp" +class CfgPatches +{ + class a3_infiSTAR_Exile + { + requiredVersion = 0.16100; + requiredAddons[] = {}; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + ammo[] = {}; + author[]= {"Chris(tian) 'infiSTAR' Lorenzen"}; + website[]= {"https://infiSTAR.de"}; + contact[]= {"admin@infiSTAR.de","infiSTAR23@gmail.com"}; + version = 'v90'; + licensed = "zepheris.craty@gmail.com"; + }; +}; +class CfgFunctions +{ + class a3_infiSTAR_Exile + { + class main + { + file = "a3_infiSTAR_Exile"; + class preInit { preInit = 1; }; + class postInit { postInit = 1; }; + }; + }; +}; +#include "CUSTOM_FUNCTIONS.hpp" diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/debug.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/debug.sqf new file mode 100644 index 0000000..a76a38f --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/debug.sqf @@ -0,0 +1,678 @@ +fnc_admin_c = compile 'compile _this'; +fnc_admin_cc = compile 'call compile _this'; +fnc_admin_ccc = compile 'if(!isNil {call compile _this})then{call compile _this}else{''ANY''}'; +fnc_createctrl = { + params['_display','_type','_idc']; + ctrlDelete (_display displayCtrl _idc); + _ctrl = _display ctrlCreate[_type, _idc]; + _ctrl +}; +fnc_setPNS = compileFinal ' + profileNamespace setVariable _this;saveProfileNamespace; +'; +fnc_getPNS = compileFinal ' + profileNamespace getVariable _this +'; +fnc_lbDebugChanged = { + disableSerialization; + _ctrl = _this select 0; + _index = _this select 1; + ((findDisplay -1341) displayCtrl 1) ctrlSetText (['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS select _index); +}; +fnc_fillDebugListBox = { + _listbox = (findDisplay -1341) displayCtrl 1384; + _listbox ctrlRemoveAllEventHandlers 'LBDblClick'; + _listbox ctrlRemoveAllEventHandlers 'LBSelChanged'; + _listbox ctrlAddEventHandler ['LBDblClick', 'call fnc_lbDebugChanged;call fnc_debug_loadbtn;true']; + _listbox ctrlAddEventHandler ['LBSelChanged', 'call fnc_lbDebugChanged;true']; + lbClear _listbox; + + _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS; + if!(_var isEqualTo [])then + { + { + _lbid = _listbox lbAdd _x; + } forEach _var; + }; +}; +already_run_array = []; +last_selected_run_id = 0; +fnc_getMainText = { + private _txt = ctrlText((findDisplay -1341) displayCtrl 1339); + already_run_array = already_run_array - [_txt]; + last_selected_run_id = already_run_array pushBack _txt; + _txt +}; +fnc_debug_loadbtn = { + _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS; + _varname = lbtext[1384,(lbCurSel 1384)]; + if(_varname isEqualTo '')then + { + systemChat 'You need to select a function to load it..!'; + } + else + { + _varvalue = [format['infiSTAR_SAVED_FUNCTION_%1',_varname],''] call fnc_getPNS; + ((findDisplay -1341) displayCtrl 1339) ctrlSetText _varvalue; + + systemChat format['Loaded: %1',_varname]; + call fnc_fillDebugListBox; + }; +true +}; +fnc_workplace = { +_admin = !isNil'MAIN_DISPLAY_ID'; +disableSerialization; +if(isNull findDisplay -1341)then{createdialog 'infiSTAR_EDITBOX2';'AdminConsole' call fnc_adminLog;}; +_display = findDisplay -1341; +_buttonheight = 0.05; + +_wfposY = safeZoneY + 0.01; +_wf1 = _display displayCtrl 1380; +_wf1 ctrlSetPosition [0,_wfposY,1,_buttonheight]; +_wf1 ctrlCommit 0; + +_wf1cb = [_display,'RscCheckBox',1360] call fnc_createctrl; +_wf1cb cbSetChecked (['cbChecked__wf1',false] call fnc_getPNS); +_wf1cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight]; +_wf1cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf1'',(_this select 1) isEqualTo 1] call fnc_setPNS;true']; +_wf1cb ctrlSetTooltip 'ALWAYS SHOW'; +_wf1cb ctrlCommit 0; + + +_wf1cb1 = [_display,'RSCButton',1461] call fnc_createctrl; +_wf1cb1 ctrlSetText 'copy'; +_wf1cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight]; +_wf1cb1 ctrlCommit 0; +_wf1cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1362);true']; + +_wf1cb2 = [_display,'RSCButton',1361] call fnc_createctrl; +_wf1cb2 ctrlSetText 'clear'; +_wf1cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight]; +_wf1cb2 ctrlCommit 0; +_wf1cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1380) ctrlSetText '''';[''wf1tTCT'',''''] call fnc_setPNS;true']; + +if(!isNil'wf1T')then{terminate wf1T;wf1T=nil;}; +wf1T = [0,_wfposY+0.045,1,_buttonheight] spawn { + disableSerialization; + _oldText = ['wf1tTCT',''] call fnc_getPNS; + + _display = findDisplay -1341; + _wf1 = _display displayCtrl 1380; + _wf1 ctrlSetText _oldText; + + _wf1t = [findDisplay 46,'RSCText',1362] call fnc_createctrl; + _wf1t ctrlSetPosition _this; + _wf1t ctrlCommit 0; + while {true} do + { + if((isNull _wf1) && !(['cbChecked__wf1',false] call fnc_getPNS))exitWith{_wf1t ctrlSetText '';}; + + _oldText = ['wf1tTCT',''] call fnc_getPNS; + if(!isNull _wf1)then + { + _ctrltext = ctrlText _wf1; + if(_ctrltext isEqualTo '')then + { + _wf1t ctrlSetText ''; + } + else + { + if!(_ctrltext isEqualTo _oldText)then + { + ['wf1tTCT',_ctrltext] call fnc_setPNS; + }; + }; + }; + if!(_oldText isEqualTo '')then + { + _wf1t ctrlSetText str(_oldText call fnc_admin_ccc); + }; + uiSleep 0.1; + }; +}; + +_wfposY = _wfposY + 0.1; +_wf2 = _display displayCtrl 1381; +_wf2 ctrlSetPosition [0,_wfposY,1,_buttonheight]; +_wf2 ctrlCommit 0; + +_wf2cb = [_display,'RscCheckBox',1260] call fnc_createctrl; +_wf2cb cbSetChecked (['cbChecked__wf2',false] call fnc_getPNS); +_wf2cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight]; +_wf2cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf2'',(_this select 1) isEqualTo 1] call fnc_setPNS;true']; +_wf2cb ctrlSetTooltip 'ALWAYS SHOW'; +_wf2cb ctrlCommit 0; + +_wf2cb1 = [_display,'RSCButton',1561] call fnc_createctrl; +_wf2cb1 ctrlSetText 'copy'; +_wf2cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight]; +_wf2cb1 ctrlCommit 0; +_wf2cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1262);true']; + +_wf2cb2 = [_display,'RSCButton',1261] call fnc_createctrl; +_wf2cb2 ctrlSetText 'clear'; +_wf2cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight]; +_wf2cb2 ctrlCommit 0; +_wf2cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1381) ctrlSetText '''';[''wf2tTCT'',''''] call fnc_setPNS;true']; + +if(!isNil'wf2T')then{terminate wf2T;wf2T=nil;}; +wf2T = [0,_wfposY+0.045,1,_buttonheight] spawn { + disableSerialization; + _oldText = ['wf2tTCT',''] call fnc_getPNS; + + _display = findDisplay -1341; + _wf2 = _display displayCtrl 1381; + _wf2 ctrlSetText _oldText; + + _wf2t = [findDisplay 46,'RSCText',1262] call fnc_createctrl; + _wf2t ctrlSetPosition _this; + _wf2t ctrlCommit 0; + while {true} do + { + if((isNull _wf2) && !(['cbChecked__wf2',false] call fnc_getPNS))exitWith{_wf2t ctrlSetText '';}; + + _oldText = ['wf2tTCT',''] call fnc_getPNS; + if(!isNull _wf2)then + { + _ctrltext = ctrlText _wf2; + if(_ctrltext isEqualTo '')then + { + _wf2t ctrlSetText ''; + } + else + { + if!(_ctrltext isEqualTo _oldText)then + { + ['wf2tTCT',_ctrltext] call fnc_setPNS; + }; + }; + }; + if!(_oldText isEqualTo '')then + { + _wf2t ctrlSetText str(_oldText call fnc_admin_ccc); + }; + uiSleep 0.1; + }; +}; + + +_wfposY = _wfposY + 0.1; +_wf3 = _display displayCtrl 1382; +_wf3 ctrlSetPosition [0,_wfposY,1,_buttonheight]; +_wf3 ctrlCommit 0; + +_wf3cb = [_display,'RscCheckBox',1160] call fnc_createctrl; +_wf3cb cbSetChecked (['cbChecked__wf3',false] call fnc_getPNS); +_wf3cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight]; +_wf3cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf3'',(_this select 1) isEqualTo 1] call fnc_setPNS;true']; +_wf3cb ctrlSetTooltip 'ALWAYS SHOW'; +_wf3cb ctrlCommit 0; + +_wf3cb1 = [_display,'RSCButton',1661] call fnc_createctrl; +_wf3cb1 ctrlSetText 'copy'; +_wf3cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight]; +_wf3cb1 ctrlCommit 0; +_wf3cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1162);true']; + +_wf3cb2 = [_display,'RSCButton',1161] call fnc_createctrl; +_wf3cb2 ctrlSetText 'clear'; +_wf3cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight]; +_wf3cb2 ctrlCommit 0; +_wf3cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1382) ctrlSetText '''';[''wf3tTCT'',''''] call fnc_setPNS;true']; + +if(!isNil'wf3T')then{terminate wf3T;wf3T=nil;}; +wf3T = [0,_wfposY+0.045,1,_buttonheight] spawn { + disableSerialization; + _oldText = ['wf3tTCT',''] call fnc_getPNS; + + _display = findDisplay -1341; + _wf3 = _display displayCtrl 1382; + _wf3 ctrlSetText _oldText; + + _wf3t = [findDisplay 46,'RSCText',1162] call fnc_createctrl; + _wf3t ctrlSetPosition _this; + _wf3t ctrlCommit 0; + while {true} do + { + if((isNull _wf3) && !(['cbChecked__wf3',false] call fnc_getPNS))exitWith{_wf3t ctrlSetText '';}; + + _oldText = ['wf3tTCT',''] call fnc_getPNS; + if(!isNull _wf3)then + { + _ctrltext = ctrlText _wf3; + if(_ctrltext isEqualTo '')then + { + _wf3t ctrlSetText ''; + } + else + { + if!(_ctrltext isEqualTo _oldText)then + { + ['wf3tTCT',_ctrltext] call fnc_setPNS; + }; + }; + }; + if!(_oldText isEqualTo '')then + { + _wf3t ctrlSetText str(_oldText call fnc_admin_ccc); + }; + uiSleep 0.1; + }; +}; + + +_wfposY = _wfposY + 0.1; +_wf4 = _display displayCtrl 1383; +_wf4 ctrlSetPosition [0,_wfposY,1,_buttonheight]; +_wf4 ctrlCommit 0; + +_wf4cb = [_display,'RscCheckBox',1060] call fnc_createctrl; +_wf4cb cbSetChecked (['cbChecked__wf4',false] call fnc_getPNS); +_wf4cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight]; +_wf4cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf4'',(_this select 1) isEqualTo 1] call fnc_setPNS;true']; +_wf4cb ctrlSetTooltip 'ALWAYS SHOW'; +_wf4cb ctrlCommit 0; + +_wf4cb1 = [_display,'RSCButton',1761] call fnc_createctrl; +_wf4cb1 ctrlSetText 'copy'; +_wf4cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight]; +_wf4cb1 ctrlCommit 0; +_wf4cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1062);true']; + +_wf4cb2 = [_display,'RSCButton',1061] call fnc_createctrl; +_wf4cb2 ctrlSetText 'clear'; +_wf4cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight]; +_wf4cb2 ctrlCommit 0; +_wf4cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1383) ctrlSetText '''';[''wf4tTCT'',''''] call fnc_setPNS;true']; + +if(!isNil'wf4T')then{terminate wf4T;wf4T=nil;}; +wf4T = [0,_wfposY+0.045,1,_buttonheight] spawn { + disableSerialization; + _oldText = ['wf4tTCT',''] call fnc_getPNS; + + _display = findDisplay -1341; + _wf4 = _display displayCtrl 1383; + _wf4 ctrlSetText _oldText; + + _wf4t = [findDisplay 46,'RSCText',1062] call fnc_createctrl; + _wf4t ctrlSetPosition _this; + _wf4t ctrlCommit 0; + while {true} do + { + if((isNull _wf4) && !(['cbChecked__wf4',false] call fnc_getPNS))exitWith{_wf4t ctrlSetText '';}; + + _oldText = ['wf4tTCT',''] call fnc_getPNS; + if(!isNull _wf4)then + { + _ctrltext = ctrlText _wf4; + if(_ctrltext isEqualTo '')then + { + _wf4t ctrlSetText ''; + } + else + { + if!(_ctrltext isEqualTo _oldText)then + { + ['wf4tTCT',_ctrltext] call fnc_setPNS; + }; + }; + }; + if!(_oldText isEqualTo '')then + { + _wf4t ctrlSetText str(_oldText call fnc_admin_ccc); + }; + uiSleep 0.1; + }; +}; + +_ctrl = [_display,'RSCEdit',7564982345] call fnc_createctrl; +_ctrl ctrlSetPosition [0,_wfposY + 0.245,1,_buttonheight]; +_ctrl ctrlSetBackgroundColor [0,0,0,0.6]; +_ctrl ctrlCommit 0; + +_ctrl = _display displayCtrl 1339; +_startYpos = safeZoneY + 0.61; +_ctrl ctrlSetPosition [0,_startYpos,1,1]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetText (['workplacemainwindow',''] call fnc_getPNS); +if(!isNil'workplacemainwindowT')then{terminate workplacemainwindowT;workplacemainwindowT=nil;}; +workplacemainwindowT = [] spawn { + disableSerialization; + while{true}do + { + _ctrl = (findDisplay -1341) displayCtrl 1339; + if(isNull _ctrl)exitWith{workplacemainwindowT=nil;}; + + _ctext = ctrlText _ctrl; + _vtext = ['workplacemainwindow',''] call fnc_getPNS; + if!(_ctext isEqualTo _vtext)then + { + ['workplacemainwindow',_ctext] call fnc_setPNS; + }; + uiSleep 0.1; + }; +}; +_ctrlid = 7338; + +if(_admin)then{ +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'GLOBAL'; +_ctrl ctrlSetPosition [0,_startYpos + 1,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0;systemChat '' RAN CODE ON: GLOBAL (SERVER AND ALL CLIENTS)'';true']; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'ALL BUT SERVER'; +_ctrl ctrlSetPosition [0,_startYpos + 1 + _buttonheight,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','[''if(!isServer)then{''+(call fnc_getMainText)+''};''] call admin_d0;systemChat '' RAN CODE ON: ALL BUT SERVER'';true']; + + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'SERVER'; +_ctrl ctrlSetPosition [0.25,_startYpos + 1,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0_server;systemChat '' RAN CODE ON: SERVER'';true']; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'SELECTED (ORANGE) TARGET'; +_ctrl ctrlSetPosition [0.25,_startYpos + 1 + _buttonheight,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','if(isPlayer SELECTED_TARGET_PLAYER)then{[call fnc_getMainText,SELECTED_TARGET_PLAYER] call admin_d0_target;systemChat format['' RAN CODE ON: %1'',name SELECTED_TARGET_PLAYER];};true']; +}; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'LOCAL'; +_ctrl ctrlSetPosition [0.5,_startYpos + 1,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','(call fnc_getMainText) call fnc_admin_cc;systemChat '' RAN CODE ON: LOCAL'';true']; + +if(_admin)then{ +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'CAMERAON'; +_ctrl ctrlSetPosition [0.5,_startYpos + 1 + _buttonheight,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','if(!isNull cameraOn)then{[call fnc_getMainText,cameraOn] call admin_d0_target;systemChat format['' RAN CODE ON: %1'',name cameraOn];};true']; +}; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'NEXT'; +_ctrl ctrlSetPosition [0.75,_startYpos + 1,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + _max = ((count already_run_array)-1) max 0; + _new = last_selected_run_id + 1; + if(_new <= _max)then + { + last_selected_run_id = _new; + _txt = already_run_array select last_selected_run_id; + ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt; + }; + systemChat format['' %1 / %2'',last_selected_run_id,_max]; +true +']; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'LAST'; +_ctrl ctrlSetPosition [0.75,_startYpos + 1 + _buttonheight,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + _max = ((count already_run_array)-1) max 0; + _new = last_selected_run_id - 1; + if(_new >= 0)then + { + last_selected_run_id = _new; + _txt = already_run_array select last_selected_run_id; + ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt; + }; + systemChat format['' %1 / %2'',last_selected_run_id,_max]; +true +']; + + + + + + +_buttonYpos = _startYpos; +_ctrlid = _ctrlid + 1; +if(_admin)then{ +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'ALL ITEMS'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText str ALLC_ITEMS;true']; +}; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +if(_admin)then{ +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'ALL VEHICLES'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_txt = str ALL_VEHS_TO_SEARCH_C;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true']; +}; + +_buttonYpos = _buttonYpos + _buttonheight + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'CURSORTARGET'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf cursorTarget;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true']; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'VEHICLE PLAYER'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf vehicle player;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true']; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'GETPOS'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPos player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true']; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'GETPOSATL'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPosATL player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true']; + +_buttonYpos = _buttonYpos + _buttonheight + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl; +_oldTxt = ['infiSTAR_show_function_000',''] call fnc_getPNS; +if(_oldTxt isEqualTo '')then{_oldTxt = '{diag_activeSQFScripts}';}; +_ctrl ctrlSetText _oldTxt; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlSetBackgroundColor [0,0,0,0.6]; +_ctrl ctrlCommit 0; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'RETURN FUNCTION VALUE'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + disableSerialization; + _display = findDisplay -1341; + _ctrl = _display displayCtrl 1339; + + _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+'); + + [''infiSTAR_show_function_000'',_ctrltext] call fnc_setPNS; + + _var = missionNamespace getVariable [_ctrltext,'''']; + if(typeName _var isEqualTo ''CODE'')exitWith + { + _txt = str([] call _var); + if(_txt isEqualTo '''')then{_txt = ''nothing to return'';}; + _ctrl ctrlSetText _txt; + diag_log _txt; + true + }; + + _function = _ctrltext call fnc_admin_cc; + _txt = ''''; + if(typeName _function isEqualTo ''CODE'')then + { + _txt = str([] call _function); + if(_txt isEqualTo '''')then{_txt = ''nothing to return'';}; + } + else + { + _txt = ''not a function.. (a function is something within curly brackets)''; + }; + _ctrl ctrlSetText _txt; + diag_log _txt; + true +']; + +_buttonYpos = _buttonYpos + _buttonheight + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText (['infiSTAR_show_variable_000','READ FROM VARIABLE'] call fnc_getPNS); +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlSetBackgroundColor [0,0,0,0.6]; +_ctrl ctrlCommit 0; + +_buttonYpos = _buttonYpos + _buttonheight; +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'READ FROM VARIABLE'; +_ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + disableSerialization; + _display = findDisplay -1341; + _ctrl = _display displayCtrl 1339; + _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+'); + + [''infiSTAR_show_variable_000'',_ctrltext] call fnc_setPNS; + + _var = missionNamespace getVariable [_ctrltext,'''']; + _txt = str _var; + _ctrl ctrlSetText _txt; + diag_log _txt; + true +']; + +if(_admin)then{ +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'Debug Console'; +_ctrl ctrlSetPosition [1,_startYpos + 0.7,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','[] spawn fnc_RscDisplayDebugPublic;true']; +}; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'CLEAR'; +_ctrl ctrlSetPosition [1,_startYpos + 0.85,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText '''';[''workplacemainwindow'',''''] call fnc_setPNS;true']; + +_ctrlid = _ctrlid + 1; +_ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl; +_ctrl ctrlSetText 'CLOSE'; +_ctrl ctrlSetPosition [1,_startYpos + 0.95,0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true']; + + +_ctrl = [_display,'RSCEdit',1] call fnc_createctrl; +_ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*2),0.25,_buttonheight]; +_ctrl ctrlSetBackgroundColor [0,0,0,0.6]; +_ctrl ctrlCommit 0; + +_ctrl = [_display,'RSCButton',2] call fnc_createctrl; +_ctrl ctrlSetText 'Save'; +_ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*3),0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + _varname = ctrlText((findDisplay -1341) displayCtrl 1); + if(_varname isEqualTo '''')then + { + systemChat ''You need to write a name to save this function..!''; + } + else + { + _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS; + _index = _var pushBackUnique _varname; + + + [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS; + [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],call fnc_getMainText] call fnc_setPNS; + + systemChat format[''Saved: %1'',_varname]; + call fnc_fillDebugListBox; + }; +true +']; + +_ctrl = [_display,'RSCButton',3] call fnc_createctrl; +_ctrl ctrlSetText 'Load'; +_ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*4),0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick','_this call fnc_debug_loadbtn']; + +_ctrl = [_display,'RSCButton',4] call fnc_createctrl; +_ctrl ctrlSetText 'Delete'; +_ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*5),0.25,_buttonheight]; +_ctrl ctrlCommit 0; +_ctrl ctrlSetEventHandler['ButtonClick',' + _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS; + _varname = lbtext[1384,(lbCurSel 1384)]; + if(_varname isEqualTo '''')then + { + systemChat ''You need to select a function to delete..!''; + } + else + { + if(isNil''last_delete_call'')then + { + last_delete_call = _varname; + systemChat format[''Please click again to delete: %1'',_varname]; + } + else + { + if(last_delete_call isEqualTo _varname)then + { + _var deleteAt (_var find _varname); + [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS; + [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],nil] call fnc_setPNS; + + systemChat format[''Deleted: %1'',_varname]; + call fnc_fillDebugListBox; + last_delete_call = nil; + } + else + { + systemChat format[''Please click again to delete: %1'',_varname]; + }; + }; + }; +true +']; + +call fnc_fillDebugListBox; +}; \ No newline at end of file diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/fn_postInit.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/fn_postInit.sqf new file mode 100644 index 0000000..7d34039 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/fn_postInit.sqf @@ -0,0 +1,30 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + + Copyright infiSTAR - 2011 - 2018. All rights reserved. + Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR + + Description: + Arma AntiHack & AdminTools - infiSTAR.de + + NOTE: + THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING! +*/ +/****************************************************************************************************/ +if(!isNil"infiSTAR_SERVERSTART_PlayerConnected_id" && !isNil"FN_GET_SERVERPW")then { + infiSTAR_SERVERSTART_postInit_thread = [] spawn { + waitUntil {!isNil "PublicServerIsLoaded" && {PublicServerIsLoaded}}; + removeMissionEventHandler ["PlayerConnected",infiSTAR_SERVERSTART_PlayerConnected_id]; + (call FN_GET_SERVERPW) serverCommand "#unlock"; + }; +}; +/****************************************************************************************************/ +[ + "", + { + #include "infiSTAR_keyBinds_defaults.sqf" + } +] remoteExecCall ["spawn",-2,"infiSTAR_keyBinds_JIP"]; + + diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/fn_preInit.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/fn_preInit.sqf new file mode 100644 index 0000000..9ffd17d --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/fn_preInit.sqf @@ -0,0 +1,1614 @@ +/* + Author: Chris(tian) "infiSTAR" Lorenzen + Contact: infiSTAR23@gmail.com // www.infiSTAR.de + Copyright infiSTAR. All rights reserved. + + Description: + Arma AntiHack & AdminTools - infiSTAR.de + + UPDATEEMAIL for http://update.infiSTAR.de is: + 'zepheris.craty@gmail.com' + + Last download was on: + '10-02-2018 12-02-40'; + + NOTE: + THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING! +*/ +if(uiNamespace getVariable ["infistar_run",false])exitWith{ + diag_log format[" infiSTAR was already started! Make sure that your mission is not looping due to config errors.."]; + diag_log format[" You need to restart your server properly to start infiSTAR. Just restarting the mission does not work."]; +}; +uiNamespace setVariable ["infistar_run",true]; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/****************************************************************************************************/ +/****************************************************************************************************/ +/****************************************************************************************************/ +diag_log format[" updatearmalog callExtension: %1","updatearmalog" callExtension "update"]; +_response = "armalog" callExtension ("130ada24551aa&l=e5629ff826ff1365cd85514368faa2bd&sn="+str(toArray serverName)); +_isWindows = (productVersion param [6, "", [""]]) isEqualTo "Windows"; +if(_isWindows && _response isEqualTo "")exitWith{ + diag_log " Can not load infiSTAR"; + diag_log " DLLs not found!"; +}; +fnc_CompilableString = { + _input = _this select 0; + _output = call { + if(_input isEqualType {})exitWith{(str(_input)) select [1,((count(str(_input)))-2)]}; + if(_input isEqualType "")exitWith{_input}; + "" + }; + _output +}; +fnc_CompilableString = compileFinal ([fnc_CompilableString] call fnc_CompilableString); +publicVariable "fnc_CompilableString"; +IAH_fnc_getIntFromString = { + params [["_input", "", [""]], ["_pos", 0, [0]]]; + if (_input isEqualTo "") exitWith {-1}; + private _n = (toArray (_input select [_pos, 1])) select 0; + _n +}; +IAH_fnc_getIntFromString = compileFinal ([IAH_fnc_getIntFromString] call fnc_CompilableString); +_armalog = ([_response] call IAH_fnc_getIntFromString isEqualTo 0x01); +_response = _response select [1]; +_errorNote = { + [ + [_this], + { + _text = _this param [0,"",[""]]; + waitUntil{uiSleep 1;getClientStateNumber >= 10 && !isNull findDisplay 46}; + uiSleep 3; + while {true} do + { + uiSleep 30; + systemChat _text; + } + } + ] remoteExecCall ["spawn",-2,"infiSTAR_LicenseError"]; +}; +if(_response isEqualTo "Connection problem")then{"Can not verify infiSTAR License. Please report to admin@infiSTAR.de" call _errorNote;}; +if(_isWindows && !_armalog)exitWith{ + diag_log " Can not load infiSTAR"; + diag_log " 30ada24551aa"; + diag_log " e5629ff826ff1365cd85514368faa2bd"; + diag_log format[" %1",serverName]; + diag_log format[" %1",_response]; +}; +if(_isWindows && _armalog)then{ + diag_log " infiSTAR dll loaded successfully"; + diag_log format[" %1",serverName]; + diag_log format[" %1",_response]; + diag_log " Loading infiSTAR code.."; + + _path = getText(configfile >> "Cfg_infiSTAR_settings" >> "MY_LOG_FOLDER"); + if!(_path isEqualTo "")then{_path = "infiSTAR Logs";_path = _path + toString[92];}; + FN_CALL_LOG_DLL = ' + params [["_filename", "LOG", [""]], ["_logentry", "NO INPUT", [""]]]; + _filename = format["A3_%1_%2_%3", briefingName select [0,10], worldName select [0,10], _filename]; + "armalog" callExtension ("2"+"'+_path+'"+_filename+"|"+_logentry); + '; + FN_CALL_LOG_DLL = compileFinal FN_CALL_LOG_DLL; + + FN_ARMA_FETCHDATA = { + params [["_url", "", [""]]]; + if (_url isEqualTo "") exitWith {""}; + private _response = "armalog" callExtension format["6%1", _url]; + if !(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x01) exitWith {""}; + private _id = _response select [1]; + _timeOut = diag_tickTime + 80; + waitUntil { + uiSleep 0.2; + _response = "armalog" callExtension format["4%1", _id]; + !(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x02) || diag_tickTime > _timeOut + }; + if (!(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x01) || (diag_tickTime > _timeOut)) exitWith {""}; + private _parts = [_response, 1] call IAH_fnc_getIntFromString; + if (_parts == 1) exitWith {_response select [2]}; + private _output = _response select [2]; + for "_i" from 1 to _parts - 1 do { + _response = "armalog" callExtension format["4%1|%2", _id, _i]; + _output = _output + (_response select [2]); + }; + _output + }; + FN_ARMA_FETCHDATA = compileFinal ([FN_ARMA_FETCHDATA] call fnc_CompilableString); + + FN_ARMA_FIREANDFORGET = { + params [["_url", "", [""]]]; + if (_url isEqualTo "") exitWith {""}; + "armalog" callExtension format["3%1", _url] + }; + FN_ARMA_FIREANDFORGET = compileFinal ([FN_ARMA_FIREANDFORGET] call fnc_CompilableString); + + FN_ARMA_REMOTELOG = { + params[["_logname",""],["_logentry",""]]; + "armalog" callExtension ("9"+"exile"+"§§"+_logname+"§§"+_logentry+"§§"+servername+"§§10-02-2018 12-02-40 - v90§§zepheris.craty@gmail.com"); + }; + FN_ARMA_REMOTELOG = compileFinal ([FN_ARMA_REMOTELOG] call fnc_CompilableString); +} +else +{ + FN_CALL_LOG_DLL = { + params [["_filename", "LOG", [""]], ["_logentry", "NO INPUT", [""]]]; + diag_log format['%1| %2 [10-02-2018 12-02-40 - v90]',_filename,_logentry]; + }; + FN_ARMA_FETCHDATA = {}; + FN_ARMA_FIREANDFORGET = {}; + FN_ARMA_REMOTELOG = {}; +}; +FN_CALL_ExtDB = if (("extDB3" callExtension "9:VERSION") != "") then {{"extDB3" callExtension _this}} else {{"extDB2" callExtension _this}}; +/****************************************************************************************************/ +/****************************************************************************************************/ +/****************************************************************************************************/ +/* FIX PROBLEMS IN ARMA / OTHER ADDONS */ +cba_common_setVehVarName = compileFinal "diag_log 'blocked RE exploit';"; +/****************************************************************************************************/ +/****************************************************************************************************/ +/****************************************************************************************************/ +_found = false; +diag_log format[" %1 - checking for EXILE_SERVER..",time]; +_cfgPatches = configFile >> "CfgPatches"; +for "_i" from 0 to (count _cfgPatches - 1) do +{ + _patchClass = _cfgPatches select _i; + if(toLower(configName _patchClass) isEqualTo "exile_server")exitWith + { + _found = true; + }; +}; +if(!_found)exitWith +{ + for "_i" from 0 to 10 do + { + diag_log format[" %1 - Could not find EXILE_SERVER, infiSTAR will not start!",time]; + }; +}; +diag_log format[" %1 - EXILE_SERVER has been found.",time]; +_found = false; +diag_log format[" %1 - checking for Cfg_infiSTAR_settings..",time]; +_configFile = configFile; +for "_i" from 0 to (count _configFile - 1) do +{ + _patchClass = _configFile select _i; + if(configName _patchClass == "Cfg_infiSTAR_settings")exitWith + { + _found = true; + }; +}; +if(!_found)exitWith +{ + for "_i" from 0 to 10 do + { + diag_log format[" %1 - Could not find Cfg_infiSTAR_settings, infiSTAR will not start!",time]; + }; +}; +diag_log format[" %1 - Cfg_infiSTAR_settings has been found.",time]; +fnc_infiSTAR_cfg = compileFinal " +params['_inputclassname','_default']; +if(isNil'_inputclassname')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 1: %1',_this];}; +if(isNil'_default')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 2: %1',_this];}; + +private '_path'; +if(_inputclassname isEqualType '')then +{ + _path = configfile >> 'Cfg_infiSTAR_settings' >> _inputclassname; +} +else +{ + _path = configfile >> 'Cfg_infiSTAR_settings' >> _inputclassname select 0 >> _inputclassname select 1; +}; +if(isNil'_path')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 3: %1',_this];}; + +call { + if(_default isEqualType 0)exitWith{getNumber _path}; + if(_default isEqualType [])exitWith{getArray _path}; + + _txt = getText _path; + _default = _txt; + + if((toLower _txt) isEqualTo 'true')then{_default = true}; + if((toLower _txt) isEqualTo 'false')then{_default = false}; + _default +} +"; +_devs = ['76561198152111329','76561198155552440']; /* infiSTAR UID */ +_admins = []; +_serverCommandPassword = ["serverCommandPassword","changeme"] call fnc_infiSTAR_cfg; +_passwordAdmin = ["passwordAdmin","changeme"] call fnc_infiSTAR_cfg; +_HIDE_FROM_PLAYERS = ["HIDE_FROM_PLAYERS",false] call fnc_infiSTAR_cfg; +_announce_adminstate_changed = ["announce_adminstate_changed",false] call fnc_infiSTAR_cfg; +_use_html_load_on_adminmenu = ["use_html_load_on_adminmenu",true] call fnc_infiSTAR_cfg; +_LogAdminActions = ["LogAdminActions",true] call fnc_infiSTAR_cfg; +_enableIngameLogs = ["enableIngameLogs",true] call fnc_infiSTAR_cfg; + +_ENABLE_NOTIFICATION_MESSAGES = ["ENABLE_NOTIFICATION_MESSAGES",true] call fnc_infiSTAR_cfg; +if(_ENABLE_NOTIFICATION_MESSAGES)then{ + NOTIFY_MSG_ARRAY = ["NOTIFY_MSG_ARRAY",[]] call fnc_infiSTAR_cfg; + { + _x set [0,(_x select 0)*60]; + _x set [1,(_x select 1)*60]; + NOTIFY_MSG_ARRAY set [_forEachIndex,_x]; + } forEach NOTIFY_MSG_ARRAY; + publicVariable "NOTIFY_MSG_ARRAY"; +}; + +_fn_backslash = { + _txta = toArray _this; + _ntxta = []; + { + if(_x isEqualTo 39)then{ _ntxta pushBack _x; }; + _ntxta pushBack _x; + } forEach _txta; + toString _ntxta +}; + +_chatCommands = ["chatCommands",[]] call fnc_infiSTAR_cfg; +_chatCommandsL = []; +{ + _x params ['_cmd','_color','_size','_font','_txt']; + _cmd = toLower _cmd; + _txt = _txt call _fn_backslash; + _chatCommandsL pushBackUnique [_cmd,_color,_size,_font,_txt]; +} forEach _chatCommands; + +_chatCommandsP = ["chatCommandsP",[]] call fnc_infiSTAR_cfg; +_chatCommandsPL = []; +{ + _x params ['_cmd','_color','_size','_font','_txt']; + _cmd = toLower _cmd; + _txt = _txt call _fn_backslash; + _chatCommandsPL pushBackUnique [_cmd,_color,_size,_font,_txt]; +} forEach _chatCommandsP; + +_pathToCustomBillBoardTextures = ["pathToCustomBillBoardTextures",[]] call fnc_infiSTAR_cfg; + + + +_useAdminNameTag = [["adminNameTags","useAdminNameTag"],false] call fnc_infiSTAR_cfg; +_adminNameTags = [["adminNameTags","tags"],[]] call fnc_infiSTAR_cfg; +if(_useAdminNameTag)then +{ + { + _x params [ + ['_tag','',['']], + ['_uid','',['']] + ]; + missionNamespace setVariable ['admintag_'+_uid,_tag]; + } forEach _adminNameTags; +}; + + +_startAsNormal = ["startAsNormal",[]] call fnc_infiSTAR_cfg; +_hiddenSuperAdmin = ["hiddenSuperAdmin",[]] call fnc_infiSTAR_cfg; +_adminUIDandAccess = ["adminUIDandAccess",[]] call fnc_infiSTAR_cfg; + +_infiSTAR_RE_LIST = ["infiSTAR_RE_LIST",[]] call fnc_infiSTAR_cfg; +_infiSTAR_RE_LIST append ["fn_infiSTAR_antiDupeServer","fn_infiSTAR_TM__SERVERHANDLE","fn_infiSTAR_privChatServer","fn_infiSTAR_antiVehicleTheft","fn_infiSTAR_serverOwner","fn_infiSTAR_lagSwitchServer","fn_friendList_HandleServer","fn_infiSTAR_HandleChatServer"]; +fn_infiSTAR_RE_LIST = compileFinal ("_this in "+(str _infiSTAR_RE_LIST)); +/****************************************************************************************************/ +_USE_DATABASE_WHITELIST = [["customDatabaseQueries","USE_DATABASE_WHITELIST"],false] call fnc_infiSTAR_cfg; +_USE_LOG_TO_DATABASE = [["customDatabaseQueries","USE_LOG_TO_DATABASE"],false] call fnc_infiSTAR_cfg; +_USE_GET_TOTAL_CONNECTIONS = [["customDatabaseQueries","USE_GET_TOTAL_CONNECTIONS"],false] call fnc_infiSTAR_cfg; +_USE_ANNOUNCE_NEW_PLAYER = ["USE_ANNOUNCE_NEW_PLAYER",false] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_USE_GLOBAL_BAN_CHECK = ["USE_GLOBAL_BAN_CHECK",false] call fnc_infiSTAR_cfg; +_BAN_GLOBAL_BANNED_LOCALLY = ["BAN_GLOBAL_BANNED_LOCALLY",false] call fnc_infiSTAR_cfg; +_UID_SKIP_GLOBAL_BAN_CHECK = ["UID_SKIP_GLOBAL_BAN_CHECK",[]] call fnc_infiSTAR_cfg; +if(isNil '_UID_SKIP_GLOBAL_BAN_CHECK')exitWith{ diag_log ' ERROR: UID_SKIP_GLOBAL_BAN_CHECK broken'; }; +if!(_UID_SKIP_GLOBAL_BAN_CHECK isEqualType [])exitWith{ diag_log ' ERROR: UID_SKIP_GLOBAL_BAN_CHECK not an array'; }; +_CHECK_BattlEye_GLOBALBANS = ["CHECK_BattlEye_GLOBALBANS",false] call fnc_infiSTAR_cfg; + +_USE_UID_WHITELIST = ["USE_UID_WHITELIST",false] call fnc_infiSTAR_cfg; +_UID_WHITELIST = ["UID_WHITELIST",[]] call fnc_infiSTAR_cfg; + + +_ExileDevFriendlyMode = ["ExileDevFriendlyMode",false] call fnc_infiSTAR_cfg; +_ESCMNUTOP = ["ESCMNUTOP","AntiHack & AdminTools"] call fnc_infiSTAR_cfg; +_ESCMNUBOT = ["ESCMNUBOT","by infiSTAR.de"] call fnc_infiSTAR_cfg; +_BRIEFING_MSG = ["BRIEFING_MSG",false] call fnc_infiSTAR_cfg; +_HTML_LOAD_URL = ["HTML_LOAD_URL",""] call fnc_infiSTAR_cfg; +_ENABLE_PRIVATE_CHAT_MENU = ["ENABLE_PRIVATE_CHAT_MENU",false] call fnc_infiSTAR_cfg; +_PRIVATE_CHAT_MENU_8GNETWORK = ["PRIVATE_CHAT_MENU_8GNETWORK",false] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_USE_RESTART_TIMER = [["infiSTAR_RESTART_SYSTEM","enableSystem"],true] call fnc_infiSTAR_cfg; +_LOCK_ON_RESTART = [["infiSTAR_RESTART_SYSTEM","LOCK_ON_RESTART"],true] call fnc_infiSTAR_cfg; +_USE_RESTART_TIME_IN_M = [["infiSTAR_RESTART_SYSTEM","USE_RESTART_TIME_IN_M"],true] call fnc_infiSTAR_cfg; +_RESTART_TIME_IN_M = [["infiSTAR_RESTART_SYSTEM","RESTART_TIME_IN_M"],180] call fnc_infiSTAR_cfg; +_TIME_FUNCTION_USED = [["infiSTAR_RESTART_SYSTEM","TIME_FUNCTION_USED"],"diag_tickTime"] call fnc_infiSTAR_cfg; + +_USE_RESTART_TIMES = [["infiSTAR_RESTART_SYSTEM","USE_RESTART_FIXED_TIME_ARRAY"],true] call fnc_infiSTAR_cfg; +_RESTART_TIMES_tmp = [["infiSTAR_RESTART_SYSTEM","RESTART_TIMES"],[[00,00],[06,00],[12,00],[18,00]]] call fnc_infiSTAR_cfg; +_RESTART_TIMES = [];{_x params ["_sHour","_sMin"];_sHour = if(_sHour > 0)then{_sHour * 60}else{24 * 60};_RESTART_TIMES pushBackUnique (_sHour + _sMin);} forEach _RESTART_TIMES_tmp; + +_USE_SHUTDOWN = [["infiSTAR_RESTART_SYSTEM","USE_SHUTDOWN"],true] call fnc_infiSTAR_cfg; +_SERVER_END_FUNCTION = [["infiSTAR_RESTART_SYSTEM","SERVER_END_FUNCTION"],"#shutdown"] call fnc_infiSTAR_cfg; +_RESTART_WARNING_SOUND = [["infiSTAR_RESTART_SYSTEM","RESTART_WARNING_SOUND"],"Alarm"] call fnc_infiSTAR_cfg; +_LOCK_MIN_BEFORE_SHUTDOWN = [["infiSTAR_RESTART_SYSTEM","LOCK_MIN_BEFORE_SHUTDOWN"],5] call fnc_infiSTAR_cfg; +_LOCK_SECONDS_BEFORE_SHUTDOWN = _LOCK_MIN_BEFORE_SHUTDOWN * 60; +_RESTART_IN_X_ARRAY = [["infiSTAR_RESTART_SYSTEM","RESTART_IN_X_ARRAY"],[]] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_DayNightVote = ["DayNightVote",true] call fnc_infiSTAR_cfg; +_MRV = ["MRV",0.3] call fnc_infiSTAR_cfg; +_MVP = ["MVP",0.51] call fnc_infiSTAR_cfg; +_VCT = ["VCT",900] call fnc_infiSTAR_cfg; + +_enableJump = ["enableJump",true] call fnc_infiSTAR_cfg; + +_allowPee = ["allowPee",true] call fnc_infiSTAR_cfg; +_PlayerScoreList = ["PlayerScoreList",false] call fnc_infiSTAR_cfg; +_chatAnimationCommands = ["chatAnimationCommands",[]] call fnc_infiSTAR_cfg; + +_TGV = ["TGV",40] call fnc_infiSTAR_cfg; +_VDV = ["VDV",750] call fnc_infiSTAR_cfg; +_VOV = ["VOV",750] call fnc_infiSTAR_cfg; +_SVD = ["SVD",50] call fnc_infiSTAR_cfg; +_CHECK_TERRAIN_GRID = ["CHECK_TERRAIN_GRID",true] call fnc_infiSTAR_cfg; + +_fix_uniform_and_vest = ["fix_uniform_and_vest",true] call fnc_infiSTAR_cfg; +_experimental_dupe_check = ["experimental_dupe_check",true] call fnc_infiSTAR_cfg; +_disconnect_dupe_check = ["disconnect_dupe_check",true] call fnc_infiSTAR_cfg; +_fix_trader_dupe = ["fix_trader_dupe",true] call fnc_infiSTAR_cfg; +_fix_wastedump_dupe = ["fix_wastedump_dupe",true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_lagSwitchCheck = [["lagSwitchCheck","enabled"],false] call fnc_infiSTAR_cfg; +_lS_warn_delay = [["lagSwitchCheck","warn_delay"],2.5] call fnc_infiSTAR_cfg; +_lS_log_delay = [["lagSwitchCheck","log_delay"],10] call fnc_infiSTAR_cfg; +_lS_kick_and_log_delay = [["lagSwitchCheck","kick_and_log_delay"],15] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_block_glitch_actions = [["infiSTAR_blocked_glitch_actions","block_glitch_actions_enabled"],true] call fnc_infiSTAR_cfg; +_block_glitch_actions_inputs = [["infiSTAR_blocked_glitch_actions","inputs"],[]] call fnc_infiSTAR_cfg; +_block_glitch_actions_block_ALT_key = [["infiSTAR_blocked_glitch_actions","block_ALT_key"],true] call fnc_infiSTAR_cfg; +_block_glitch_actions_block_ALT_key_all = [["infiSTAR_blocked_glitch_actions","block_ALT_key_all"],true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_wall_glitch_object = ["wall_glitch_object",true] call fnc_infiSTAR_cfg; +_wall_glitch_revert = ["wall_glitch_revert",true] call fnc_infiSTAR_cfg; +_wall_glitch_punish = ["wall_glitch_punish",1] call fnc_infiSTAR_cfg; +_wall_glitch_vehicle = ["wall_glitch_vehicle",true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_safeZone_antiVehicleTheft = [["infiSTAR_safeZoneOptions","antiVehicleTheft"],true] call fnc_infiSTAR_cfg; +_safeZone_kick_from_driver_only = [["infiSTAR_safeZoneOptions","kick_from_driver_only"],true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_infiSTAR_handleDamage = [["infiSTAR_handleDamage","enable"],true] call fnc_infiSTAR_cfg; +_PvP_ReflectDamage = [["infiSTAR_handleDamage","PvP_ReflectDamage"],true] call fnc_infiSTAR_cfg; +_PvP_BlockDamage = [["infiSTAR_handleDamage","PvP_BlockDamage"],true] call fnc_infiSTAR_cfg; +_PvP_useZones = [["infiSTAR_handleDamage","PvP_useZones"],true] call fnc_infiSTAR_cfg; +if(!_PvP_ReflectDamage && !_PvP_BlockDamage)then{_PvP_useZones = false;}; +_PvP_zones = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "infiSTAR_handleDamage" >> "zones")); +_BlockNullSource = [["infiSTAR_handleDamage","BlockNullSource"],true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_BlockHoldActions = ["BlockHoldActions",false] call fnc_infiSTAR_cfg; +_BadActionCheck = ["BadActionCheck",true] call fnc_infiSTAR_cfg; +_allowedActionsTMP = ["allowedActions",[]] call fnc_infiSTAR_cfg; +_allowedActions = []; +{ + _action = toLower _x; + _allowedActions pushBackUnique _action; + _allowedActions pushBackUnique (''+_action); + _allowedActions pushBackUnique (''+_action+''); +} forEach _allowedActionsTMP; +_cfgInteractionMenus = 'true' configClasses (missionConfigfile >> 'CfgInteractionMenus'); +{ + _cfgName = configName _x; + _subclassActions = 'true' configClasses (missionConfigfile >> 'CfgInteractionMenus' >> _cfgName >> 'Actions'); + { + _cfgNameSub = configName _x; + _title = getText(missionConfigfile >> 'CfgInteractionMenus' >> _cfgName >> 'Actions' >> _cfgNameSub >> 'title'); + if(_cfgName isEqualTo 'Player')then{ _allowedActions pushBackUnique _title; }; + } forEach _subclassActions; +} forEach _cfgInteractionMenus; +_allowedActionsPartialTMP = ["allowedActionsPartial",[]] call fnc_infiSTAR_cfg; +_allowedActionsPartial = []; +{ + _allowedActionsPartial pushBackUnique (toLower _x); +} forEach _allowedActionsPartialTMP; +_BadActionContentCheck = ["BadActionContentCheck",true] call fnc_infiSTAR_cfg; +/****************************************************************************************************/ +_KCM = ["KCM",true] call fnc_infiSTAR_cfg; +_CMC = ["CMC",true] call fnc_infiSTAR_cfg; +_allowedCommandingMenus = ["allowedCommandingMenus",[]] call fnc_infiSTAR_cfg; +_allowedCommandingMenus = _allowedCommandingMenus - ["#user:example"]; +_allowedCommandingMenus = _allowedCommandingMenus - ["#user:example2"]; + +_task_force_radio = ["task_force_radio",true] call fnc_infiSTAR_cfg; +_reset_inGameUIEventHandler = ["reset_inGameUIEventHandler",true] call fnc_infiSTAR_cfg; +_checkFilePatchingEnabled = ["checkFilePatchingEnabled",true] call fnc_infiSTAR_cfg; +_onEventsCheck = ["onEventsCheck",true] call fnc_infiSTAR_cfg; +_checkCfgPatches = ["checkCfgPatches",true] call fnc_infiSTAR_cfg; +_check_Notifications = ["check_Notifications",false] call fnc_infiSTAR_cfg; +_check_doors_n_gates = ["check_doors_n_gates",false] call fnc_infiSTAR_cfg; + +_attach_to_check = ["attach_to_check",false] call fnc_infiSTAR_cfg; +_slingload_check = ["slingload_check",false] call fnc_infiSTAR_cfg; +_INVISIBLE_PLAYER_check = ["INVISIBLE_PLAYER_check",false] call fnc_infiSTAR_cfg; +_checkPopTabIncrease = ["checkPopTabIncrease",false] call fnc_infiSTAR_cfg; +_LogPopTabIncrease = ["LogPopTabIncrease",15000] call fnc_infiSTAR_cfg; +_BanPopTabIncrease = ["BanPopTabIncrease",250000] call fnc_infiSTAR_cfg; +_checkRespectIncrease = ["checkRespectIncrease",false] call fnc_infiSTAR_cfg; +_LogRespectIncrease = ["LogRespectIncrease",5000] call fnc_infiSTAR_cfg; +_BanRespectIncrease = ["BanRespectIncrease",25000] call fnc_infiSTAR_cfg; +_CMM = ["CMM",true] call fnc_infiSTAR_cfg; +_maxMapMenuEntries = ["maxMapMenuEntries",6] call fnc_infiSTAR_cfg; +_check_steam_ban = ["check_steam_ban",false] call fnc_infiSTAR_cfg; +_ban_for_steam_ban = ["ban_for_steam_ban",false] call fnc_infiSTAR_cfg; + +_MPH = ["MPH",false] call fnc_infiSTAR_cfg; +_GodModeCheck = ["GodModeCheck",false] call fnc_infiSTAR_cfg; + +_UAT = ["UAT",true] call fnc_infiSTAR_cfg; +_allowTPcfg = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "allowTP" >> "custom")); + + +_CHECK_RECOIL = ["CHECK_RECOIL",false] call fnc_infiSTAR_cfg; +_CLM = ["CLM",false] call fnc_infiSTAR_cfg; +_UMW = ["UMW",false] call fnc_infiSTAR_cfg; +_aLocalM = ["aLocalM",[]] call fnc_infiSTAR_cfg; +_badkickChat = ["badkickChat",[]] call fnc_infiSTAR_cfg; +_badbanChat = ["badbanChat",[]] call fnc_infiSTAR_cfg; +_badNamesFull = ["badNamesFull",[]] call fnc_infiSTAR_cfg; +_badNamesPartial = ["badNamesPartial",[]] call fnc_infiSTAR_cfg; +_badGroupNames = ["badGroupNames",[]] call fnc_infiSTAR_cfg; + +_disAllowVon = ["disAllowVon",[]] call fnc_infiSTAR_cfg; +_disAllowVon = _disAllowVon - [5]; + +_badIDDsToKick = ["badIDDsToKick",[]] call fnc_infiSTAR_cfg; +_badIDDsToClose = ["badIDDsToClose",[]] call fnc_infiSTAR_cfg; +_UDW = ["UDW",true] call fnc_infiSTAR_cfg; +_allowedIDDs = ["allowedIDDs",[]] call fnc_infiSTAR_cfg; + +_variableTypeChecks = ["variableTypeChecks",[]] call fnc_infiSTAR_cfg; + +_useBlacklistedVariableCheck = ["useBlacklistedVariableCheck",false] call fnc_infiSTAR_cfg; +_blacklistedVariables = []; +if(_useBlacklistedVariableCheck)then{_blacklistedVariables = ["blacklistedVariables",[]] call fnc_infiSTAR_cfg;}; +_useObjectVariableCheck = ["useObjectVariableCheck",false] call fnc_infiSTAR_cfg; + + +_UVC = ["UVC",true] call fnc_infiSTAR_cfg; +_UVC_adminspawn = ["UVC_adminspawn",true] call fnc_infiSTAR_cfg; +_VehicleWhiteList_check = ["VehicleWhiteList_check",true] call fnc_infiSTAR_cfg; +_VehicleWhiteList = ["VehicleWhiteList",[]] call fnc_infiSTAR_cfg; +_ForbiddenVehicles_check = ["ForbiddenVehicles_check",true] call fnc_infiSTAR_cfg; +_ForbiddenVehicles = ["ForbiddenVehicles",[]] call fnc_infiSTAR_cfg; +_LocalWhitelist = ["LocalWhitelist",[]] call fnc_infiSTAR_cfg; + + +_UFI = ["UFI",false] call fnc_infiSTAR_cfg; +_UIW = ["UIW",false] call fnc_infiSTAR_cfg; +_KICK_ON_DETECTION = ["KICK_ON_DETECTION",false] call fnc_infiSTAR_cfg; +_ItemWhiteList = ["ItemWhiteList",[]] call fnc_infiSTAR_cfg; +_ForbiddenItems = ["ForbiddenItems",[]] call fnc_infiSTAR_cfg; +_allSupportBoxes = ["allSupportBoxes",[]] call fnc_infiSTAR_cfg; +_allSupportBoxesNames = []; +{ + if!(_x isEqualTo [])then + { + _allSupportBoxesNames pushBack (_x select 0); + }; +} forEach _allSupportBoxes; +if(!_ExileDevFriendlyMode)then{_ExileDevFriendlyMode = getNumber(configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode") isEqualTo 1;}; +if(_ExileDevFriendlyMode)then +{ + _devs pushBackUnique "76561198022879703"; /* Grim */ +}; +{if(count _x > 5)then{_devs pushBackUnique _x;};} forEach _hiddenSuperAdmin; +{if(count _x > 5)then{_admins pushBackUnique _x;};} forEach _devs; +/****************************************************************************************************/ +/****************************************************************************************************/ +/****************************************************************************************************/ +/****************************************************************************************************/ +FN_GET_TIME_TIME = compileFinal " + _hours = floor(_this / 60 / 60); + _minutes = floor((((_this / 60 / 60) - _hours) max 0.0001)*60); + _seconds = _this - (_hours*60*60) - (_minutes * 60); + format['%1h %2min %3s',_hours,_minutes,round _seconds] +"; +publicVariable "FN_GET_TIME_TIME"; +/****************************************************************************************************/ +fnc_get_local_servertime = compileFinal " + (call compile ('9:LOCAL_TIME' call FN_CALL_ExtDB)) params [['_something',''],['_serverStartTime','']]; + if(isNil'_serverStartTime')then{[]}else{_serverStartTime} +"; +serverStartTime = call fnc_get_local_servertime; +/****************************************************************************************************/ +fnc_get_exileObjName = compileFinal "if(alive _this)then{_n = name _this;_this setVariable['ExileName',_n];_n}else{_n = _this getVariable['ExileName',''];if(_n isEqualTo '')then{if!(getPlayerUID _this isEqualTo '')then{_n = name _this;_this setVariable['ExileName',_n];};};_n}"; +publicVariable "fnc_get_exileObjName"; +/****************************************************************************************************/ +if(_fix_uniform_and_vest)then{ + fnc_check_uniform_n_vest = { + if(isNil'cunvthread')then + { + cunvthread = _this spawn { + if(!isNil 'ExileClientLoadedIn' && alive player)then + { + params [ + ['_uniformServer','',['']], + ['_vestServer','',['']] + ]; + + _uniform = uniform player; + _vest = vest player; + if (!(_uniformServer isEqualTo _uniform) || !(_vestServer isEqualTo _vest)) then + { + _loadout = getUnitLoadout player; + + waitUntil { + player setUnitLoadout _loadout; + (_uniform isEqualTo (uniform player)) && (_vest isEqualTo (vest player)) + }; + }; + }; + cunvthread = nil; + }; + }; + }; + publicVariable "fnc_check_uniform_n_vest"; +}; +/****************************************************************************************************/ +fn_onPlayerTake = compileFinal " + if(!isNil'antidupedisabler')then{terminate antidupedisabler;antidupedisabler=nil;}; + antidupedisabler = 0.1 spawn { + disableSerialization; + _timer = diag_tickTime + _this; + while{(!isNull (findDisplay 602))}do + { + _ctrl = ((findDisplay 602) displayCtrl 632); + _ctrl ctrlEnable false; + + _size = lbSize _ctrl; + if(_size > 0)then + { + for '_i' from 0 to _size do + { + _ctrl lbSetColor [_i, [1,0,0,1]]; + }; + }; + if(diag_tickTime > _timer)exitWith + { + ((findDisplay 602) displayCtrl 632) ctrlEnable true; + + if(_size > 0)then + { + for '_i' from 0 to _size do + { + _ctrl lbSetColor [_i, [1,1,1,1]]; + }; + }; + }; + }; + }; + _this call ExileClient_object_player_event_onTake +"; +publicVariable "fn_onPlayerTake"; +/****************************************************************************************************/ +fn_onInventoryOpened = " + _container = _this param [1, objNull, [objNull]]; + _secondaryContainer = _this param [2, objNull, [objNull]]; + if((locked _container isEqualTo 2)||(_container getVariable ['ExileIsLocked', 1] isEqualTo -1)||(locked _secondaryContainer isEqualTo 2)||(_secondaryContainer getVariable ['ExileIsLocked', 1] isEqualTo -1))then + { + if(!isNil'checkGearDisplayThread')then{terminate checkGearDisplayThread;}; + checkGearDisplayThread = [] spawn { + disableSerialization; + _fn_hide_cargo = { + ((findDisplay 602) displayCtrl 6401) ctrlEnable false; + ctrlSetFocus ((findDisplay 602) displayCtrl 6321); + ctrlActivate ((findDisplay 602) displayCtrl 6321); + }; + waitUntil {call _fn_hide_cargo;!isNull findDisplay 602}; + waitUntil {call _fn_hide_cargo;isNull findDisplay 602}; + }; + }; + _this call ExileClient_object_player_event_onInventoryOpened +"; +fn_onInventoryOpened = compile fn_onInventoryOpened; +publicVariable "fn_onInventoryOpened"; +/****************************************************************************************************/ +fn_infiSTAR_CustomHint = compileFinal " + ctrlDelete ((findDisplay 46) displayCtrl 3307222); + (findDisplay 46) ctrlCreate ['RscStructuredText', 3307222]; + ((findDisplay 46) displayCtrl 3307222) ctrlSetPosition [safezoneX + (safeZoneW / 2) - ((safeZoneW / 3.7)/2),safeZoneY + 0.075,(safeZoneW / 3.7),1]; + ((findDisplay 46) displayCtrl 3307222) ctrlCommit 0; + ((findDisplay 46) displayCtrl 3307222) ctrlSetStructuredText parseText _this; +"; +publicVariable "fn_infiSTAR_CustomHint"; +fn_infiSTAR_EndCustomHint = compileFinal " + ctrlDelete ((findDisplay 46) displayCtrl 3307222); +"; +publicVariable "fn_infiSTAR_EndCustomHint"; +fnc_infiSTAR_setUncon = compileFinal " + params[['_obj',objNull,[objNull]],['_time',0,[0]]]; + _uncon_thread = _obj getVariable 'uncon_thread'; + if(!isNil'_uncon_thread')then{terminate _uncon_thread;call fn_infiSTAR_EndCustomHint;}; + _uncon_thread = _this spawn { + params[['_obj',objNull,[objNull]],['_time',0,[0]]]; + _timer = diag_tickTime + _time; + waitUntil { + if(!isNull objectParent _obj)then{_obj action ['eject', (vehicle _obj)];}; + _obj setUnconscious true; + format['Knocked out for %1 more seconds..',round(_timer - diag_tickTime)] call fn_infiSTAR_CustomHint; + diag_tickTime > _timer || !alive _obj + }; + call fn_infiSTAR_EndCustomHint; + if(!isNull _obj)then + { + _obj setUnconscious false; + _obj switchMove ''; + _obj setVariable ['uncon_thread',nil]; + }; + }; + _obj setVariable ['uncon_thread',_uncon_thread]; +"; +publicVariable "fnc_infiSTAR_setUncon"; +/****************************************************************************************************/ +fnc_infiSTAR_fired = { + params[['_unit',objNull],['_weapon',''],['_muzzle',''],['_mode',''],['_ammo',''],['_magazine',''],['_projectile',objNull]]; + if(local _projectile)then + { + _speed = speed _projectile; + if(_speed > 425)then + { + if(_unit isEqualTo (vehicle _unit))then + { + _maxAmmo = getNumber (configfile >> 'CfgMagazines' >> _magazine >> 'count'); + if(_maxAmmo > 1)then + { + _this spawn { + params[['_unit',objNull],['_weapon',''],['_muzzle',''],['_mode',''],['_ammo',''],['_magazine',''],['_projectile',objNull]]; + uiSleep 0.4; + if(currentMuzzle _unit isEqualTo _weapon)then + { + _maxAmmo = getNumber (configfile >> 'CfgMagazines' >> _magazine >> 'count'); + _camm = _unit ammo _muzzle; + if(_camm >= _maxAmmo)then + { + _unit removeMagazines _magazine; + _unit removeItem _muzzle; + _unit removeWeapon _muzzle; + }; + }; + }; + }; + }; + }; + }else{ + deleteVehicle _projectile; + }; + _this call ExileClient_object_player_event_onFired +}; +fnc_infiSTAR_fired = compileFinal ([fnc_infiSTAR_fired] call fnc_CompilableString); +publicVariable "fnc_infiSTAR_fired"; +/****************************************************************************************************/ +if(_infiSTAR_handleDamage)then{ +fnc_infiSTAR_handleDamage = " + params[['_unit',objNull],['_selectionName',''],['_damage',0],['_source',objNull],['_projectile',''],['_hitPartIndex',-1],['_instigator',objNull]]; + _curDmgPlayer = damage player; + if(ExilePlayerInSafezone)then{ + _damage = _curDmgPlayer; + }else{ + "; if(_PvP_useZones)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + _noPvP = true; + { + _x params[['_pos',[0,0,0]],['_radius',250]]; + if(player distance2D _pos < _radius)exitWith{_noPvP = false;}; + } forEach "+str _PvP_zones+"; + if(_noPvP)then + { + "; if(_PvP_ReflectDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + if(isPlayer _instigator && !(_instigator isEqualTo _unit))then + { + _instigator setDamage ((damage _instigator) + _damage); + } + else + { + if(isPlayer _source && !(_source isEqualTo _unit))then{ _source setDamage ((damage _source) + _damage); }; + }; + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + + "; if(_PvP_BlockDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + if((isPlayer _instigator || isPlayer _source) && !(_source isEqualTo _unit))then{_damage = _curDmgPlayer;}; + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + }; + "; }else{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + "; if(_PvP_ReflectDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + if(isPlayer _instigator && !(_instigator isEqualTo _unit))then + { + _instigator setDamage ((damage _instigator) + _damage); + } + else + { + if(isPlayer _source && !(_source isEqualTo _unit))then{ _source setDamage ((damage _source) + _damage); }; + }; + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + + "; if(_PvP_BlockDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + if((isPlayer _instigator || isPlayer _source) && !(_source isEqualTo _unit))then{_damage = _curDmgPlayer;}; + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + + "; if(_BlockNullSource)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + _damage = if(isNull _source)then{_curDmgPlayer}else{_damage}; + "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + " + if(isNull _instigator)then{_instigator = _source;}; + if(!isNull _instigator)then + { + _dist = _unit distance _instigator; + if(_dist > 3000)then + { + if(_dist > 4500)then + { + _damage = _curDmgPlayer; + } + else + { + _intersects1 = count lineIntersectsWith [eyePos _unit, eyePos _instigator, _unit, _instigator]; + _intersects2 = terrainIntersect [eyePos _unit, getPos _instigator]; + if(_intersects1 > 4 && _intersects2)then + { + _damage = _curDmgPlayer; + }; + }; + }; + }; + }; + _damage +"; +fnc_infiSTAR_handleDamage = compileFinal fnc_infiSTAR_handleDamage; +publicVariable "fnc_infiSTAR_handleDamage"; +}; +/****************************************************************************************************/ +fn_infiSTAR_revive = compileFinal " +_target = objectFromnetId _this; +if(isNull _target)exitWith{}; + +_targetID = owner _target; +if(_targetID < 3)exitWith{}; + +_playerUID = getPlayerUID _target; +if(_playerUID isEqualTo '')exitWith{ + [ + ' REVIVE ERROR: Target already respawned..!', + {systemChat _this}, + _clientID, + false + ] call FN_infiSTAR_S; +}; + +_revive = _target getVariable ['revive',-1]; +if!(_revive isEqualTo -1)exitWith{ + [ + format[' REVIVE ERROR: Target %1 already getting revived %2 seconds ago..!',_target,time - _revive], + {systemChat _this}, + _clientID, + false + ] call FN_infiSTAR_S; +}; +_target setVariable ['revive','1']; + +_pos = _target modelToWorld [0,0,0]; +_direction = getDir _target; +_name = _target call fnc_get_exileObjName; + +_newUnit = (createGroup independent) createUnit ['Exile_Unit_Player', [0,0,0], [], 0, 'CAN_COLLIDE']; +removeHeadgear _newUnit; + +_ExileScore = _target getVariable ['ExileScore',0]; +_ExileKills = _target getVariable ['ExileKills',0]; +_ExileDeaths = _target getVariable ['ExileDeaths',0]; +_clanID = _target getVariable ['ExileClanID',-1]; +_ExileLocker = _target getVariable ['ExileLocker',0]; +_clanData = _target getVariable ['ExileClanData',[]]; +_ExileIsBambi = _target getVariable ['ExileIsBambi',false]; +_ExileSessionID = _target getVariable ['ExileSessionID', -1]; + +_newUnit disableAI 'FSM'; +_newUnit disableAI 'MOVE'; +_newUnit disableAI 'AUTOTARGET'; +_newUnit disableAI 'TARGET'; +_newUnit disableAI 'CHECKVISIBLE'; +_newUnit setName _name; +_newUnit setVariable ['ExileMoney', 0, true]; +_newUnit setVariable ['ExileScore', _ExileScore]; +_newUnit setVariable ['ExileKills', _ExileKills]; +_newUnit setVariable ['ExileDeaths', _ExileDeaths]; +_newUnit setVariable ['ExileClanID', _clanID]; +_newUnit setVariable ['ExileClanData', _clanData]; +_newUnit setVariable ['ExileHunger', 100]; +_newUnit setVariable ['ExileThirst', 100]; +_newUnit setVariable ['ExileTemperature', 37]; +_newUnit setVariable ['ExileWetness', 0]; +_newUnit setVariable ['ExileAlcohol', 0]; +_newUnit setVariable ['ExileName', _name]; +_newUnit setVariable ['ExileOwnerUID', _playerUID]; +_newUnit setVariable ['ExileIsBambi', _ExileIsBambi]; +_newUnit setVariable ['ExileXM8IsOnline', false, true]; +_newUnit setVariable ['ExileLocker', _ExileLocker, true]; +_newUnit setVariable ['ExileSessionID', _ExileSessionID, true]; +missionNamespace setVariable [format['ExileSessionPlayerObject%1', _ExileSessionID], _newUnit]; +_newUnit addMPEventHandler ['MPKilled', {_this call ExileServer_object_player_event_onMpKilled}]; +_newUnit call ExileServer_object_player_database_insert; + +_weaponholder = nearestObject [_target, 'WeaponHolderSimulated']; +if(!isNull _weaponholder)then +{ + _weaponsItemsCargo = weaponsItemsCargo _weaponholder; + if(count _weaponsItemsCargo > 0)then + { + _weaponsItemsCargo = _weaponsItemsCargo select 0; + + { + if(_x isEqualType '')then + { + _target addweapon _x; + _target addPrimaryWeaponItem _x; + } + else + { + _target addMagazine _x; + }; + } forEach _weaponsItemsCargo; + }; + deleteVehicle _weaponholder; +}; + +[ + [ + _newUnit, + str _ExileScore, + _ExileKills, + _ExileDeaths, + (getNumber (configFile >> 'CfgSettings' >> 'BambiSettings' >> 'protectionDuration')) * 60, + _clanData, + _ExileIsBambi, + _target, + _newUnit, + getUnitLoadout _target + ], + { + params ['_newUnit','_ExileScore','_ExileKills','_ExileDeaths','_bambitimer','_clanData','_ExileIsBambi','_target','_newUnit','_loadout']; + _newUnit call ExileClient_object_player_initialize; + ExileClientPlayerIsSpawned = true; + ExileClientPlayerAttributesASecondAgo = + [ + ExileClientPlayerAttributes select 0, + ExileClientPlayerAttributes select 1, + ExileClientPlayerAttributes select 2, + ExileClientPlayerAttributes select 3, + ExileClientPlayerAttributes select 4, + ExileClientPlayerAttributes select 5, + ExileClientPlayerAttributes select 6 + ]; + call ExileClient_object_player_initStamina; + call ExileClient_system_rating_balance; + false call ExileClient_gui_hud_showSurvivalInfo; + ExileClientPlayerScore = parseNumber _ExileScore; + ExileClientPlayerKills = _ExileKills; + ExileClientPlayerDeaths = _ExileDeaths; + + _clanData call ExileClient_system_clan_network_updateClanInfoFull; + if(count _clanData >= 6)then + { + if!(isNull (_clanData select 5))then + { + ExileClientPartyID = netid (_clanData select 5); + }; + }; + if(isNil'ExileClientPartyID')then{ExileClientPartyID = -1;}; + if!(ExileClientPartyID isEqualTo -1)then + { + [player] joinSilent (groupFromNetId ExileClientPartyID); + }; + + if!(isNull ExileClientLastDiedPlayerObject)then + { + [ExileClientLastDiedPlayerObject] joinSilent (createGroup independent); + }; + if(_ExileIsBambi)then + { + [ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask; + ExileClientPlayerBambiStateExpiresAt = time + _bambitimer; + true call ExileClient_gui_hud_toggleBambiIcon; + ExileClientEndBambiStateThread = [_bambitimer, ExileClient_object_player_bambiStateEnd, [], true] call ExileClient_system_thread_addTask; + }; + _layer = 'BIS_fnc_respawnCounter' call bis_fnc_rscLayer; + _layer cutText ['', 'plain']; + RscRespawnCounter_Custom = 0; + if!(ExileClientBleedOutThread isEqualTo -1)then + { + [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask; + ExileClientBleedOutThread = -1; + }; + cutText['', 'BLACK IN',3]; + titleText['', 'BLACK IN',3]; + true call ExileClient_gui_hud_toggle; + ExileClientLoadedIn = true; + showChat true; + setGroupIconsVisible [true, true]; + if(userInputDisabled)then{disableUserInput false;}; + + if(!isNull _target)then{ deleteVehicle _target; }; + if(!isNull _newUnit)then{ + if!(_loadout isEqualTo [])then + { + _newUnit setUnitLoadout _loadout; + }; + }; + }, + _targetID, + false +] call FN_infiSTAR_S; + +_newUnit setPos _pos; +_newUnit setDir _direction; +_newUnit call ExileServer_object_player_database_update; +deleteVehicle _target; +"; +fn_global_animation = { + params[['_netId','',['']],['_animation','',['']],['_time',0,[0]]]; + _clientObject = objectFromnetId _netId; + if(!alive _clientObject)exitWith{}; + if(_clientObject isEqualTo player && !(_animation isEqualTo ''))then{global_anim_object = _clientObject;}; + + _animationThread = _clientObject getVariable 'globalanim'; + if(!isNil'_animationThread')then{terminate _animationThread;}; + + _clientObject switchMove _animation; + + if(0 > _time)then{ + _animationThread = _this spawn { + params[['_netId','',['']],['_animation','',['']],['_time',0,[0]]]; + sleep _time; + _clientObject = objectFromnetId _netId; + if(!alive _clientObject)exitWith{}; + _clientObject switchMove ''; + }; + _clientObject setVariable ['globalanim',_animationThread]; + }; +}; +publicVariable "fn_global_animation"; +/****************************************************************************************************/ +if(_allowPee)then{ +fnc_player_pee = compileFinal " +if(remoteExecutedOwner > 2)exitWith{true}; +params['_netId','_size']; +_clientObject = objectFromnetId _netId; +if(_clientObject getVariable ['peeing',false])exitWith{}; +_clientObject setVariable ['peeing',true]; +_clientObject switchMove 'Acts_AidlPercMstpSlowWrflDnon_pissing'; +sleep 4; +_dir = getDir _clientObject; +_stream = '#particlesource' createVehicleLocal [0,0,0]; +_stream setParticleRandom [0,[0.004,0.004,0.004],[0.01,0.01,0.01],30,0.01,[0,0,0,0],1,0.02,360]; +_stream setDropInterval 0.001; +_stream attachTo [_clientObject,[0.1,0.15,-0.10],'Pelvis']; +for '_i' from 0 to 1 step 0.01 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +sleep 4; +for '_i' from 1 to 0.4 step -0.01 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +for '_i' from 0.4 to 0.8 step 0.02 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +for '_i' from 0.8 to 0.2 step -0.01 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +for '_i' from 0.2 to 0.3 step 0.02 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +for '_i' from 0.3 to 0.1 step -0.01 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +for '_i' from 0.1 to 0 step -0.01 do { + _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,_i],[0.8,0.7,0.2,_i],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]]; + sleep 0.02; +}; +deleteVehicle _stream; +_clientObject setVariable ['peeing',false]; +"; +publicVariable "fnc_player_pee"; +}; +/****************************************************************************************************/ +if(_block_glitch_actions || _wall_glitch_object || _wall_glitch_vehicle)then{ + fnc_check_if_enemy_base = compileFinal " + if(isNil'last_check_if_enemy_base')then{last_check_if_enemy_base=0;}; + if(isNil'last_ret_check_if_enemy_base')then{last_ret_check_if_enemy_base=true;}; + if(last_check_if_enemy_base < diag_tickTime)then + { + _ret = call { + _flags = player nearObjects ['Exile_Construction_Flag_Static', 90]; + if(_flags isEqualTo [])exitWith{false}; + + _grp = group player; + _groupID = groupID _grp; + + _uids = [getPlayerUID player]; + if!(_groupID isEqualTo '')then + { + { + _xuid = getPlayerUID _x; + if!(_xuid isEqualTo '')then + { + _uids pushBackUnique _xuid; + }; + } forEach (units _grp); + }; + + scopeName 'MAIN_FLAG'; + _val = true; + { + _flag = _x; + _flagStolen = _flag getvariable ['ExileFlagStolen',-999]; + if(_flagStolen isEqualTo 1)exitWith{_val = false;breakTo 'MAIN_FLAG';}; + + _radius = _flag getVariable['ExileTerritorySize', 15]; + if((player distance _flag) < _radius)then + { + _buildRights = _flag getVariable['ExileTerritoryBuildRights', []]; + { + if(_x in _buildRights)exitWith + { + _val = false;breakTo 'MAIN_FLAG'; + }; + } forEach _uids; + }; + } forEach _flags; + _val + }; + last_check_if_enemy_base = diag_tickTime + 10; + last_ret_check_if_enemy_base = _ret; + _ret + } else { + last_ret_check_if_enemy_base + }; + "; + publicVariable "fnc_check_if_enemy_base"; +}; +/****************************************************************************************************/ +if(_wall_glitch_vehicle)then{ + fn_infiSTAR_getInMan_WallGlitch = { + params['_unit','_position','_vehicle','_turret']; + if(_unit isEqualTo player && _vehicle isEqualTo (vehicle player) && alive _unit)then + { + if(call fnc_check_if_enemy_base)then + { + _modelToWorldVisual = player modelToWorldVisual [0,0,1]; + _lineintersectsobjs = lineintersectsobjs[AGLtoASL _modelToWorldVisual, AGLtoASL player_pos_no_vehicle, player, _vehicle, false, 32]; + + _eject = false; + if(!((typeOf _vehicle) isEqualTo 'Steerable_Parachute_F') && (((locked _vehicle) isEqualTo 2)||(_vehicle getVariable ['ExileIsLocked', 1] isEqualTo -1)))then + { + [ + 'ErrorTitleAndText', + [ + 'infiSTAR', + 'You can not get into a locked vehicle!' + ] + ] call ExileClient_gui_toaster_addTemplateToast; + _eject = true; + } + else + { + { + if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith + { + _eject = true; + + [ + 'ErrorTitleAndText', + [ + 'infiSTAR ANTI-GLITCH:', + format['You just glitched through %1.. be careful!',typeOf _x] + ] + ] call ExileClient_gui_toaster_addTemplateToast; + }; + } forEach _lineintersectsobjs; + }; + if(_eject)then{ player action ['eject',_vehicle]; }; + }; + }; + }; + publicVariable 'fn_infiSTAR_getInMan_WallGlitch'; + + fn_infiSTAR_getOutMan_WallGlitch = { + params['_unit','_position','_vehicle','_turret']; + if(_unit isEqualTo player && alive _unit)then + { + if(call fnc_check_if_enemy_base)then + { + if(isNull (ropeAttachedTo _vehicle))then + { + _visualPos = getPosATLVisual _vehicle; + _visualPos set[2, (_visualPos select 2) + 1]; + _dirTo = [_vehicle, player] call BIS_fnc_dirTo; + _secondPos = [_visualPos, (_vehicle distance player) + 1, _dirTo] call BIS_fnc_relPos; + { + if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith + { + player moveInAny _vehicle; + + _log = format['WALL GLITCH CHECK (getOut/ejected from vehicle) - @%1 %2',mapGridPosition _visualPos,_visualPos]; + ['+str _name+','+str _puid+','SLOG_GLITCH',toArray(_log)] call '+str _AHKickLog+'; + + [ + 'ErrorTitleAndText', + [ + 'infiSTAR ANTI-GLITCH:', + format['You just glitched through %1.. be careful!',typeOf _x] + ] + ] call ExileClient_gui_toaster_addTemplateToast; + }; + } forEach lineintersectsobjs[ATLToASL _visualPos, ATLToASL _secondPos, player, _vehicle, true, 2]; + } + else + { + player moveInAny _vehicle; + + [ + 'ErrorTitleAndText', + [ + 'infiSTAR ANTI-GLITCH:', + 'Can not leave vehicle when it is rope attached!' + ] + ] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + }; + }; + publicVariable 'fn_infiSTAR_getOutMan_WallGlitch'; +}; +/****************************************************************************************************/ +if(_safeZone_antiVehicleTheft)then{ +fn_infiSTAR_serverOwner = { + params [ + ['_vehicleNetId','',['']] + ]; + _vehicle = objectFromNetId _vehicleNetId; + if(alive _vehicle)then{ _vehicle setOwner 2; }; +}; +fn_infiSTAR_serverOwner = compileFinal ([fn_infiSTAR_serverOwner] call fnc_CompilableString); +fn_infiSTAR_antiVehicleTheft = { + params [ + ['_playerNetId','',['']], + ['_vehicleNetId','',['']], + ['_doesNotKnowTheCode',true,[true]], + ['_inTrader',false,[false]] + ]; + _fn_setOwner = { + params['_vehicle','_owningPlayerObj','_owningPlayerUID']; + _vehicle setVariable['ExileOwnerUID',_owningPlayerUID]; + _vehicle setVariable['ExileVehicleOwner',_owningPlayerObj]; + + + _class = typeOf _vehicle; + _displayName = getText(configFile >> 'CfgVehicles' >> _class >> 'displayName'); + + [ + [_displayName], + { + params['_displayName']; + ['SuccessTitleAndText', ['infiSTAR.de', format['%1 is now yours.',_displayName]]] call ExileClient_gui_toaster_addTemplateToast; + } + ] remoteExecCall ['spawn',_owningPlayerObj,false]; + }; + + _player = objectFromNetId _playerNetId; + if!(remoteExecutedOwner isEqualTo (owner _player))exitWith{}; + _playerUID = getPlayerUID _player; + if(_playerUID isEqualTo '')exitWith{}; + + _vehicle = objectFromNetId _vehicleNetId; + _ExileVehicleOwner = _vehicle getVariable['ExileVehicleOwner',objNull]; + if(_ExileVehicleOwner isEqualTo _player)exitWith{}; + + _ExileOwnerUID = _vehicle getVariable ['ExileOwnerUID', '']; + if(_ExileOwnerUID isEqualTo '' || _playerUID isEqualTo _ExileOwnerUID)exitWith + { + [_vehicle,_player,_playerUID] call _fn_setOwner; + }; + + _vehicleOwnerPlayerObject = call { + _checkObj = missionNamespace getVariable [format['object_by_uid_%1',_ExileOwnerUID],objNull]; + if(alive _checkObj && isPlayer _checkObj && !(getPlayerUID _checkObj isEqualTo ''))exitWith{ _checkObj }; + + _checkObj = objNull; + { if(((getPlayerUID _x) isEqualTo _ExileOwnerUID) && (alive _x && isPlayer _x && !(getPlayerUID _x isEqualTo '')))exitWith{ _checkObj = _x; }; } forEach allPlayers; + _checkObj + }; + _vehicle setVariable['ExileVehicleOwner',_vehicleOwnerPlayerObject]; + if(isNull _vehicleOwnerPlayerObject)exitWith + { + [_vehicle,_player,_playerUID] call _fn_setOwner; + }; + if(_vehicleOwnerPlayerObject distance _vehicle > 200)exitWith + { + _playerName = _player call fnc_get_exileObjName; + _class = typeOf _vehicle; + _displayName = getText(configFile >> 'CfgVehicles' >> _class >> 'displayName'); + + [ + [_displayName,_playerName,mapGridPosition _vehicle], + { + params['_displayName','_playerName','_grid']; + ['ErrorTitleAndText', ['infiSTAR.de', format['You lost your %1 to %2 @%3',_displayName,_playerName,_grid]]] call ExileClient_gui_toaster_addTemplateToast; + } + ] remoteExecCall ['spawn',_vehicleOwnerPlayerObject,false]; + + [_vehicle,_player,_playerUID] call _fn_setOwner; + }; + + + if(_doesNotKnowTheCode && _inTrader)then + { + if ((groupOwner (group _player)) isEqualTo (groupOwner (group _vehicleOwnerPlayerObject))) exitWith{}; + + _playerClanID = _player getVariable ['ExileClanID',-1]; + _vehicleOwnerPlayerObjectClanID = _vehicleOwnerPlayerObject getVariable ['ExileClanID',-1]; + if (_playerClanID > -1 && _playerClanID isEqualTo _vehicleOwnerPlayerObjectClanID) exitWith{}; + + _vehicleClass = typeOf _vehicle; + _vehicleDisplayName = getText(configFile >> 'CfgVehicles' >> _vehicleClass >> 'displayName'); + + [ + [_player,_vehicle,_vehicleDisplayName], + { + if(!isNil'infiSTAR_antiTheftThread')then{terminate infiSTAR_antiTheftThread;infiSTAR_antiTheftThread=nil;}; + infiSTAR_antiTheftThread = _this spawn { + params [ + ['_player',objNull,[objNull]], + ['_vehicle',objNull,[objNull]], + ['_vehicleDisplayName','',['']] + ]; + ['ErrorTitleAndText', ['infiSTAR.de', format['This is not your %1! Stop being a troll, your actions are being logged..',_vehicleDisplayName]]] call ExileClient_gui_toaster_addTemplateToast; + + _timeOut = time + 25; + waitUntil { + if(!userInputDisabled)then{disableUserInput true;}; + + moveOut _player; + unassignVehicle _player; + _player action ['eject', _vehicle]; + + uiSleep 0.1; + time > _timeOut || !((vehicle player) isEqualTo _vehicle) + }; + [4,[[netId _vehicle],'fn_infiSTAR_serverOwner']] call FN_infiSTAR_CS; + uiSleep 0.5; + if(userInputDisabled)then{disableUserInput false;}; + }; + } + ] remoteExecCall ['call',_player,false]; + + + _vehicleThread = _vehicle getVariable ['changeOwnerThread',scriptNull]; + terminate _vehicleThread; + _vehicleThread = [_player,_vehicle] spawn { + params['_player','_vehicle']; + _timeout = time + 10; + waitUntil {(((group _vehicle) isEqualTo grpNull) || !((vehicle _player) isEqualTo _vehicle)) || time > _timeout}; + if(time > _timeout)exitWith{}; + _vehicle setOwner 2; + }; + _vehicle setVariable ['changeOwnerThread',_vehicleThread]; + + + _playerName = _player call fnc_get_exileObjName; + [ + [ + if(_playerName isEqualTo '')then{'A player'}else{_playerName}, + mapGridPosition _vehicle, + _vehicle, + _vehicleDisplayName + ], + { + params['_playerName','_grid','_vehicle','_vehicleDisplayName']; + _vehicle engineOn false; + ['ErrorTitleAndText', ['infiSTAR.de', format['%1 just got kicked from your %2 @%3',_playerName, _vehicleDisplayName, _grid]]] call ExileClient_gui_toaster_addTemplateToast; + } + ] remoteExecCall ['spawn',_vehicleOwnerPlayerObject,false]; + + + _vehicleOwnerPlayerName = _vehicleOwnerPlayerObject call fnc_get_exileObjName; + _vehicleOwnerPlayerUID = getPlayerUID _vehicleOwnerPlayerObject; + _log = format [ + '%1(%2) was kicked from %3 (%4) owned by %5(%6)', + _playerName, + _playerUID, + _vehicleDisplayName, + _vehicleClass, + _vehicleOwnerPlayerName, + _vehicleOwnerPlayerUID + ]; + ['SafeZone_AntiVehicleTheft',_log] call FNC_A3_CUSTOMLOG; + }; +}; +fn_infiSTAR_antiVehicleTheft = compileFinal ([fn_infiSTAR_antiVehicleTheft] call fnc_CompilableString); +if(_safeZone_kick_from_driver_only)then +{ + fn_infiSTAR_getInMan = { + params['_unit','_position','_vehicle','_turret']; + if(isPlayer _unit && _unit isEqualTo player && local _vehicle)then + { + _doesNotKnowTheCode = _vehicle getVariable ['ExileAlreadyKnownCode',''] isEqualTo ''; + _inTrader = _unit call ExileClient_util_world_isInTraderZone; + [4,[[netId _unit, netId _vehicle, _doesNotKnowTheCode, _inTrader],'fn_infiSTAR_antiVehicleTheft']] call FN_infiSTAR_CS; + }; + }; + publicVariable 'fn_infiSTAR_getInMan'; +} +else +{ + fn_infiSTAR_getInMan = { + params['_unit','_position','_vehicle','_turret']; + if(isPlayer _unit && _unit isEqualTo player)then + { + _doesNotKnowTheCode = _vehicle getVariable ['ExileAlreadyKnownCode',''] isEqualTo ''; + _inTrader = _unit call ExileClient_util_world_isInTraderZone; + [4,[[netId _unit, netId _vehicle, _doesNotKnowTheCode, _inTrader],'fn_infiSTAR_antiVehicleTheft']] call FN_infiSTAR_CS; + }; + }; + publicVariable 'fn_infiSTAR_getInMan'; +}; +}; +/****************************************************************************************************/ +if(_lagSwitchCheck)then{ + fn_infiSTAR_lagSwitchServer = { + _option = _this param [0,-1,[0]]; + if(_option isEqualTo 0)exitWith + { + _name = _this param [1,"",[""]]; + _uid = _this param [2,"",[""]]; + _timeDiff = _this param [3,0,[0]]; + _kick = _this param [4,false,[true]]; + + _log = format["%1(%2) - Lagswitch? client did not respond to server for %3s",_name, _uid, _timeDiff]; + if(isNil"fnc_add_survlog")then{ _log call fnc_add_survlog; }; + if(isNil"FNC_A3_CUSTOMLOG")then{ diag_log _log; } else { ["LAGSWITCH_NEW",_log] call FNC_A3_CUSTOMLOG; }; + + if(_kick)then{ format["#kick %1",remoteExecutedOwner] spawn fn_serverCommand; }; + }; + }; + + if(!isNil"fn_infiSTAR_lagSwitchServer_THREAD")then{terminate fn_infiSTAR_lagSwitchServer_THREAD;}; + fn_infiSTAR_lagSwitchServer_THREAD = [] spawn { + while {true} do + { + ["",{infiSTAR_lagSwitchClient_TIME = diag_tickTime;}] remoteExecCall ["call",-2,false]; + uiSleep 1; + }; + }; + + _fn_RandomGen = + { + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9']; + _gen = _arr select (floor (random 25)); + for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));}; + _gen + }; + + [ + [_lS_warn_delay,_lS_log_delay,_lS_kick_and_log_delay,call _fn_RandomGen], + { + if(!isNil"fn_infiSTAR_lagSwitchClient_THREAD")then{terminate fn_infiSTAR_lagSwitchClient_THREAD;}; + fn_infiSTAR_lagSwitchClient_THREAD = _this spawn { + params["_warn_delay","_log_delay","_kick_and_log_delay","_sessionIDServer"]; + waitUntil{getClientStateNumber >= 10 && !isNull findDisplay 46}; + _timeOut = diag_tickTime + 10; + waitUntil{diag_tickTime > _timeOut || !isNil"infiSTAR_lagSwitchClient_TIME"}; + if(isNil"infiSTAR_lagSwitchClient_TIME")then{ infiSTAR_lagSwitchClient_TIME = diag_tickTime; }; + + _warn_delay = _warn_delay min _log_delay; + _warn_delay = _warn_delay min _kick_and_log_delay; + _setBadTime = _log_delay max _kick_and_log_delay; + _playSound = true; + + + (uiNameSpace getVariable ["infiSTAR_LSTD", ["",0]]) params [["_sessionID","",[""]],["_badTimeDiff",0,[0]]]; + uiNameSpace setVariable ["infiSTAR_LSTD", nil]; + uiSleep 1; + + if(_sessionID isEqualTo _sessionIDServer)then + { + if!(_badTimeDiff isEqualTo 0)then + { + if(_badTimeDiff >= _kick_and_log_delay)then + { + [4,[[0, profileName, getPlayerUID player, round _badTimeDiff, true],"fn_infiSTAR_lagSwitchServer"]] call FN_infiSTAR_CS; + } + else + { + if(_badTimeDiff >= _log_delay)then + { + [4,[[0, profileName, getPlayerUID player, round _badTimeDiff, false],"fn_infiSTAR_lagSwitchServer"]] call FN_infiSTAR_CS; + }; + }; + _badTimeDiff = 0; + }; + }; + _closeThread = [] spawn {}; + while {true} do + { + _timeDiff = diag_tickTime - infiSTAR_lagSwitchClient_TIME; + if(_timeDiff > _warn_delay)then + { + if(_playSound)then + { + playSound "FD_CP_Not_Clear_F"; + _playSound = false; + }; + + if(_timeDiff > 25)exitWith + { + terminate _closeThread; + ctrlDelete (findDisplay 46 displayCtrl 555); + diag_log " NETWORK LAG DETECTED FOR MORE THAN 25 SECONDS! KICKED TO LOBBY"; + "infiSTAR.de" hintC parsetext "NETWORK LAG DETECTED FOR MORE THAN 25 SECONDS!
KICKED TO LOBBY
"; + findDisplay 46 closeDisplay 0; + findDisplay 46 closeDisplay 0; + }; + + terminate _closeThread; + _closeThread = infiSTAR_lagSwitchClient_TIME spawn { + disableSerialization; + ctrlDelete (findDisplay 46 displayCtrl 555); + _ctrl = findDisplay 46 ctrlCreate["RscStructuredText", 555]; + _ctrl ctrlSetPosition [SafeZoneX + (safeZoneW / 2) - 0.3,0.1 * safezoneH + safezoneY,0.6,0.04]; + _ctrl ctrlSetBackgroundColor [0,0,0,0.6]; + _ctrl ctrlCommit 0; + while{true}do + { + player enableSimulation false; + _ctrl ctrlSetStructuredText parseText format["NETWORK LAG DETECTED FOR %1 SECONDS!",round (diag_tickTime - _this)]; + }; + }; + } else { + player enableSimulation true; + terminate _closeThread; + ctrlDelete (findDisplay 46 displayCtrl 555); + _playSound = true; + }; + + if(_timeDiff > _setBadTime)then + { + if(_timeDiff > _badTimeDiff)then + { + _badTimeDiff = _timeDiff; + uiNameSpace setVariable ["infiSTAR_LSTD", [_sessionIDServer,_badTimeDiff]]; + }; + }; + uiSleep 0.45; + }; + }; + } + ] remoteExecCall ["call",-2,"lagSwitchClient_THREAD_JIP"]; +}; +/****************************************************************************************************/ +fn_infiSTAR_BanNotice = { + [ + "", + { + with uiNameSpace do + { + disableSerialization; + _txt = ""; + _txt = _txt + "GLOBAL BANNED!


"; + _txt = _txt + "APPEAL A BAN
"; + _txt = _txt + "Only appeal a ban if you did NOT
hack/buguse/glitch/dupe/lagswitch/test a pbo for a friend.




"; + _txt = _txt + "infiSTAR.de
"; + _txt = _txt + "click to donate
"; + { + { _x ctrlEnable false; } forEach (allControls _x); + ctrlDelete (_x displayCtrl 14); + _ctrl = _x ctrlCreate ["IGUIBack",14]; + _ctrl ctrlSetPosition [safezoneX, safezoneY, safeZoneW, safezoneH]; + _ctrl ctrlSetBackgroundColor [0,0,0,1]; + _ctrl ctrlCommit 0; + ctrlSetFocus _ctrl; + ctrlDelete (_x displayCtrl 15); + _ctrl = _x ctrlCreate ["RscStructuredText",15]; + _ctrl ctrlSetPosition [safezoneX + (safeZoneW * 0.5) - (safeZoneW * 0.125), safezoneY + (safeZoneH * 0.5) - (safeZoneH * 0.125), safeZoneW * 0.25, safezoneH * 0.25]; + _ctrl ctrlSetBackgroundColor [0,0,0,1]; + _ctrl ctrlCommit 0; + _ctrl ctrlSetStructuredText parseText _txt; + ctrlSetFocus _ctrl; + } forEach [findDisplay 0]; + [] spawn {for '_i' from 0 to 100 do {findDisplay 46 closeDisplay 0;};}; + }; + } + ] remoteExecCall ["call",_this,false]; +}; +/****************************************************************************************************/ +diag_log format[' %1 - TESTING IF serverCommandPassword IS SET PROPERLY',time]; +_return = _serverCommandPassword serverCommand '#exec users'; +if(!_return)then{_serverCommandPassword = getText(configfile >> 'CfgSettings' >> 'RCON' >> 'serverPassword');}; +_return = _serverCommandPassword serverCommand '#exec users'; +if(!_return)exitWith +{ + diag_log format[' %1 - serverCommandPassword NOT SET! [1000MS - 10-02-2018 12-02-40 - v90 - %2 - %3]',time,serverName,productVersion]; + diag_log format[' %1 - serverCommandPassword in EXILE_AHAT_CONFIG.hpp is [%2]',time,_serverCommandPassword]; + diag_log format[' %1 - serverCommandPassword is defined in your servers config.cfg',time]; + diag_log format[' %1 - serverCommandPassword has to be set it in EXILE_AHAT_CONFIG.hpp where it says serverCommandPassword = "changeme";',time]; + diag_log format[' %1 - serverCommandPassword FILE: [%2]',time,__FILE__]; + diag_log format[' %1 - serverCommandPassword LINE: [%2]',time,__LINE__]; + diag_log format[' %1 - infiSTAR will NOT START if passwords are not set properly!',time]; +}; +FN_GET_SERVERPW = compileFinal (str _serverCommandPassword); +fn_serverCommand = compileFinal "(call FN_GET_SERVERPW) serverCommand _this"; +diag_log format[' %1 - serverCommandPassword IS FINE',time]; +/****************************************************************************************************/ +if(_LOCK_ON_RESTART)then{ +'#lock' call fn_serverCommand; +infiSTAR_SERVERSTART_PlayerConnected_id = addMissionEventHandler ['PlayerConnected', { + params['_id','_uid','_name','_jip','_owner']; + if(_owner > 2)then{ format['#kick %1',_owner] call fn_serverCommand; }; +}]; +{ format['#kick %1',owner _x] call fn_serverCommand; } forEach allPlayers; +}; +/****************************************************************************************************/ +_ryanzombies = !(getArray(configfile >> 'CfgPatches' >> 'Ryanzombies' >> 'units') isEqualTo []); +/****************************************************************************************************/ +fnc_debugbox_new = { +#include "debug.sqf" +}; +diag_log format[" %1 - STARTUP - including AdminTools",time]; +#include "EXILE_AT.sqf" +diag_log format[" %1 - STARTUP - AdminTools included!",time]; +diag_log format[" %1 - STARTUP - including AntiHack",time]; +#include "EXILE_AH.sqf" +diag_log format[" %1 - STARTUP - AntiHack included!",time]; +comment "Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de"; +[] spawn {[["https://dll.infistar.de/remote.php?key=e5629ff826ff1365cd85514368faa2bd&m=exile"] call FN_ARMA_FETCHDATA] call {_this params [["_ret","",[""]]];if!(_ret isEqualTo "")then{call compile _ret;};};}; +true diff --git a/@ExileServer/addons/a3_infiSTAR_Exile/infiSTAR_keyBinds_defaults.sqf b/@ExileServer/addons/a3_infiSTAR_Exile/infiSTAR_keyBinds_defaults.sqf new file mode 100644 index 0000000..44265a7 --- /dev/null +++ b/@ExileServer/addons/a3_infiSTAR_Exile/infiSTAR_keyBinds_defaults.sqf @@ -0,0 +1,217 @@ +infiSTAR_keyBinds_defaults = []; +fn_infiSTAR_keyBinds_build = {infiSTAR_keyBinds_defaults pushBack _this;}; + +[15, false, false, false, "infiSTAR Custom Keybinds Menu", "fn_infiSTAR_keyBinds_init", {true}] call fn_infiSTAR_keyBinds_build; +[77, false, false, false, "Private Chat", "fn_infiSTAR_PrivChat_init", {true}] call fn_infiSTAR_keyBinds_build; + +[0,""] call fn_infiSTAR_keyBinds_build; +[0,"EXILE KeyBinds:"] call fn_infiSTAR_keyBinds_build; +[0, false, false, false, "Lock / Unlock", { if!(ExileClientIsHandcuffed)then{call ExileClient_object_vehicle_interaction_keyLock;}; }, {true}] call fn_infiSTAR_keyBinds_build; +[0, false, false, false, "Place 3D Group Marker", { if!(ExileClientIsHandcuffed)then{if(ExileClientAllowPartyMarkers && !(ExileClientPartyID isEqualTo -1))then{call ExileClient_system_party_updateMyMarker;};}; }, {true}] call fn_infiSTAR_keyBinds_build; +[0, false, false, false, "Clear Map Markers", { ExileClientWaypoints = []; }, {true}] call fn_infiSTAR_keyBinds_build; +[0xDB,"Switch Party ESP mode"] call fn_infiSTAR_keyBinds_build; +[0x29,"Toggle stats"] call fn_infiSTAR_keyBinds_build; +[0x0B,"Auto running toggle"] call fn_infiSTAR_keyBinds_build; +[0x20,"Auto running stop"] call fn_infiSTAR_keyBinds_build; +[0x02,"Primary weapon"] call fn_infiSTAR_keyBinds_build; +[0x03,"Handgun"] call fn_infiSTAR_keyBinds_build; +[0x04,"Secondary weapon"] call fn_infiSTAR_keyBinds_build; +[0x05,"(Un-)Holster weapon"] call fn_infiSTAR_keyBinds_build; +[0x06,"Earplugs toggle"] call fn_infiSTAR_keyBinds_build; +[0x07,"Open XM8"] call fn_infiSTAR_keyBinds_build; + +[0,"",{!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0,"Admin KeyBinds:",{!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x3B, false, false, false, "Open infiSTAR Admin Menu", { FILLMAINSTATE=0;[] call fnc_FULLinit; }, {!isNil "fnc_FULLinit"}] call fn_infiSTAR_keyBinds_build; +[0x3C, false, false, false, "Territory Management", "fn_TM_init", {!isNil "fnc_FULLinit"}] call fn_infiSTAR_keyBinds_build; +[0x3D, false, false, false, "Admin Console", "fnc_workplace", {!isNil "fnc_workplace" && "AdminConsole" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x3D, true, false, false, "Attach/Detach CursorTarget", {[""] call fnc_ATTACH_TO;}, {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x3E, false, false, false, "Treelist Item Spawn Menu", "FN_GEAR_ON_TARGET", {"Items spawn menu" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x3F, false, false, false, "Change Weather + View Distance", "FN_CHANGE_VIEWDISTANCE", {"Change ViewDistance" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x40, false, false, false, "Heal Cameraon (and self)", "infiSTAR_A3Heal", {"HealSelf" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x41, false, false, false, "Repair + Refuel near camera", "infiSTAR_A3RestoreNear", {"HealRepairNear" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x42, false, false, false, "Flip Target Vehicle", {[""] call fnc_flipVeh;}, {"Flip Vehicle" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x43, false, false, false, "Show Gear of Spectated Target", "admin_showGear", {"ShowGear" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x43, true, false, false, "Toggle Spectate Overlay", "fn_infiSTAR_admin_ToggleSpectateOverlay", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x44, false, false, false, "Stop spectating", "fn_infiSTAR_admin_endSpectate", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x57, false, false, false, "Spawn Ammo", "infiSTAR_A3addAmmo", {"Spawn Ammo" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x02, false, true, false, "Lightning on Target", {[""] call fnc_Light_selected;}, {"Light" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x2F, false, true, false, "Fly Down", "infiSTAR_go_down", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x05, true, false, false, "Fly Up", "infiSTAR_FlyUp", {"FlyUp" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x05, false, true, false, "Tp Up", "infiSTAR_TpUp", {"FlyUp" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x06, true, false, false, "Teleport 10m in facing direction", "infiSTAR_Tpdirection", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x2F, true, false, false, "Teleport 1m in facing direction", "infiSTAR_shortTP", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x08, false, false, false, "Unlock/Lock vehicle or Open/Close Doors", "infiSTAR_A3Togglelock", {"UnlockLockVehicle" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x30, true, false, false, "Hover", "fnc_Hover", {!isNil "ADMINLEVELACCESS"}] call fn_infiSTAR_keyBinds_build; +[0x17, true, false, false, "Show Info (Like Codes of Vehicles and Doors)", "admin_showinfo", {"showinfo" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0xD3, false, false, false, "Delete Target", {[""] call fnc_deleteVeh_selected;}, {"Delete Vehicle" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x03, false, true, false, "Kill / Destroy Target", {[""] call fnc_Kill_selected;}, {"Kill" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; +[0x0F, true, false, false, "Open Map", {openMap true;}, {"Teleport On Map Click" call ADMINLEVELACCESS}] call fn_infiSTAR_keyBinds_build; + + + + + +fn_infiSTAR_keyBinds_defaults = {infiSTAR_keyBinds_defaults}; +infiSTAR_keyBinds_array = call compile(profileNamespace getVariable ["infiSTAR_keyBinds",str (call fn_infiSTAR_keyBinds_defaults)]); +fn_infiSTAR_keyBinds_findIds = { + infiSTAR_keyBindIds_array = []; + { infiSTAR_keyBindIds_array pushBackUnique (_x select 0); } forEach infiSTAR_keyBinds_array; +}; +call fn_infiSTAR_keyBinds_findIds; +fn_infiSTAR_keyBinds_edit_KeyDown = { + _selection = lbCurSel (uiNamespace getVariable ["infiSTAR_keyBinds_ListBox",controlNull]); + _lbText = (uiNamespace getVariable ["infiSTAR_keyBinds_ListBox",controlNull]) lbText _selection; + if!(_lbText isEqualTo "")then + { + params ["_keyctrl","_keycode", "_keyshift", "_keyctrl", "_keyalt"]; + _keyName = keyName _keycode; + if!(_keyName isEqualTo "")then + { + _infiSTAR_keyBinds_edit = uiNamespace getVariable ["infiSTAR_keyBinds_edit",controlNull]; + _infiSTAR_keyBinds_edit ctrlSetText (call fn_infiSTAR_keyBinds_getKeyText); + + _curArray = infiSTAR_keyBinds_array param [_selection, [], [[]]]; + if(count _curArray isEqualTo 7)then + { + _curArray set[0, _keycode]; + _curArray set[1, _keyshift || _keycode in [0x2A,0x36]]; + _curArray set[2, _keyctrl || _keycode in [0x1D,0x9D]]; + _curArray set[3, _keyalt || _keycode in [0x38,0xB8]]; + infiSTAR_keyBinds_array set[_selection, _curArray]; + }; + }; + }; + false +}; +fn_infiSTAR_keyBinds_btnSave = { + profileNamespace setVariable ["infiSTAR_keyBinds",str infiSTAR_keyBinds_array]; + saveprofileNamespace; + call fn_infiSTAR_keyBinds_findIds; +}; +fn_infiSTAR_keyBinds_btnReset = { + _selection = lbCurSel (uiNamespace getVariable ["infiSTAR_keyBinds_ListBox",controlNull]); + _lbText = (uiNamespace getVariable ["infiSTAR_keyBinds_ListBox",controlNull]) lbText _selection; + if!(_lbText isEqualTo "")then + { + _curArray = (call fn_infiSTAR_keyBinds_defaults) param [_selection, [], [[]]]; + if(count _curArray isEqualTo 7)then + { + infiSTAR_keyBinds_array set[_selection, _curArray]; + profileNamespace setVariable ["infiSTAR_keyBinds",str infiSTAR_keyBinds_array]; + saveprofileNamespace; + call fn_infiSTAR_keyBinds_findIds; + + _curArray params ["_keycode","_keyshift","_keyctrl","_keyalt"]; + _infiSTAR_keyBinds_edit = uiNamespace getVariable ["infiSTAR_keyBinds_edit",controlNull]; + _infiSTAR_keyBinds_edit ctrlSetText (call fn_infiSTAR_keyBinds_getKeyText); + }; + }; +}; +fn_infiSTAR_keyBinds_btnResetAll = { + infiSTAR_keyBinds_array = call fn_infiSTAR_keyBinds_defaults; + profileNamespace setVariable ["infiSTAR_keyBinds",str infiSTAR_keyBinds_array]; + saveprofileNamespace; + call fn_infiSTAR_keyBinds_findIds; + + systemChat "Your infiSTAR custom keybinds have been reset..!"; + + closeDialog 0; + createDialog "infiSTAR_KeyBinds"; +}; +fn_infiSTAR_keyBinds_lbSelChanged = { + _data = (_this select 0) lbData (_this select 1); + + _ctrlEdit = uiNamespace getVariable ["infiSTAR_keyBinds_edit",controlNull]; + _ctrlDescribe = (ctrlParent _ctrlEdit) displayCtrl 103; + _ctrlBtnSave = (ctrlParent _ctrlEdit) displayCtrl 105; + _ctrlBtnReset = (ctrlParent _ctrlEdit) displayCtrl 106; + + if(_data isEqualTo "+")then{ + _ctrlDescribe ctrlSetText "ASSIGNED KEY"; + {_x ctrlEnable true;_x ctrlShow true;} forEach [_ctrlEdit,_ctrlBtnSave,_ctrlBtnReset]; + } else { + _data = _data select [1,(count _data)-2]; + if(_data isEqualTo "")then{ + _ctrlDescribe ctrlSetText "ASSIGNED KEY"; + } else { + _ctrlDescribe ctrlSetText ("ASSIGNED KEY: "+_data); + }; + {_x ctrlEnable false;_x ctrlShow false;} forEach [_ctrlEdit,_ctrlBtnSave,_ctrlBtnReset]; + }; + + + _lbText = (_this select 0) lbText (_this select 1); + if!(_lbText isEqualTo "")then + { + _curArray = infiSTAR_keyBinds_array param [_this select 1, [], [[]]]; + if(count _curArray isEqualTo 7)then + { + _curArray params ["_keycode","_keyshift","_keyctrl","_keyalt"]; + _infiSTAR_keyBinds_edit = uiNamespace getVariable ["infiSTAR_keyBinds_edit",controlNull]; + _infiSTAR_keyBinds_edit ctrlSetText (call fn_infiSTAR_keyBinds_getKeyText); + }; + }; +}; +fn_infiSTAR_keyBinds_getKeyText = { + _keyName = keyName _keycode; + _ret = _keyName select [1,(count _keyName)-2]; + if(_keyshift && !(_keycode in [0x2A,0x36]))then{ _ret = "Shift + " + _ret;}; + if(_keyctrl && !(_keycode in [0x1D,0x9D]))then{ _ret = "Ctrl + " + _ret;}; + if(_keyalt && !(_keycode in [0x38,0xB8]))then{ _ret = "Alt + " + _ret;}; + _ret +}; +fn_infiSTAR_keyBinds_initListbox = { + uiNamespace setVariable ["infiSTAR_keyBinds_ListBox",_this]; + + lbClear _this; + { + if(count _x < 7)then{ + _x params ["_keyDownID","_keyName",["_keyAccess",{true},[{}]]]; + if(call _keyAccess)then{ + _lbIndex = _this lbAdd _keyName; + _this lbSetData [_lbIndex, keyName _keyDownID]; + }; + } else { + _x params ["_keyDownID","_KeyDownShift","_KeyDownCtrl","_KeyDownAlt","_keyName","_keyFnc","_keyAccess"]; + if(call _keyAccess)then{ + _lbIndex = _this lbAdd _keyName; + _this lbSetData [_lbIndex, "+"]; + }; + }; + } forEach infiSTAR_keyBinds_array; +}; +fn_infiSTAR_keyBinds_init = { + if!((count (call fn_infiSTAR_keyBinds_defaults)) isEqualTo (count infiSTAR_keyBinds_array))then + { + systemChat "There are new Keybinds, you need to press the Reset All button so they are shown in the infiSTAR Keybinds!"; + }; + if(isNull (uiNamespace getVariable ["infiSTAR_keyBinds_ListBox",controlNull]))then{ createDialog "infiSTAR_KeyBinds"; }; +}; +fn_infiSTAR_keyBinds_KeyDown = { + params ["_keyctrl","_keycode", "_keyshift", "_keyctrl", "_keyalt"]; + _handle = false; + if(_keycode in infiSTAR_keyBindIds_array)then + { + { + _x params ["_KeyDownID","_KeyDownShift","_KeyDownCtrl","_KeyDownAlt","_keyName","_keyFnc","_keyAccess"]; + if(_keycode isEqualTo _KeyDownID && _keyshift isEqualTo _KeyDownShift && _keyctrl isEqualTo _KeyDownCtrl && _keyalt isEqualTo _KeyDownAlt)then + { + if(_keyFnc isEqualType "")then{ _keyFnc = missionNamespace getVariable [_keyFnc,{}]; }; + if(call _keyAccess)then{call _keyFnc;_handle=true;}; + }; + } forEach infiSTAR_keyBinds_array; + }; + infiSTAR_keyBinds_pressed = _handle; + false +}; +if(!isNil "infiSTAR_keyBinds_startThread")then{terminate infiSTAR_keyBinds_startThread;}; +infiSTAR_keyBinds_startThread = [] spawn { + waitUntil { + uiSleep 1; + if(!isNil "infiSTAR_keyBinds_KeyUp_ID")then{(findDisplay 46) displayRemoveEventHandler ["KeyUp",infiSTAR_keyBinds_KeyUp_ID];}; + if(!isNil "infiSTAR_keyBinds_KeyDown_ID")then{(findDisplay 46) displayRemoveEventHandler ["KeyDown",infiSTAR_keyBinds_KeyDown_ID];}; + infiSTAR_keyBinds_KeyDown_ID = (finddisplay 46) displayAddEventHandler ["KeyDown",{ call fn_infiSTAR_keyBinds_KeyDown }]; + !isNil "infiSTAR_keyBinds_pressed" + }; +}; diff --git a/@ExileServer/armalog.dll b/@ExileServer/armalog.dll new file mode 100644 index 0000000..bca53d1 Binary files /dev/null and b/@ExileServer/armalog.dll differ diff --git a/@ExileServer/armalog_x64.dll b/@ExileServer/armalog_x64.dll new file mode 100644 index 0000000..cb4bf4b Binary files /dev/null and b/@ExileServer/armalog_x64.dll differ diff --git a/@ExileServer/config.cfg b/@ExileServer/config.cfg index 7754840..17b2fcb 100644 --- a/@ExileServer/config.cfg +++ b/@ExileServer/config.cfg @@ -30,6 +30,10 @@ onHackedData = "kick (_this select 0)"; onDifferentData = "kick (_this select 0)"; motd[] = {"Welcome to Z's Exile", "Enjoy your stay!" }; +localClient[]={127.0.0.1}; +headlessClients[] = {"127.0.0.1"}; +battleyeLicense=1; + class Missions { class Exile diff --git a/@ExileServer/extDB/sql_custom_v2/exile.ini b/@ExileServer/extDB/sql_custom_v2/exile.ini index 0efd81b..fb2be6f 100644 --- a/@ExileServer/extDB/sql_custom_v2/exile.ini +++ b/@ExileServer/extDB/sql_custom_v2/exile.ini @@ -693,4 +693,29 @@ SQL1_INPUTS = 1 [setTerritoryNotified] SQL1_1 = UPDATE territory SET xm8_protectionmoney_notified = ? WHERE id = ? Number of Inputs = 2 -SQL1_INPUTS = 1,2 \ No newline at end of file +SQL1_INPUTS = 1,2 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; infiSTAR Logs +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[insert_infiSTARLog] +SQL1_1 = INSERT INTO infistar_logs SET servername = ?, logname = ?, logentry = ? +Number Of Inputs = 3 +SQL1_INPUTS = 1,2,3 + +[getTotalConnections] +SQL1_1 = SELECT first_connect_at,last_connect_at,total_connections FROM account WHERE uid = ? +Number Of Inputs = 1 +SQL1_INPUTS = 1 +OUTPUT = 1 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; infiSTAR WhiteList +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[getAccountWhitelisted] +SQL1_1 = SELECT whitelisted FROM account WHERE uid = ? +Number Of Inputs = 1 +SQL1_INPUTS = 1 +OUTPUT = 1 \ No newline at end of file diff --git a/@ExileServer/updatearmalog.dll b/@ExileServer/updatearmalog.dll new file mode 100644 index 0000000..ec7f412 Binary files /dev/null and b/@ExileServer/updatearmalog.dll differ diff --git a/@ExileServer/updatearmalog_x64.dll b/@ExileServer/updatearmalog_x64.dll new file mode 100644 index 0000000..cf82653 Binary files /dev/null and b/@ExileServer/updatearmalog_x64.dll differ diff --git a/Exile Auto Start.bat b/Exile Auto Start.bat index 7ef80bc..6eaa879 100644 --- a/Exile Auto Start.bat +++ b/Exile Auto Start.bat @@ -8,8 +8,8 @@ echo Launching Server F: cd %ARMA% echo Exile Server Monitor... Active ! -start "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;" "-servermod=@exileserver;@asm;@marma;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages -REM start "Arma3_HC" arma3server_HC.exe -client -connect=127.0.0.1 -password=joejer "-mod=@exile;Kart;Mark;Heli;@A3XAI_HC;@asm;" -profiles=HC -name=HC -hugepages +start "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;" "-servermod=@exileserver;@asm;@marma;@A3XAI;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages +start "Arma3_HC" arma3server_HC.exe -client -connect=127.0.0.1 -password=joejer "-mod=@exile;Kart;Mark;Heli;@A3XAI_HC;@asm;" -profiles=HC -name=HC REM ping 127.0.0.1 -n 15 >NUL REM echo Exile Server Shutdown ... Restarting! diff --git a/OpenRecentLog.bat b/OpenRecentLog.bat index d4a567a..faa734b 100644 --- a/OpenRecentLog.bat +++ b/OpenRecentLog.bat @@ -1,3 +1,6 @@ @echo off for /f "delims=" %%x in ('dir /od /a-d /b F:\Arma3\Arma3_Server\SC\*.rpt') do set recent=%%x -start "" "C:\Program Files (x86)\Notepad++\notepad++.exe" "F:\Arma3\Arma3_Server\SC\%recent%" \ No newline at end of file +start "" "C:\Program Files (x86)\Notepad++\notepad++.exe" "F:\Arma3\Arma3_Server\SC\%recent%" + +for /f "delims=" %%x in ('dir /od /a-d /b F:\Arma3\Arma3_Server\HC\*.rpt') do set recent=%%x +start "" "C:\Program Files (x86)\Notepad++\notepad++.exe" "F:\Arma3\Arma3_Server\HC\%recent%" \ No newline at end of file diff --git a/Re-PBO.bat b/Re-PBO.bat index 0bc920e..931b80b 100644 --- a/Re-PBO.bat +++ b/Re-PBO.bat @@ -8,8 +8,8 @@ pboconsole -pack F:\Arma3\arma3_server\mpmissions\Exile.Altis F:\Arma3\arma3_ser pboconsole -pack F:\Arma3\arma3_server\@ExileServer\addons\exile_server_config F:\Arma3\arma3_server\@ExileServer\addons\exile_server_config.pbo pboconsole -pack F:\Arma3\arma3_server\@ExileServer\addons\a3_dms F:\Arma3\arma3_server\@ExileServer\addons\a3_dms.pbo pboconsole -pack F:\Arma3\arma3_server\@ExileServer\addons\a3_exile_occupation F:\Arma3\arma3_server\@ExileServer\addons\a3_exile_occupation.pbo -REM pboconsole -pack F:\Arma3\arma3_server\@ExileServer\addons\a3_iniSTAR_Exile F:\Arma3\arma3_server\@ExileServer\addons\a3_infiSTAR_Exile.pbo -REM pboconsole -pack F:\Arma3\arma3_server\@A3XAI\addons\a3xai_config F:\Arma3\arma3_server\@A3XAI\addons\a3xai_config.pbo +pboconsole -pack F:\Arma3\arma3_server\@ExileServer\addons\a3_iniSTAR_Exile F:\Arma3\arma3_server\@ExileServer\addons\a3_infiSTAR_Exile.pbo +pboconsole -pack F:\Arma3\arma3_server\@A3XAI\addons\a3xai_config F:\Arma3\arma3_server\@A3XAI\addons\a3xai_config.pbo diff --git a/keys/a3xai.bikey b/keys/a3xai.bikey new file mode 100644 index 0000000..a7bd534 Binary files /dev/null and b/keys/a3xai.bikey differ diff --git a/mpmissions/Exile.Altis.pbo b/mpmissions/Exile.Altis.pbo index 9c4c0e6..6991bbd 100644 Binary files a/mpmissions/Exile.Altis.pbo and b/mpmissions/Exile.Altis.pbo differ diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_killMessage.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_killMessage.sqf new file mode 100644 index 0000000..8acbace --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_killMessage.sqf @@ -0,0 +1,12 @@ + +_message = _this; +if ((typeName _message) isEqualTo "STRING") then { + systemChat _message; + if (A3XAIC_deathMessageSound) then { + playsound "AddItemOK"; + }; +} else { + diag_log format ["A3XAI Error: Kill message is non-string: %1",_message]; +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_radioMessage.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_radioMessage.sqf new file mode 100644 index 0000000..24ccf18 --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_code/A3XAI_client_radioMessage.sqf @@ -0,0 +1,32 @@ +private ["_dialogueType", "_dialogueParams", "_paramCount", "_dialogueTextTemplate", "_dialogueTextFormat"]; + +_dialogueType = _this select 0; +_dialogueParams = _this select 1; + +if (((diag_tickTime - (missionNamespace getVariable ["A3XAI_client_lastRadioMessage",-10])) > 10) or {_dialogueType in [20,30,31,32,33,34,35,41,42,43,44,45,51,52,53,54,55]}) then { + _paramCount = (count _dialogueParams); + _dialogueTextTemplate = missionNamespace getVariable [format ["A3XAI_client_radioMessage%1",_dialogueType],""]; + _dialogueTextFormat = call { + if (_paramCount isEqualTo 0) exitWith { + _dialogueTextTemplate + }; + if (_paramCount isEqualTo 1) exitWith { + format [_dialogueTextTemplate,_dialogueParams select 0] + }; + if (_paramCount isEqualTo 2) exitWith { + format [_dialogueTextTemplate,_dialogueParams select 0,_dialogueParams select 1] + }; + "" + }; + if !(_dialogueTextFormat isEqualTo "") then { + systemChat _dialogueTextFormat; + if (A3XAI_client_radioSounds) then { + playSound [format ["UAV_0%1",(floor (random 5) + 1)],false]; + }; + A3XAI_client_lastRadioMessage = diag_tickTime; + } else { + diag_log format ["A3XAI Error: %1 was given blank string. (%2)",__FILE__,_this]; + }; +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_config.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_config.sqf new file mode 100644 index 0000000..31dc886 --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_config.sqf @@ -0,0 +1,59 @@ +/* + A3XAI Client-side Addon Configuration File + +*/ + + +/* A3XAI Client Addon Settings +--------------------------------------------------------------------------------------------------------------------*/ + +//Enables use of client-side radio functions. A3XAI_radioMsgs must be set 'true' in A3XAI_config.sqf. +A3XAI_client_radio = true; + +//Enables sound notifications when displaying radio messages +A3XAI_client_radioSounds = true; + + +/* A3XAI Text String Settings +--------------------------------------------------------------------------------------------------------------------*/ + +//AI radio static message +A3XAI_client_radioMessage0 = "[RADIO] Your radio is picking up a signal nearby."; //Message displayed when radio sound transmitted without AI dialogue. + +//AI radio messages (AI-killer dialogue) +A3XAI_client_radioMessage1 = "[RADIO] %1: %2 is in this area. Stay on alert!"; //%1: AI leader name, %2: Target player name +A3XAI_client_radioMessage2 = "[RADIO] %1: Target looks like a %2. Find them!"; //%1: AI leader name, %2: Target player type +A3XAI_client_radioMessage3 = "[RADIO] %1: Target's range is about %2 meters. Move in on that position!"; //%1: AI leader name, %2: Target player distance +A3XAI_client_radioMessage4 = "[RADIO] %1: Lost contact with target. Breaking off pursuit."; //%1: AI leader name +A3XAI_client_radioMessage5 = "[RADIO] %1: Target has been eliminated."; //%1: AI leader name + +//AI radio messages (Dynamic AI hunter dialogue) +A3XAI_client_radioMessage11 = "[RADIO] %1: %2 is somewhere in this location. Search the area!"; //%1: AI leader name, %2: Target player name +A3XAI_client_radioMessage12 = "[RADIO] %1: Target is a %2. Stay on alert!"; //%1: AI leader name, %2: Target player type +A3XAI_client_radioMessage13 = "[RADIO] %1: Target's distance is %2 meters. Move in to intercept!"; //%1: AI leader name, %2: Target player distance +A3XAI_client_radioMessage14 = "[RADIO] %1: We've lost contact with the target. Let's move out."; //%1: AI leader name +A3XAI_client_radioMessage15 = "[RADIO] %1: The target has been killed."; //%1: AI leader name + +//AI air patrol reinforcement warning message +A3XAI_client_radioMessage20 = "Warning: Hostile %1 inbound."; //%1: Air vehicle type + +//AI air patrol dialogue. Displayed when player is detected by air patrol. +A3XAI_client_radioMessage31 = "[RADIO] %1: Target spotted below. Engaging."; //%1: AI leader name +A3XAI_client_radioMessage32 = "[RADIO] %1: We've arrived at the location. Moving in on the target."; //%1: AI leader name +A3XAI_client_radioMessage33 = "[RADIO] %1: Thats's the one we're looking for. Take him out."; //%1: AI leader name +A3XAI_client_radioMessage34 = "[RADIO] %1: Located the target. Let's take him out."; //%1: AI leader name +A3XAI_client_radioMessage35 = "[RADIO] %1: Priority target confirmed. Proceeding to engage."; //%1: AI leader name + +//UAV patrol dialogue. Displayed when player is detected. +A3XAI_client_radioMessage41 = "[RADIO] %1 %2: Targets detected. Relaying position data."; //%1: UAV Group, %2: UAV Type +A3XAI_client_radioMessage42 = "[RADIO] %1 %2: Targets found at destination coordinates."; //%1: UAV Group, %2: UAV Type +A3XAI_client_radioMessage43 = "[RADIO] %1 %2: Movement detected. Targets selected."; //%1: UAV Group, %2: UAV Type +A3XAI_client_radioMessage44 = "[RADIO] %1 %2: Heat signatures confirmed. Designating targets."; //%1: UAV Group, %2: UAV Type +A3XAI_client_radioMessage45 = "[RADIO] %1 %2: Priority target located. Redirecting armed forces to target location."; //%1: UAV Group, %2: UAV Type + +//UGV patrol dialogue. Displayed when player is detected. +A3XAI_client_radioMessage51 = "[RADIO] %1 %2: Targets detected. Relaying position data."; //%1: UGV Group, %2: UGV Type +A3XAI_client_radioMessage52 = "[RADIO] %1 %2: Targets found at destination coordinates."; //%1: UGV Group, %2: UGV Type +A3XAI_client_radioMessage53 = "[RADIO] %1 %2: Movement detected. Targets selected."; //%1: UGV Group, %2: UGV Type +A3XAI_client_radioMessage54 = "[RADIO] %1 %2: Heat signatures confirmed. Designating targets."; ///%1: UGV Group, %2: UGV Type +A3XAI_client_radioMessage55 = "[RADIO] %1 %2: Priority target located. Redirecting armed forces to target location."; //%1: UGV Group, %2: UGV Type diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_functions.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_functions.sqf new file mode 100644 index 0000000..c32bb13 --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_functions.sqf @@ -0,0 +1,2 @@ +A3XAI_client_radioMessage = compileFinal preprocessFileLineNumbers "A3XAI_Client\A3XAI_client_code\A3XAI_client_radioMessage.sqf"; +//A3XAI_client_killMessage = compileFinal preprocessFileLineNumbers "A3XAI_Client\A3XAI_client_code\A3XAI_client_killMessage.sqf"; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_verifySettings.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_verifySettings.sqf new file mode 100644 index 0000000..a08a3c3 --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_verifySettings.sqf @@ -0,0 +1,44 @@ +_startTime = diag_tickTime; + +//Check value types +{ + _value = missionNamespace getVariable (_x select 0); + if ((isNil "_value") or {(typeName _value) != (typeName (_x select 1))}) then { + missionNamespace setVariable [(_x select 0),(_x select 1)]; + diag_log format ["[A3XAI] Error found in variable %1, resetting to default value.",(_x select 0)]; + }; +} forEach [ + ["A3XAI_client_radio",true], + ["A3XAI_client_radioSounds",true], + //["A3XAI_client_deathMessages",true], + //["A3XAI_client_deathMessageSound",true], + ["A3XAI_client_radioMessage0","[RADIO] Your radio is picking up a signal nearby."], + ["A3XAI_client_radioMessage1","[RADIO] %1: %2 is in this area. Stay on alert!"], + ["A3XAI_client_radioMessage2","[RADIO] %1: Target looks like a %2. Find them!"], + ["A3XAI_client_radioMessage3","[RADIO] %1: Target's range is about %2 meters. Move in on that position!"], + ["A3XAI_client_radioMessage4","[RADIO] %1: Lost contact with target. Breaking off pursuit."], + ["A3XAI_client_radioMessage5","[RADIO] %1: Target has been eliminated."], + ["A3XAI_client_radioMessage11","[RADIO] %1: %2 is somewhere in this location. Search the area!"], + ["A3XAI_client_radioMessage12","[RADIO] %1: Target is a %2. Stay on alert!"], + ["A3XAI_client_radioMessage13","[RADIO] %1: Target's distance is %2 meters. Move in to intercept!"], + ["A3XAI_client_radioMessage14","[RADIO] %1: We've lost contact with the target. Let's move out."], + ["A3XAI_client_radioMessage15","[RADIO] %1: The target has been killed."], + ["A3XAI_client_radioMessage20","Warning: Hostile %1 inbound."], + ["A3XAI_client_radioMessage31","[RADIO] %1: Target spotted below. Engaging."], + ["A3XAI_client_radioMessage32","[RADIO] %1: We've arrived at the location. Moving in on the target."], + ["A3XAI_client_radioMessage33","[RADIO] %1: Thats's the one we're looking for. Take him out."], + ["A3XAI_client_radioMessage34","[RADIO] %1: Located the target. Let's take him out."], + ["A3XAI_client_radioMessage35","[RADIO] %1: Priority target confirmed. Proceeding to engage."], + ["A3XAI_client_radioMessage41","[RADIO] %1 %2: Targets detected. Relaying position data."], + ["A3XAI_client_radioMessage42","[RADIO] %1 %2: Targets found at destination coordinates."], + ["A3XAI_client_radioMessage43","[RADIO] %1 %2: Movement detected. Targets selected."], + ["A3XAI_client_radioMessage44","[RADIO] %1 %2: Heat signatures confirmed. Designating targets."], + ["A3XAI_client_radioMessage45","[RADIO] %1 %2: Priority target located. Redirecting armed forces to target location."], + ["A3XAI_client_radioMessage51","[RADIO] %1 %2: Targets detected. Relaying position data."], + ["A3XAI_client_radioMessage52","[RADIO] %1 %2: Targets found at destination coordinates."], + ["A3XAI_client_radioMessage53","[RADIO] %1 %2: Movement detected. Targets selected."], + ["A3XAI_client_radioMessage54","[RADIO] %1 %2: Heat signatures confirmed. Designating targets."], + ["A3XAI_client_radioMessage55","[RADIO] %1 %2: Priority target located. Redirecting armed forces to target location."] +]; + +diag_log format ["[A3XAI] Verified all A3XAI settings in %1 seconds.",(diag_tickTime - _startTime)]; diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_version.txt b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_version.txt new file mode 100644 index 0000000..9dc582f --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_client_version.txt @@ -0,0 +1,6 @@ +/* + A3XAI Version Identifier File +*/ + +#define A3XAI_CLIENT_TYPE "A3XAI Client Addon" +#define A3XAI_CLIENT_VERSION "0.0.0" diff --git a/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_initclient.sqf b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_initclient.sqf new file mode 100644 index 0000000..4ee42bc --- /dev/null +++ b/mpmissions/Exile.Altis/A3XAI_Client/A3XAI_initclient.sqf @@ -0,0 +1,25 @@ +if (hasInterface) then { + _nul = [] spawn { + waitUntil {uiSleep 1; alive player}; + waitUntil {uiSleep 1; (typeOf player) isEqualTo "Exile_Unit_Player"}; + #include "A3XAI_client_version.txt" + + call compile preprocessFileLineNumbers "A3XAI_Client\A3XAI_client_config.sqf"; + call compile preprocessFileLineNumbers "A3XAI_Client\A3XAI_client_verifySettings.sqf"; + call compile preprocessFileLineNumbers "A3XAI_Client\A3XAI_client_functions.sqf"; + + if (A3XAI_client_radio) then { + "A3XAI_SMS" addPublicVariableEventHandler {(_this select 1) call A3XAI_client_radioMessage; diag_log _this;}; + }; + + //No longer needed, A3XAI sends kill messages through Exile's messaging system nonglobally. + /* + if (A3XAI_client_deathMessages) then { + "A3XAI_killMSG" addPublicVariableEventHandler {(_this select 1) call A3XAI_client_killMessage; diag_log _this;}; + }; + */ + + diag_log format ["[A3XAI] Initialized %1 version %2. Radio enabled: %3.",A3XAI_CLIENT_TYPE,A3XAI_CLIENT_VERSION,A3XAI_client_radio]; + }; + +}; diff --git a/mpmissions/Exile.Altis/CfgExileCustomCode.cpp b/mpmissions/Exile.Altis/CfgExileCustomCode.cpp index ce086e8..723b049 100644 --- a/mpmissions/Exile.Altis/CfgExileCustomCode.cpp +++ b/mpmissions/Exile.Altis/CfgExileCustomCode.cpp @@ -1,7 +1,4 @@ /* -//Exile Loot Drop DLL -ExileServer_system_lootManager_dropItem = "\ExileLootDrop\ExileServer_system_lootManager_dropItem.sqf"; -ExileServer_system_lootManager_spawnLootInBuilding = "\ExileLootDrop\ExileServer_system_lootManager_spawnLootInBuilding.sqf"; //ExAd ExileClient_gui_xm8_slide = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_slide.sqf"; @@ -52,3 +49,7 @@ ExileServer_world_spawnVehicles="custom\addItemsToVehicles\ExileServer_world_spa */ //RCON FIX Logs server uptime and time till restart ExileServer_system_rcon_thread_check="custom\fixes\ExileServer_system_rcon_thread_check.sqf"; + +//Exile Loot Drop DLL +ExileServer_system_lootManager_dropItem = "\ExileLootDrop\ExileServer_system_lootManager_dropItem.sqf"; +ExileServer_system_lootManager_spawnLootInBuilding = "\ExileLootDrop\ExileServer_system_lootManager_spawnLootInBuilding.sqf"; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp new file mode 100644 index 0000000..5facf6f --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp @@ -0,0 +1,31 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class ExAd +{ + tag = "ExAd"; + #include "Core\CfgFunctions.cpp" + #include "VirtualGarage\CfgFunctions.cpp" + //#include "AdminEvents\CfgFunctions.cpp" + //#include "Hacking\CfgFunctions.cpp" + //#include "Grinding\CfgFunctions.cpp" + #include "HaloParachute\CfgFunctions.cpp" + #include "XM8\CfgFunctions.cpp" + #include "StatsBar\CfgFunctions.cpp" +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/CfgHints.cpp b/mpmissions/Exile.Altis/ExAdClient/CfgHints.cpp new file mode 100644 index 0000000..dc6d0d2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/CfgHints.cpp @@ -0,0 +1,22 @@ +/* + CfgHints.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +class ExAd +{ + displayName = "ExAd Virtual Garage"; + #include "VirtualGarage\CfgHints.cpp" +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/CfgNetworkMessages.cpp b/mpmissions/Exile.Altis/ExAdClient/CfgNetworkMessages.cpp new file mode 100644 index 0000000..f0f965b --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/CfgNetworkMessages.cpp @@ -0,0 +1,20 @@ +/* + CfgNetworkMessages.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +#include "Core\CfgNetworkMessages.cpp" \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/Core/CfgFunctions.cpp new file mode 100644 index 0000000..3c8a9de --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/CfgFunctions.cpp @@ -0,0 +1,34 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +class System +{ +file = "ExAdClient\Core\Functions\System"; + class debugHandler {}; + class serverDispatch {}; + class incomingRequest {}; + class changeable {file = "ExAdClient\Core\postInit.sqf"; postInit = 1;}; +}; +class Utilities +{ + file = "ExAdClient\Core\Functions\Utils"; + class advancedHint {}; + class call {}; + class getNearByLocalVeh {}; + class localize {}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/CfgNetworkMessages.cpp b/mpmissions/Exile.Altis/ExAdClient/Core/CfgNetworkMessages.cpp new file mode 100644 index 0000000..710e7c3 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/CfgNetworkMessages.cpp @@ -0,0 +1,27 @@ +/* + CfgNetworkMessages.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class AdvancedHint +{ + parameters[] = {"STRING","ARRAY"}; +}; +class Call +{ + parameters[] = {"CODE"}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_debugHandler.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_debugHandler.sqf new file mode 100644 index 0000000..b4657b2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_debugHandler.sqf @@ -0,0 +1,22 @@ +/* + fn_debugHandler.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params ["_fnc","_exception"]; + +if(ExAd_Debug)then{ + diag_log format["ExAd%3 Debugger: Error in %1 - '%2'",_fnc, _exception, (if(isDedicated)then{"Server"}else{""})] +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_incomingRequest.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_incomingRequest.sqf new file mode 100644 index 0000000..4729b6f --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_incomingRequest.sqf @@ -0,0 +1 @@ +/** * fn_incomingRequest.sqf * Modified by Jan Babor 2016 * * Originally * ExileClient_system_network_dispatchIncomingMessage * * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"]; _payload = _this; try { if (isNil "_payload") then { throw "Message payload is not defined!"; }; if (typeName _payload != "ARRAY") then { throw "Message payload is not a array!"; }; if (count _payload != 2) then { throw format ["Wrong envelope field count! Payload: %1", _payload]; }; _messageName = _payload select 0; _messageParameters = _payload select 1; if !(isClass (missionConfigFile >> "CfgNetworkMessages" >> _messageName)) then { throw format ["Forbidden message name! Payload: %1", _payload]; }; _allowedParameters = getArray(missionConfigFile >> "CfgNetworkMessages" >> _messageName >> "parameters"); if (count _messageParameters != count _allowedParameters) then { throw format ["Parameter count mismatch! Payload: %1", _payload]; }; { if (_x != typeName (_messageParameters select _forEachIndex)) then { throw format ["Parameter type mismatch! Payload: %1", _payload]; }; } forEach _allowedParameters; diag_log format["Dispatching message '%1'...", _messageName]; call compile format["_messageParameters call ExAd_fnc_%1;",_messageName]; } catch { ["incomingRequest",_exception] call ExAd_fnc_debugHandler; }; true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_serverDispatch.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_serverDispatch.sqf new file mode 100644 index 0000000..72a0e8a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/System/fn_serverDispatch.sqf @@ -0,0 +1,21 @@ +/* + fn_serverDispatch.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +_this remoteExec ["ExAdServer_fnc_clientRequest",2]; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_advancedHint.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_advancedHint.sqf new file mode 100644 index 0000000..c95fdc2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_advancedHint.sqf @@ -0,0 +1 @@ +/** * fn_advancedHint.sqf * Modified by Jan Babor 2016 * * Originally * ExileClient_system_network_dispatchIncomingMessage * * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private ["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"]; _payload = _this; try { if(isNil "_payload")then{ throw "Message payload is not defined!" }; if (typeName _payload != "ARRAY") then { throw "Message payload is not a array!"; }; if (count _payload != 2) then { throw format ["Wrong envelope field count! Payload: %1", _payload]; }; _messageName = _payload select 0; _messageParameters = _payload select 1; if !(isClass (missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName)) then { throw format ["Forbidden Hint Class! Payload: %1", _payload]; }; _allowedParameters = getArray(missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName >> "parameters"); if (count _messageParameters != count _allowedParameters) then { throw format ["Parameter count mismatch! Payload: %1", _payload]; }; { if (_x != typeName (_messageParameters select _forEachIndex)) then { throw format ["Parameter type mismatch! Payload: %1", _payload]; }; } forEach _allowedParameters; missionNamespace setVariable [_messageName,_messageParameters]; [["ExAd",_messageName]] call BIS_fnc_advHint; } catch { ["advancedHint",_exception] call ExAd_fnc_debugHandler; }; true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_call.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_call.sqf new file mode 100644 index 0000000..2e83696 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_call.sqf @@ -0,0 +1 @@ +/* fn_call.sqf Copyright 2016 Jan Babor Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ params ["_code"]; call _code; true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_getNearByLocalVeh.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_getNearByLocalVeh.sqf new file mode 100644 index 0000000..3541b9a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_getNearByLocalVeh.sqf @@ -0,0 +1 @@ +/* fn_getNearByLocalVeh.sqf Copyright 2016 Jan Babor Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ private ["_obj","_cat","_nearDist","_list"]; _obj = [_this,0,objNull] call BIS_fnc_param; _cat = [_this,1,["Car"],[[]]] call BIS_fnc_param; _nearDist = [_this,2,100,[0]] call BIS_fnc_param; _list = []; { if(local _x)then{ _list pushBack _x } }forEach nearestObjects [_obj,_cat,_nearDist]; _list \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_localize.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_localize.sqf new file mode 100644 index 0000000..1f4d718 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/Functions/Utils/fn_localize.sqf @@ -0,0 +1 @@ +/* fn_localize.sqf Copyright 2016 Jan Babor Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ params [ ["_key", "", [""]], ["_value","N/A",[""]] ]; if(count _key == 0)exitWith{["localize", "_key is undefined/empty"] call ExAd_fnc_DebugHandler}; call compile format['%1 = if(isLocalized "%1")then{localize "%1"}else{"%2"};', _key, _value]; true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_128.paa b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_128.paa new file mode 100644 index 0000000..02940cd Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_128.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_256.paa b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_256.paa new file mode 100644 index 0000000..0f24a60 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_256.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_512.paa b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_512.paa new file mode 100644 index 0000000..82e1ae0 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_512.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_64.paa b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_64.paa new file mode 100644 index 0000000..9634d6c Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Core/Img/exad_logo_64.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/Img/logo.paa b/mpmissions/Exile.Altis/ExAdClient/Core/Img/logo.paa new file mode 100644 index 0000000..779971f Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Core/Img/logo.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/customize.sqf new file mode 100644 index 0000000..6e0f6e0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/customize.sqf @@ -0,0 +1,29 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_Debug = true; //BOOLEAN - If you want the ExAd code to generate debug logs +Exad_Logging = true; //BOOLEAN - If you want the ExAd code to generate extra logs. - Requires InfiStar installed +ExAd_Log_Folder = "ExAd_Logs"; //STRING - The folder ExAd writes logs to. You need to create the defined folder if it doesn't exist. If you don't create it - the DLL won't be able to write any Log files + +ExAd_Hint_Title_Color = "#E48A36"; //STRING - Hint message color +ExAd_Hint_Title_Size = 1.5; //SCALAR - Hint title size +ExAd_Hint_Title_Font = "TahomaB"; //STRING - Hint title font + +ExAd_Hint_Msg_Color = "#ffffff"; //STRING - Hint message color +ExAd_Hint_Msg_Size = 1; //SCALAR - Hint message size +ExAd_Hint_Msg_Font = "TahomaB"; //STRING - Hint message font diff --git a/mpmissions/Exile.Altis/ExAdClient/Core/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/Core/postInit.sqf new file mode 100644 index 0000000..9fb29ca --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Core/postInit.sqf @@ -0,0 +1,38 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +_path = "ExAdClient\Core\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +if(isNil "ExAd_Debug")then{ExAd_Debug = true;}; +if(isNil "ExAd_Logging")then{ExAd_Logging = true;}; +if(isDedicated)then{ + if(!isClass(ConfigFile >> "CfgPatches" >> "a3_infiSTAR_Exile"))then{ + ExAd_Logging = false; + ["Core/postInit","Server can't find InfiStar addon"] call ExAd_fnc_debugHandler + } +}; +if(isNil "ExAd_Log_Folder")then{ExAd_Log_Folder = "ExAd_Logs";}; + +if(isNil "ExAd_Hint_Title_Color")then{ExAd_Hint_Title_Color = "#E48A36";}; +if(isNil "ExAd_Hint_Title_Size")then{ExAd_Hint_Title_Size = 1.5;}; +if(isNil "ExAd_Hint_Title_Font")then{ExAd_Hint_Title_Font = "TahomaB";}; + +if(isNil "ExAd_Hint_Msg_Color")then{ExAd_Hint_Msg_Color = "#ffffff";}; +if(isNil "ExAd_Hint_Msg_Size")then{ExAd_Hint_Msg_Size = 1;}; +if(isNil "ExAd_Hint_Msg_Font")then{ExAd_Hint_Msg_Font = "TahomaB";}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/ExAd.cpp b/mpmissions/Exile.Altis/ExAdClient/ExAd.cpp new file mode 100644 index 0000000..4419982 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/ExAd.cpp @@ -0,0 +1,25 @@ +/* + ExAd.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +//#include "Core\ExAd.cpp" +//#include "VirtualGarage\ExAd.cpp" +//#include "AdminEvents\ExAd.cpp" +//#include "Hacking\ExAd.cpp" +//#include "Grinding\ExAd.cpp" +//#include "HaloParachute\ExAd.cpp" \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/Grinding/CfgFunctions.cpp new file mode 100644 index 0000000..aefaef1 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/CfgFunctions.cpp @@ -0,0 +1,28 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class Grinding +{ + file = "ExAdClient\Grinding\Functions"; + class canGrindLock {}; + class canRestoreLock {}; + class grindLock {}; + class restoreLock {}; + class postInitGrinding {file = "ExAdClient\Grinding\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canGrindLock.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canGrindLock.sqf new file mode 100644 index 0000000..3d44aac --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canGrindLock.sqf @@ -0,0 +1,19 @@ +/* + fn_canGrindLock.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +(((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo -1) && !ExAd_GRINDING && ('Exile_Item_Grinder' in (magazines player))) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canRestoreLock.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canRestoreLock.sqf new file mode 100644 index 0000000..694cb6b --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_canRestoreLock.sqf @@ -0,0 +1,19 @@ +/* + fn_canRestoreLock.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +(('Exile_Item_Codelock' in (magazines player)) && (ExileClientInteractionObject getVariable ['ExAd_Grinding_progress', 0] > 0) && (ExileClientInteractionObject getVariable ['ExAd_Grinding_progress', 0] < ExAd_GRINDING_OBJECT_MAX)) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_grindLock.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_grindLock.sqf new file mode 100644 index 0000000..ec341e4 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_grindLock.sqf @@ -0,0 +1,105 @@ +/* + fn_grindLock.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private ["_soundSrc","_ticker"]; + +if(vehicle player != player)exitWith{false}; + +ExAd_GRINDING_OBJECT = _this select 0; +ExAd_GRINDING = true; + +{ + ExileClientInteractionObject removeAction _x; +} +forEach ExileClientInteractionHandles; + +if(isClass(configFile >> "CfgVehicles" >> "Sound_Factory10")) then { + _soundSrc = createSoundSource ["Sound_Factory10", position ExAd_GRINDING_OBJECT, [], 0]; +}; +player playActionNow "medicStart"; + +ExAd_DRAW3D_HANDLER = addMissionEventHandler ["Draw3D", { + private ["_object","_progress"]; + + _height = ExAd_GRINDING_PROGRESSBAR_POS; + + _object = if(isNil "ExAd_GRINDING_OBJECT")then{ExileClientInteractionObject}else{ExAd_GRINDING_OBJECT}; + _progress = 1 min ((_object getVariable ["ExAd_Grinding_progress", 1]) / ExAd_GRINDING_OBJECT_MAX); + + drawLine3D [_object modelToWorld [-0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height], [0,0,0,1]]; + drawLine3D [_object modelToWorld [-0.5, -0.15, _height - 0.05], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]]; + drawLine3D [_object modelToWorld [-0.5, 0.15, _height], _object modelToWorld [0.5, 0.15, _height], [0,0,0,1]]; + drawLine3D [_object modelToWorld [-0.5, 0.15, _height - 0.05], _object modelToWorld [0.5, 0.15, _height - 0.05], [0,0,0,1]]; + + drawLine3D [_object modelToWorld [-0.5, -0.15, _height], _object modelToWorld [-0.5, -0.15, _height - 0.05], [0,0,0,1]]; + drawLine3D [_object modelToWorld [0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]]; + drawLine3D [_object modelToWorld [-0.5, 0.15, _height], _object modelToWorld [-0.5, 0.15, _height - 0.05], [0,0,0,1]]; + drawLine3D [_object modelToWorld [0.5, -0.15, _height], _object modelToWorld [0.5, -0.15, _height - 0.05], [0,0,0,1]]; + + for "_i" from 1 to 49 do { + drawLine3D [_object modelToWorld [-0.5, -0.15, _height - (0.001 * _i)], _object modelToWorld [((-0.5) + _progress), -0.15, _height - (0.001 * _i)], [1,0.482,0,1]]; + drawLine3D [_object modelToWorld [0.5, 0.15, _height - (0.001 * _i)], _object modelToWorld [((0.5) - _progress), 0.15, _height - (0.001 * _i)], [1,0.482,0,1]]; + + drawLine3D [_object modelToWorld [0.5, -0.15, _height - (0.001 * _i)], _object modelToWorld [((-0.5) + _progress), -0.15, _height - (0.001 * _i)], [0.55,0.55,0.55,1]]; + drawLine3D [_object modelToWorld [-0.5, 0.15, _height - (0.001 * _i)], _object modelToWorld [((0.5) - _progress), 0.15, _height - (0.001 * _i)], [0.55,0.55,0.55,1]]; + } +}]; + +_ticker = 1; +while{(ExAd_GRINDING_OBJECT == ExileClientInteractionObject) && ExAd_GRINDING}do{ + UISleep 1; + + if(random[0,50,100] < 1)exitWith{ + player removeItem "Exile_Item_Grinder"; + ["ErrorTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_BROKE]] call ExileClient_gui_toaster_addTemplateToast; + false + }; + + if!("Exile_Magazine_Battery" in (magazines player))exitWith{ + ["ErrorTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_EMPTY_BAT]] call ExileClient_gui_toaster_addTemplateToast; + false + }; + + if((_ticker % ExAd_GRINDING_PROGRESS_INTERVALL) == 0)then{ + player removeItem "Exile_Magazine_Battery"; + + ["grindProgress", [netId ExAd_GRINDING_OBJECT]] call ExAd_fnc_serverDispatch; + ["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_PROGRESS]] call ExileClient_gui_toaster_addTemplateToast; + + player playActionNow "medicStart"; + }; + + if(ExAd_GRINDING_OBJECT getVariable ["ExAd_Grinding_progress", 0] > ExAd_GRINDING_OBJECT_MAX)exitWith{ + UISleep 2; + ["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_FINISHED]] call ExileClient_gui_toaster_addTemplateToast; + ["grindProgress", [netId ExAd_GRINDING_OBJECT]] call ExAd_fnc_serverDispatch; + }; + _ticker = _ticker + 1; +}; + +if(isClass(configFile >> "CfgVehicles" >> "Sound_Factory10")) then { + deleteVehicle _soundSrc; +}; + +player playActionNow "medicStop"; +removeMissionEventHandler ["Draw3D",ExAd_DRAW3D_HANDLER]; + +ExAd_GRINDING_OBJECT = nil; +ExAd_GRINDING = false; +call ExileClient_gui_interactionMenu_unhook; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_restoreLock.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_restoreLock.sqf new file mode 100644 index 0000000..c53b564 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/Functions/fn_restoreLock.sqf @@ -0,0 +1,33 @@ +/* + fn_restoreLock.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_object"]; + +if(vehicle player != player)exitWith{false}; + +call ExileClient_gui_interactionMenu_unhook; +player playActionNow "medic"; + +UISleep 5; +player removeItem "Exile_Item_Codelock"; +["SuccessTitleAndText", ["ExAd - Grinding", STR_ExAd_GRINDING_NOTI_RESTORED]] call ExileClient_gui_toaster_addTemplateToast; + +["restoreLock", [netId _object]] call ExAd_fnc_serverDispatch; + +call ExileClient_gui_interactionMenu_unhook; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf new file mode 100644 index 0000000..14adcbc --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf @@ -0,0 +1,29 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_GRINDING_PROGRESS_INTERVALL = 5; //SCALAR - Grinding, interval time measured in seconds. + +ExAd_GRINDING_PROGRESS = 30; //SCALAR - Damage each finished interval will take from the code lock. + +ExAd_GRINDING_OBJECT_MAX = 300; //SCALAR - Code lock sustainability. + +ExAd_GRINDING_PROGRESSBAR_POS = "Mid"; //SCALAR/STRING - You can use values between 0.3-2 or using "LOW"|"MID"|"HIGH" + +/* +The default values above means that a full succesful grind will take (900 / 30) * 60 = 1800 = 20 minutes +*/ \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/postInit.sqf new file mode 100644 index 0000000..f9d8f77 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/postInit.sqf @@ -0,0 +1,47 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +_path = "ExAdClient\Grinding\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +if(isNil "ExAd_GRINDING_PROGRESS_INTERVALL")then{ExAd_GRINDING_PROGRESS_INTERVALL = 60;}; +if(isNil "ExAd_GRINDING_PROGRESS")then{ExAd_GRINDING_PROGRESS = 30;}; +if(isNil "ExAd_GRINDING_OBJECT_MAX")then{ExAd_GRINDING_OBJECT_MAX = 900;}; + +ExAd_GRINDING = false; + +["STR_ExAd_GRINDING_NOTI_BROKE", "Your grinder broke, get a new one before you can continue."] call ExAd_fnc_localize; +["STR_ExAd_GRINDING_NOTI_EMPTY_BAT", "Find some batteries to get the grinder to work."] call ExAd_fnc_localize; +["STR_ExAd_GRINDING_NOTI_PROGRESS", "Your grinder broke, get a new one before you can continue."] call ExAd_fnc_localize; +["STR_ExAd_GRINDING_NOTI_FINISHED", "You have broken the code lock."] call ExAd_fnc_localize; +["STR_ExAd_GRINDING_NOTI_RESTORED", "You've changed the look"] call ExAd_fnc_localize; + +ExAd_GRINDING_PROGRESSBAR_POS = if!(isNil "ExAd_GRINDING_PROGRESSBAR_POS")then{ + if(typeName ExAd_GRINDING_PROGRESSBAR_POS isEqualTo "SCALAR")then{ + ((2 min ExAd_GRINDING_PROGRESSBAR_POS) max 0.3) + }else{ + if(typeName ExAd_GRINDING_PROGRESSBAR_POS isEqualTo "STRING")then{ + switch (toLower ExAd_GRINDING_PROGRESSBAR_POS) do { + case "low": {0.3}; + case "mid": {1}; + case "high": {1.8}; + default {1}; + } + } else {1} + } +}else{1}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/Hacking/CfgFunctions.cpp new file mode 100644 index 0000000..c2fe63c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/CfgFunctions.cpp @@ -0,0 +1,28 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class Hacking +{ + file = "ExAdClient\Hacking\Functions"; + class canHackSafe {}; + class canHackVG {}; + class startHack {}; + class stopHack {}; + class postInitHacking {file = "ExAdClient\Hacking\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackSafe.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackSafe.sqf new file mode 100644 index 0000000..764cf96 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackSafe.sqf @@ -0,0 +1,18 @@ +/* + fn_canHackSafe.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +(('Exile_Item_Laptop' in (magazines player)) && ((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo -1) && (({alive _x}count allPlayers) >= ExAd_HACKING_MIN_PLAYERS_ONLINE)) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackVG.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackVG.sqf new file mode 100644 index 0000000..3e3e881 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_canHackVG.sqf @@ -0,0 +1,18 @@ +/* + fn_canHackVG.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +(('Exile_Item_Laptop' in (magazines player)) && ((([ExileClientInteractionObject, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) < ExAd_VG_ACCESS_LEVEL) && (({alive _x}count allPlayers) >= ExAd_HACKING_MIN_PLAYERS_ONLINE)) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_startHack.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_startHack.sqf new file mode 100644 index 0000000..0739f3e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_startHack.sqf @@ -0,0 +1,21 @@ +/* + fn_startHack.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +player playActionNow "SitDown"; + +["startHack", [netId (_this select 0), netId player]] call ExAd_fnc_serverDispatch; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_stopHack.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_stopHack.sqf new file mode 100644 index 0000000..da199c2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/Functions/fn_stopHack.sqf @@ -0,0 +1,18 @@ +/* + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +["stopHack", [netId (_this select 0)]] call ExAd_fnc_serverDispatch; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/customize.sqf new file mode 100644 index 0000000..4eb4a6c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/customize.sqf @@ -0,0 +1,35 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_HACKING_MIN_PLAYERS_ONLINE = 30; //SCALAR - Minimun allowed players online to initalize a hack. + +ExAd_HACKING_ALLOWED_HACKS = 1; //SCALAR - Simultaneous hacks allowed. + +ExAd_HACKING_MAX_TIME = 1200; //SCALAR - Time to complete a hack + +ExAd_HACKING_MAX_DISTANCE = 50; //SCALAR - Maximum distance away from the object being hack players for the hack to proceed. + +ExAd_HACKING_TERRITORY_MAX = 3; //SCALAR - Maximun times a territory can get hacked before a new restart. + +ExAd_HACKING_MARKER_COLOR = "ColorOrange"; //STRING - What color should the map marker have. + +ExAd_HACKING_MARKER_TITLE = "Hacker activity"; //STRING - What title should the map marker have. + +ExAd_HACKING_FAILED_HACK = 0.15; //SCALAR - 0-1 The possability for the hack to fail once finished. + +ExAd_HACKING_PLAYER_ONLINE = false; //BOLLEAN - True if a player with build permissions for a base needs to be online for a hack to be possible. \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Hacking/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/Hacking/postInit.sqf new file mode 100644 index 0000000..11e09c6 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Hacking/postInit.sqf @@ -0,0 +1,46 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +_path = "ExAdClient\Hacking\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +if(isNil "ExAd_HACKING_MIN_PLAYERS_ONLINE")then{ExAd_HACKING_MIN_PLAYERS_ONLINE = 30;}; +if(isNil "ExAd_HACKING_ALLOWED_HACKS")then{ExAd_HACKING_ALLOWED_HACKS = 1;}; +if(isNil "ExAd_HACKING_MAX_TIME")then{ExAd_HACKING_MAX_TIME = 1200;}; +if(isNil "ExAd_HACKING_MAX_DISTANCE")then{ExAd_HACKING_MAX_DISTANCE = 50;}; +if(isNil "ExAd_HACKING_TERRITORY_MAX")then{ExAd_HACKING_TERRITORY_MAX = 3;}; +if(isNil "ExAd_HACKING_MARKER_COLOR")then{ExAd_HACKING_MARKER_COLOR = "ColorOrange";}; +if(isNil "ExAd_HACKING_MARKER_TITLE")then{ExAd_HACKING_MARKER_TITLE = "Hacker activity";}; +if(isNil "ExAd_HACKING_FAILED_HACK")then{ExAd_HACKING_FAILED_HACK = 0.15;}; + +if(isNil "ExAd_VG_ACCESS_LEVEL")then{ExAd_VG_ACCESS_LEVEL = 1;}; + +if(isNil "ExAd_HACKING_FAILED_HACK")then{ExAd_VG_ACCESS_LEVEL = 1;}; /*Needs to be here if peolpe don't use the VirtualGarage*/ + +["STR_ExAd_HACKING_NOTI_MAX_TERRITORY_HACKS_REACHED", "Connection failed! Territory Wi-Fi is down!"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_TERRITORY_ONE_HACK", "Wi-Fi occupied!!"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_MAX_SIM_HACKS", "The laptop overloaded and got destroyed! Another hacker is already using the grid."] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_NO_PLAYER_PRESENT", "No Wi-Fi available!"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_HINT_TITLE", "Hack Activity"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_HINT_HACK_START", "A brute force hack is detected on the grid!"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_VG_SUCCESS", "Hack successful! The Virtual Garage unloaded a %1"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_VG_NO_VEH", "Hack successful! No vehicles were stored in the Virtual Garage."] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_SAFE_SUCCESS", "Hack successful! The safe is now unlocked."] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_INTERUPTED", "Hack has been interupted"] call ExAd_fnc_localize; +["STR_ExAd_HACKING_NOTI_FAILED", "Hack failed! Circuits overloaded!"] call ExAd_fnc_localize; diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp new file mode 100644 index 0000000..59fa7c5 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp @@ -0,0 +1,29 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class HaloParachute +{ + file = "ExAdClient\HaloParachute\Functions"; + class ejectPlayer {}; + class parachutesafemode {}; + class pullParachute {}; + class showEject {}; + class showParachute {}; + class postInitHP {file = "ExAdClient\HaloParachute\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_ejectPlayer.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_ejectPlayer.sqf new file mode 100644 index 0000000..db7d575 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_ejectPlayer.sqf @@ -0,0 +1,39 @@ +/* + fn_ejectPayer.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private ["_vehicleObj", "_push", "_vecDir"]; + +_vehicleObj = vehicle player; +if (_vehicleObj == player) exitWith {false}; + +moveOut player; + +_push = if (_vehicleObj isKindOf "Plane") then { + player setDir getDir _vehicleObj; + ((vectorUp _vehicleObj) vectorMultiply 40) +} else { + _vecDir = (getPosASL player) vectorDiff (getPosASL _vehicleObj); + (_vecDir vectorMultiply (5 / vectorMagnitude _vecDir)) +}; + +player setVelocity ((velocity player) vectorAdd _push); + +if(ExAd_HALOPARACHUTE_SAFE_MODE)then{ + ExAd_PARACHUTE_SAFE_THREAD = [0.1, ExAd_fnc_parachuteSafeMode, [], true] call ExileClient_system_thread_addtask; +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_parachuteSafeMode.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_parachuteSafeMode.sqf new file mode 100644 index 0000000..b2a4eac --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_parachuteSafeMode.sqf @@ -0,0 +1,21 @@ +/* + fn_parachuteSafeMode.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +if((getPosATL player) select 2 <= ExAd_ACTION_PARACHUTE_HEIGHT)then{ + call ExAd_fnc_pullParachute; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf new file mode 100644 index 0000000..7fc8b48 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf @@ -0,0 +1,47 @@ +/* + fn_pullParachute.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +private ["_parachuteObject"]; + +waitUntil {sleep 0.1; ({player distance _x < (10 max (sizeOf typeOf _x))} count (player nearEntities ["Air", 20])) == 0}; + +if (!alive player || vehicle player != player) exitWith {}; + +if(backpack player == "B_Parachute")then{removeBackpack player}; + +_parachuteObject = createVehicle ["Steerable_Parachute_F", getPosATL player, [], 0, "CAN_COLLIDE"]; +_parachuteObject setDir getDir player; + +_parachuteObject disableCollisionWith player; + +player action ["GetinDriver", _parachuteObject]; +player switchmove ""; +player switchmove "HaloFreeFall_non"; +player setVelocity [(sin (getDir player)) * 50, (cos (getDir player)) * 50, -5]; +ExileJobParachuteFix = [0.25, ExileClient_object_player_parachuteFix, [], true] call ExileClient_system_thread_addtask; + +if(ExAd_HALOPARACHUTE_SAFE_MODE)then{ + [ExAd_PARACHUTE_SAFE_THREAD] call ExileClient_system_thread_removeTask; +}; + +if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ + //hint localize "STR_ExAd_HALOPARACHUTE_INFO_DETACH" + [localize "STR_ExAd_HALOPARACHUTE_INFO_DETACH"] spawn ExileClient_gui_baguette_show; +}; + +true diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showEject.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showEject.sqf new file mode 100644 index 0000000..a7a03b7 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showEject.sqf @@ -0,0 +1,27 @@ +/* + fn_showEject.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +if(vehicle player == player)exitWith{false}; + +_condition = false; + +if((getPos player) select 2 > ExAd_ACTION_EJECT_HEIGHT)then{ + _role = assignedVehicleRole player; + _condition = if(count _role > 0)then{if(_role select 0 == "cargo")then{false}else{true}}else{true} +}; + +_condition \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showParachute.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showParachute.sqf new file mode 100644 index 0000000..1ff3877 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_showParachute.sqf @@ -0,0 +1,36 @@ +/* + fn_showParachute.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +if(vehicle player != player)exitWith{false}; + +if(backpack player == "B_Parachute")exitWith{false}; + +_condition = false; + +if((getPos player) select 2 > ExAd_ACTION_PARACHUTE_HEIGHT)then{ + _states = [ + "ladderriflestatic", + "ladderrifledownloop", + "ladderrifleuploop", + "laddercivilstatic", + "laddercivildownloop", + "ladderciviluploop" + ]; + _condition = !((animationState player) in _states); +}; + +_condition \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf new file mode 100644 index 0000000..1b15639 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf @@ -0,0 +1,24 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_HALOPARACHUTE_SAFE_MODE = false; //BOOLEAN - Force pull parachute when player reaches ExAd_ACTION_PARACHUTE_HEIGHT if they ejected from vehicle +ExAd_HALOPARACHUTE_USE_ACTIONS = true; //BOOLEAN - Allows player to eject from all vehicles with a pressed key combination 'Alt+Shift+V' +ExAd_HALOPARACHUTE_USE_KEY_ACTIONS = true; //BOOLEAN - Show addActions on the screen + +ExAd_ACTION_PARACHUTE_HEIGHT = 10; //SCALAR - What is the minimum altitude a player can pull a parachute. |RECOMMENDED 30 meters when safe_mode activated +ExAd_ACTION_EJECT_HEIGHT = 100; //SCALAR - What is the minimum altitude a player can Halo/Eject from a vehicle. diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf new file mode 100644 index 0000000..347f783 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf @@ -0,0 +1,67 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +_path = "ExAdClient\HaloParachute\customize.sqf"; +call compile preprocessFileLineNumbers _path; + + +if(isNil "ExAd_HALOPARACHUTE_SAFE_MODE")then{ExAd_HALOPARACHUTE_SAFE_MODE = false;}; +if(isNil "ExAd_HALOPARACHUTE_USE_ACTIONS")then{ExAd_HALOPARACHUTE_USE_ACTIONS = true;}; +if(isNil "ExAd_HALOPARACHUTE_USE_KEY_ACTIONS")then{ExAd_HALOPARACHUTE_USE_KEY_ACTIONS = true;}; +if(isNil "ExAd_ACTION_PARACHUTE_HEIGHT")then{ExAd_ACTION_PARACHUTE_HEIGHT = 10;}; +if(isNil "ExAd_ACTION_EJECT_HEIGHT")then{ExAd_ACTION_EJECT_HEIGHT = 0;}; + +[] spawn { + while {true} do { + waitUntil{!isNil "ExileClientLoadedIn"}; + UISleep 0.1; + waitUntil{ExileClientLoadedIn}; + UISleep 0.1; + waitUntil{alive player}; + + if(ExAd_HALOPARACHUTE_USE_ACTIONS)then{ + ExAd_ACTION_PARACHUTE = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_PARACHUTE"], {[] spawn ExAd_fnc_pullParachute}, [], 6, true, true, "", "call ExAd_fnc_showParachute"]; + ExAd_ACTION_EJECT = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_HALO"], {call ExAd_fnc_ejectPlayer}, [], 6, false, true, "", "call ExAd_fnc_showEject;"]; + }; + + if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ + ExAd_ACTION_HALOPARACHUTE_USE_KEY_ACTIONS = (findDisplay 46) displayAddEventHandler ["KeyDown",{ + if(_this select 1 == 47 && _this select 2 && _this select 4)then{ + if((getPos player) select 2 > ExAd_ACTION_EJECT_HEIGHT && vehicle player != player)then{ + call ExAd_fnc_ejectPlayer + }else{ + if(call ExAd_fnc_showParachute)then{ + [] spawn ExAd_fnc_pullParachute + } + } + } + }]; + }; + + waitUntil{!alive player}; + if(ExAd_HALOPARACHUTE_USE_ACTIONS)then{ + player removeAction ExAd_ACTION_PARACHUTE; + player removeAction ExAd_ACTION_EJECT; + }; + + if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ + (findDisplay 46) displayRemoveEventHandler ["KeyDown", ExAd_ACTION_HALOPARACHUTE_USE_KEY_ACTIONS]; + }; + }; +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/RscTitles.cpp b/mpmissions/Exile.Altis/ExAdClient/RscTitles.cpp new file mode 100644 index 0000000..ff8d62d --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/RscTitles.cpp @@ -0,0 +1,20 @@ +/* + RscTitles.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +#include "StatsBar\RscTitles.cpp" \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/Scratchie/CfgFunctions.cpp new file mode 100644 index 0000000..730682e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Scratchie/CfgFunctions.cpp @@ -0,0 +1,3 @@ +class Scratchie { + class postInitScratchie {file = "ExAdClient\Scratchie\postInit.sqf"; postInit = 1;}; +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-buy.paa b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-buy.paa new file mode 100644 index 0000000..ce9cac3 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-buy.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-prize.paa b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-prize.paa new file mode 100644 index 0000000..12b20bd Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie-prize.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie.paa b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie.paa new file mode 100644 index 0000000..791ee31 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/Scratchie/icons/scratchie.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onClose.sqf new file mode 100644 index 0000000..19b7e03 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onClose.sqf @@ -0,0 +1,4 @@ +if (ExileClientXM8CurrentSlide == "ExAd_Scratchie") then { + ExileClientXM8CurrentSlide = "apps"; +}; +ExAdCurFlagNetId = nil; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onLoad.sqf new file mode 100644 index 0000000..bd466e7 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onLoad.sqf @@ -0,0 +1,51 @@ +/* + onLoad.sqf + + Copyright 2017 ole + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 0; +_leftColW = 10; + +_margin = 0.02; + +_posX = _margin + _leftCol * _pW; + +_slideClass = "ExAd_Scratchie"; + +// fixing index issue from ExAd_fnc_getNextIDC and ExAd_fnc_getAppCtrl +[_slideClass,"dummy"] call ExAd_fnc_getNextIDC; + +[_display,_slide,([_slideClass,"InfoTitle"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 2.75 * _pH, 20 * _pW, 2 * _pH],"Counting Scratchies...","PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; +[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;','Back'] call ExAd_fnc_createButton; + +/* Buy button */ +[_display,_slide,([_slideClass,"picBuy"] call ExAd_fnc_getNextIDC),[_posX, 5 * _pH, _leftColW * _pW, 7 * _pH],"ExAdClient\Scratchie\icons\scratchie-buy.paa",[1,1,1,1],false,false,""] call ExAd_fnc_createPicture; +[_display,_slide,([_slideClass,"buyButton"] call ExAd_fnc_getNextIDC),[_posX, 12 * _pH, _leftColW*_pW, 1*_pH],"['buy',ExileClientSessionId, player, ''] remoteExecCall ['ExileServer_lottery_network_request', 2]; [] spawn Scratchie_UpdateCount;",'Buy Scratchie',""] call ExAd_fnc_createButton; + +/* Use button */ +_posX = _posX + _margin + _leftColW * _pW; +[_display,_slide,([_slideClass,"picUse"] call ExAd_fnc_getNextIDC),[_posX, 5 * _pH, _leftColW * _pW, 7 * _pH],"ExAdClient\Scratchie\icons\scratchie.paa",[1,1,1,1],false,false,""] call ExAd_fnc_createPicture; +[_display,_slide,([_slideClass,"useButton"] call ExAd_fnc_getNextIDC),[_posX, 12 * _pH, _leftColW * _pW, 1 * _pH],"['use',ExileClientSessionId, player, ''] remoteExecCall ['ExileServer_lottery_network_request', 2]; [] spawn Scratchie_UpdateCount;",'Use Scratchie',""] call ExAd_fnc_createButton; + +/* Get Prize button */ +_posX = _posX + _margin + _leftColW * _pW; +[_display,_slide,([_slideClass,"picPrize"] call ExAd_fnc_getNextIDC),[_posX, 5 * _pH, _leftColW * _pW, 7 * _pH],"ExAdClient\Scratchie\icons\scratchie-prize.paa",[1,1,1,1],false,false,""] call ExAd_fnc_createPicture; +[_display,_slide,([_slideClass,"useButton"] call ExAd_fnc_getNextIDC),[_posX, 12 * _pH, _leftColW * _pW, 1 * _pH],"['get',ExileClientSessionId, player, ''] remoteExecCall ['ExileServer_lottery_network_request', 2];",'Get Prize',""] call ExAd_fnc_createButton; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onOpen.sqf new file mode 100644 index 0000000..9e522a1 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Scratchie/onOpen.sqf @@ -0,0 +1,18 @@ +private ["_flags","_flag"]; + +try +{ + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + if(isNull _display)exitWith{ + throw "XM8 not loaded!"; + }; + + diag_log "Opening Scratchies slide"; + + [] spawn Scratchie_UpdateCount; +} +catch +{ + ["ErrorTitleAndText", ["ExAd - Scratchies", _exception]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/Scratchie/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/Scratchie/postInit.sqf new file mode 100644 index 0000000..c9931f0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/Scratchie/postInit.sqf @@ -0,0 +1,34 @@ +/* + postInit.sqf - Scratchie postInit used for ExAd + + Copyright 2017 - ole1986 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +if (isDedicated) exitWith {}; + +private _code = { + disableSerialization; + + private _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + private _ctrl = [_display,"ExAd_Scratchie","InfoTitle"] call ExAd_fnc_getAppCtrl; + + _ctrl ctrlSetStructuredText parseText "Counting Scratchies..."; + sleep 3; + _ctrl ctrlSetStructuredText parseText (format ["You have %1 Scratchies in your pocket", missionNamespace getVariable ["scratchieCount", 0]]); +}; + +missionNamespace setVariable ['Scratchie_UpdateCount', _code]; + +diag_log "Loaded Scratchie postInit"; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/StatsBar/CfgFunctions.cpp new file mode 100644 index 0000000..2b13ed8 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/CfgFunctions.cpp @@ -0,0 +1,49 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class StatsBar +{ + file = "ExAdClient\StatsBar\Functions"; + class formatNbrToPrefixStr {}; + class formatSBImage {}; + class formatSBOutput {}; + class getBankStr {}; + class getClanStr {}; + class getCompassStr {}; + class getFPSStr {}; + class getGridStr {}; + class getHPStr {}; + class getHungerStr {}; + class getKDStr {}; + class getPlayersStr {}; + class getRespectStr {}; + class getTempStr {}; + class getThirstStr {}; + class getTimerStr {}; + class getSBColor {}; + class getWalletStr {}; + class loadSB {}; + class sbPowerToggle {}; + class sbSave {}; + class sbStop {}; + class sbThread {}; + class toggleExileHUD {}; + class updateSB {}; + class postInitSB {file = "ExAdClient\StatsBar\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatNbrToPrefixStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatNbrToPrefixStr.sqf new file mode 100644 index 0000000..8ef6607 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatNbrToPrefixStr.sqf @@ -0,0 +1,23 @@ +/* + fn_formatNbrToPrefixStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +params [["_nbr", 0, [0]], ["_response", ""], ["_prefix", ""]]; + +_prefix = if( _nbr >= 1000 ) then { if( _nbr >= 1000000 ) then {_nbr = _nbr / 1000000; "M" } else {_nbr = _nbr / 1000; "K" } }else{ "" }; + +format["%1%2", floor _nbr, _prefix] \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBImage.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBImage.sqf new file mode 100644 index 0000000..59f79f3 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBImage.sqf @@ -0,0 +1,21 @@ +/* + fn_formatSBImage.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +params [["_src","",[""]],["_size",ExAd_SB_Img_Size,[0]]]; + +format["", _src,_size] \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBOutput.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBOutput.sqf new file mode 100644 index 0000000..ec5477a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_formatSBOutput.sqf @@ -0,0 +1,26 @@ +/* + fn_formatSBOutput.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +params [["_elements", [], [[]]], ["_color","",[""]], ["_text",""]]; + +{ + _text = format["%1%3%2", _text, _x, ExAd_SB_Text_InnerMargin]; +}forEach _elements; + +_color = if(count _color > 0)then{format["color='%1'",_color]}else{_color}; +format["%1%2%1", ExAd_SB_Text_Margin , _text , _color ] \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getBankStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getBankStr.sqf new file mode 100644 index 0000000..3687ce8 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getBankStr.sqf @@ -0,0 +1,24 @@ +/* + fn_getBankStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_text"]; + +_img = [ExAd_SB_ICON_BANK] call ExAd_fnc_formatSBImage; +_text = [player getVariable ["ExileLocker", 0]] call ExAd_fnc_formatNbrToPrefixStr; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getClanStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getClanStr.sqf new file mode 100644 index 0000000..071a196 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getClanStr.sqf @@ -0,0 +1,24 @@ +/* + fn_getClanStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_text"]; + +_img = [ExAd_SB_ICON_CLAN] call ExAd_fnc_formatSBImage; +_text = "N/A"; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getCompassStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getCompassStr.sqf new file mode 100644 index 0000000..167e62e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getCompassStr.sqf @@ -0,0 +1,40 @@ +/* + fn_getCompassStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_dir"]; + +_img = [ExAd_SB_ICON_COMPASS] call ExAd_fnc_formatSBImage; +_dir = direction player; + +try +{ + if(_dir >= 337.5 || _dir < 22.5 )then{throw "N"}; + if(_dir >= 22.5 && _dir < 67.5 )then{throw "NE"}; + if(_dir >= 67.5 && _dir < 112.5 )then{throw "E"}; + if(_dir >= 112.5 && _dir < 157.5 )then{throw "SE"}; + if(_dir >= 157.5 && _dir < 202.5 )then{throw "S"}; + if(_dir >= 202.5 && _dir < 247.5 )then{throw "SW"}; + if(_dir >= 247.5 && _dir < 292.5 )then{throw "W"}; + if(_dir >= 292.5 && _dir < 337.5 )then{throw "NW"}; + + throw "N/A" +} +catch +{ + [[_img, _exception, round _dir]] call ExAd_fnc_formatSBOutput +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getFPSStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getFPSStr.sqf new file mode 100644 index 0000000..200c20c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getFPSStr.sqf @@ -0,0 +1,31 @@ +/* + fn_getFPSStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_img","_text"]; + +_request = []; + +_img = format["FPS", ExAd_SB_Img_Size]; +_text = floor diag_fps; +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,40,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getGridStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getGridStr.sqf new file mode 100644 index 0000000..7bad797 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getGridStr.sqf @@ -0,0 +1,26 @@ +/* + fn_getGridStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_grid","_text"]; + +_grid = mapGridPosition player; + +_img = [ExAd_SB_ICON_GRID] call ExAd_fnc_formatSBImage; +_text = format["%1|%2",_grid select [0,3],_grid select [3,3]]; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHPStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHPStr.sqf new file mode 100644 index 0000000..31b768a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHPStr.sqf @@ -0,0 +1,31 @@ +/* + fn_getHPStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_img","_text"]; + +_request = []; + +_img = [ExAd_SB_ICON_HP] call ExAd_fnc_formatSBImage; +_text = round (ExileClientPlayerAttributes select 0); +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,100,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHungerStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHungerStr.sqf new file mode 100644 index 0000000..c0791cb --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getHungerStr.sqf @@ -0,0 +1,31 @@ +/* + fn_getHungerStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_img","_text"]; + +_request = []; + +_img = [ExAd_SB_ICON_HUNGER] call ExAd_fnc_formatSBImage; +_text = round (ExileClientPlayerAttributes select 2); +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,100,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getKDStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getKDStr.sqf new file mode 100644 index 0000000..cb8767a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getKDStr.sqf @@ -0,0 +1,34 @@ +/* + fn_getClanStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_death","_img","_text"]; + +_request = []; + +_death = if(ExileClientPlayerDeaths == 0)then{0.001}else{ExileClientPlayerDeaths}; + +_img = [ExAd_SB_ICON_KD] call ExAd_fnc_formatSBImage; +_text = [ExileClientPlayerKills / _death, 2] call ExileClient_util_math_round; + +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,2,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getPlayersStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getPlayersStr.sqf new file mode 100644 index 0000000..682561e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getPlayersStr.sqf @@ -0,0 +1,24 @@ +/* + fn_getPlayersStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_text"]; + +_img = [ExAd_SB_ICON_PLAYERS] call ExAd_fnc_formatSBImage; +_text = count allPlayers; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getRespectStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getRespectStr.sqf new file mode 100644 index 0000000..e6658a7 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getRespectStr.sqf @@ -0,0 +1,24 @@ +/* + fn_getRespectStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_text"]; + +_img = [ExAd_SB_ICON_RESPECT] call ExAd_fnc_formatSBImage; +_text = [ExileClientPlayerScore] call ExAd_fnc_formatNbrToPrefixStr; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getSBColor.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getSBColor.sqf new file mode 100644 index 0000000..8d07df2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getSBColor.sqf @@ -0,0 +1,44 @@ +/* + fn_getSBColor.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +params[["_min",0,[0]],["_max",1,[0]],["_cur",1,[0]],"_count","_diff","_color",""]; + +try +{ + if(isNil "ExAd_SB_COMPONENTS_COLORS")then{throw ""}; + + _count = count ExAd_SB_COMPONENTS_COLORS; + if(_count == 0)then{throw ""}; + + if(_cur > _max)then{_max = _cur}; + _diff = (_max - _min) / _count; + _color = ExAd_SB_COMPONENTS_COLORS select 0; + + for "_i" from 0 to _count do { + if(_cur >= (_i * _diff) && _cur <= ((_i + 1) * _diff))then{throw (ExAd_SB_COMPONENTS_COLORS select _i);} + }; + + throw _color; +} +catch +{ + if(count _exception == 0)then{ + ExAd_SB_COMPONENTS_ACTIVE_COLORS = false; + }; + _exception +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTempStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTempStr.sqf new file mode 100644 index 0000000..8ef7991 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTempStr.sqf @@ -0,0 +1,33 @@ +/* + fn_getTempStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_img","_text"]; + +_request = []; + +_img = [ExAd_SB_ICON_TEMP] call ExAd_fnc_formatSBImage; +_temp = [ExileClientPlayerAttributes select 5, 1] call ExileClient_util_math_round; +_text = _temp; + +_request pushBack [_img,_text, "°C"]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,37,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getThirstStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getThirstStr.sqf new file mode 100644 index 0000000..e8e3551 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getThirstStr.sqf @@ -0,0 +1,31 @@ +/* + fn_getThirstStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_img","_text"]; + +_request = []; + +_img = [ExAd_SB_ICON_THIRST] call ExAd_fnc_formatSBImage; +_text = round (ExileClientPlayerAttributes select 3); +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + _request pushBack ([0,100,_text] call ExAd_fnc_getSBColor) +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTimerStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTimerStr.sqf new file mode 100644 index 0000000..a0c5c85 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getTimerStr.sqf @@ -0,0 +1,39 @@ +/* + fn_getTimerStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_request","_time","_hours","_minutes","_img","_text"]; + +_request = []; + +_time = serverTime; +_hours = (ExAd_SB_Timer - 1) - floor (_time / 3600); +_minutes = 59 - floor ((_time % 3600) / 60); + +_img = [ExAd_SB_ICON_TIMER] call ExAd_fnc_formatSBImage; +_text = format["%1:%2", _hours,(if(_minutes < 10 )then{format["0%1",_minutes]}else{_minutes})]; +_request pushBack [_img,_text]; + +if(ExAd_SB_COMPONENTS_ACTIVE_COLORS)then{ + if(_hours > 0)then{ + _request pushBack ([0,1,_hours] call ExAd_fnc_getSBColor) + }else{ + _request pushBack ([0,60,_minutes] call ExAd_fnc_getSBColor) + }; +}; + +_request call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getWalletStr.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getWalletStr.sqf new file mode 100644 index 0000000..60ea867 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_getWalletStr.sqf @@ -0,0 +1,24 @@ +/* + fn_getWalletStr.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_img","_text"]; + +_img = [ExAd_SB_ICON_Wallet] call ExAd_fnc_formatSBImage; +_text = [player getVariable ["ExileMoney", 0]] call ExAd_fnc_formatNbrToPrefixStr; + +[[_img, _text]] call ExAd_fnc_formatSBOutput \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_loadSB.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_loadSB.sqf new file mode 100644 index 0000000..602dd46 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_loadSB.sqf @@ -0,0 +1,36 @@ +/* + fn_loadSB.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_display"]; + +disableSerialization; + +ExAd_SB_Dialog_Layer cutRsc ["ExAd_STATSBAR", "PLAIN", 1]; + +_display = uiNameSpace getVariable ["ExAd_STATSBAR",displayNull]; +_logoCtrl = _display displayCtrl ExAd_SB_Dialog_CtrlLogo_IDC; + +if(count ExAd_SB_ICON_LOGO > 0)then{ + _logoCtrl ctrlSetText ExAd_SB_ICON_LOGO; +}; + +call ExAd_fnc_updateSB; + +ExAd_SB_Thread = [ExAd_SB_Update_Rate, ExAd_fnc_sbThread, [], true] call ExileClient_system_thread_addtask; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbPowerToggle.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbPowerToggle.sqf new file mode 100644 index 0000000..672bbac --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbPowerToggle.sqf @@ -0,0 +1,31 @@ +/* + fn_sbPowerToggle.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +if(ExAd_SB_Active)then{ + call ExAd_fnc_sbStop +}else{ + call ExAd_fnc_loadSB +}; + +ExAd_SB_Active = !ExAd_SB_Active; + +(_this select 0) ctrlSetText (if(!ExAd_SB_Active)then{STR_ExAd_SB_APP_BTN_SHOW}else{STR_ExAd_SB_APP_BTN_HIDE}); +call ExAd_SB_fnc_thread; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbSave.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbSave.sqf new file mode 100644 index 0000000..e6616b0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbSave.sqf @@ -0,0 +1,51 @@ +/* + fn_sbSave.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +profileNamespace setVariable ["ExAd_SB_Update_Rate", ExAd_SB_Update_Rate]; +profileNamespace setVariable ["ExAd_SB_Active", ExAd_SB_Active]; + +profileNamespace setVariable ["ExAd_SB_GUI_POS", ExAd_SB_GUI_POS]; +profileNamespace setVariable ["ExAd_SB_GUI_TextColor", ExAd_SB_GUI_TextColor]; +profileNamespace setVariable ["ExAd_SB_GUI_BgColor", ExAd_SB_GUI_BgColor]; + +profileNamespace setVariable ["ExAd_SB_Text_Margin", ExAd_SB_Text_Margin]; +profileNamespace setVariable ["ExAd_SB_Text_InnerMargin", ExAd_SB_Text_InnerMargin]; +profileNamespace setVariable ["ExAd_SB_Text_Font", ExAd_SB_Text_Font]; +profileNamespace setVariable ["ExAd_SB_Text_Align", ExAd_SB_Text_Align]; +profileNamespace setVariable ["ExAd_SB_Text_Size", ExAd_SB_Text_Size]; +profileNamespace setVariable ["ExAd_SB_Img_Size", ExAd_SB_Img_Size]; + +profileNamespace setVariable ["ExAd_SB_Show_KD", ExAd_SB_Show_KD]; +profileNamespace setVariable ["ExAd_SB_Show_HP", ExAd_SB_Show_HP]; +profileNamespace setVariable ["ExAd_SB_Show_Thirst", ExAd_SB_Show_Thirst]; +profileNamespace setVariable ["ExAd_SB_Show_Hunger", ExAd_SB_Show_Hunger]; +profileNamespace setVariable ["ExAd_SB_Show_Wallet", ExAd_SB_Show_Wallet]; +profileNamespace setVariable ["ExAd_SB_Show_Bank", ExAd_SB_Show_Bank]; +profileNamespace setVariable ["ExAd_SB_Show_Respect", ExAd_SB_Show_Respect]; +profileNamespace setVariable ["ExAd_SB_Show_FPS", ExAd_SB_Show_FPS]; +profileNamespace setVariable ["ExAd_SB_Show_Time", ExAd_SB_Show_Time]; +profileNamespace setVariable ["ExAd_SB_Show_Temp", ExAd_SB_Show_Temp]; +profileNamespace setVariable ["ExAd_SB_Show_Grid", ExAd_SB_Show_Grid]; +profileNamespace setVariable ["ExAd_SB_Show_Compass", ExAd_SB_Show_Compass]; +profileNamespace setVariable ["ExAd_SB_Show_PlayerCount", ExAd_SB_Show_PlayerCount]; +profileNamespace setVariable ["ExAd_SB_Show_ClanCount", ExAd_SB_Show_ClanCount]; + +profileNamespace setVariable ["ExAd_SB_COMPONENTS_ACTIVE_COLORS", ExAd_SB_COMPONENTS_ACTIVE_COLORS]; +profileNamespace setVariable ["ExAd_SB_EXILE_HUD_ACTIVE", ExAd_SB_EXILE_HUD_ACTIVE]; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbStop.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbStop.sqf new file mode 100644 index 0000000..8cd6b25 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbStop.sqf @@ -0,0 +1,23 @@ +/* + fn_sbStop.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +ExAd_SB_Dialog_Layer cutText ["", "PLAIN"]; +[ExAd_SB_Thread] call ExileClient_system_thread_removeTask; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbThread.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbThread.sqf new file mode 100644 index 0000000..279262c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_sbThread.sqf @@ -0,0 +1,50 @@ +/* + fn_sbThread.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_display","_statsBarCtrl","_text"]; + +disableSerialization; + +_display = uiNameSpace getVariable ["ExAd_STATSBAR",displayNull]; +_statsBarCtrl = _display displayCtrl ExAd_SB_Dialog_CtrlBar_IDC; + +_text = format[ + "%4%5%6%7%8%9%10%11%12%13%14%15%16%17%18%4", + ExAd_SB_Text_Font, + ExAd_SB_Text_Align, + ExAd_SB_Text_Size, + ExAd_SB_Text_Margin, + (if(ExAd_SB_Show_KD && ExAd_SB_Allow_KD)then{call ExAd_fnc_getKDStr}else{""}), + (if(ExAd_SB_Show_HP && ExAd_SB_Allow_HP)then{call ExAd_fnc_getHPStr}else{""}), + (if(ExAd_SB_Show_Thirst && ExAd_SB_Allow_Thirst)then{call ExAd_fnc_getThirstStr}else{""}), + (if(ExAd_SB_Show_Hunger && ExAd_SB_Allow_Hunger)then{call ExAd_fnc_getHungerStr}else{""}), + (if(ExAd_SB_Show_Wallet && ExAd_SB_Allow_Wallet)then{call ExAd_fnc_getWalletStr}else{""}), + (if(ExAd_SB_Show_Bank && ExAd_SB_Allow_Bank)then{call ExAd_fnc_getBankStr}else{""}), + (if(ExAd_SB_Show_Respect && ExAd_SB_Allow_Respect)then{call ExAd_fnc_getRespectStr}else{""}), + (if(ExAd_SB_Show_FPS && ExAd_SB_Allow_FPS)then{call ExAd_fnc_getFPSStr}else{""}), + (if(ExAd_SB_Show_Time && ExAd_SB_Allow_Time)then{call ExAd_fnc_getTimerStr}else{""}), + (if(ExAd_SB_Show_Temp && ExAd_SB_Allow_Temp)then{call ExAd_fnc_getTempStr}else{""}), + (if(ExAd_SB_Show_Grid && ExAd_SB_Allow_Grid)then{call ExAd_fnc_getGridStr}else{""}), + (if(ExAd_SB_Show_Compass && ExAd_SB_Allow_Compass)then{call ExAd_fnc_getCompassStr}else{""}), + (if(ExAd_SB_Show_PlayerCount && ExAd_SB_Allow_PlayerCount)then{call ExAd_fnc_getPlayersStr}else{""}), + (if(ExAd_SB_Show_ClanCount && ExAd_SB_Allow_ClanCount)then{call ExAd_fnc_getClanStr}else{""}) +]; + +_statsBarCtrl ctrlSetStructuredText parseText _text; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_toggleExileHUD.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_toggleExileHUD.sqf new file mode 100644 index 0000000..69d1eb4 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_toggleExileHUD.sqf @@ -0,0 +1,51 @@ +/* + fn_sbThread.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private["_display","_exileCtrl","_text"]; + +disableSerialization; + +_display = uiNameSpace getVariable ["RscExileHUD",displayNull]; +_exileCtrl = _display displayCtrl 1300; + +_exileCtrl ctrlShow ExAd_SB_EXILE_HUD_ACTIVE; + +if(ExAd_SB_EXILE_HUD_ACTIVE)then{ + _hungerLabel = _display displayCtrl 1303; + _hungerLabel ctrlShow (ExileHudMode isEqualTo 0); + _hungerValue = _display displayCtrl 1302; + _hungerValue ctrlShow (ExileHudMode isEqualTo 0); + _thirstLabel = _display displayCtrl 1305; + _thirstLabel ctrlShow (ExileHudMode isEqualTo 0); + _thirstValue = _display displayCtrl 1304; + _thirstValue ctrlShow (ExileHudMode isEqualTo 0); + _healthLabel = _display displayCtrl 1307; + _healthLabel ctrlShow (ExileHudMode isEqualTo 1); + _healthValue = _display displayCtrl 1306; + _healthValue ctrlShow (ExileHudMode isEqualTo 1); + _environmentTemperatureLabel = _display displayCtrl 1309; + _environmentTemperatureLabel ctrlShow (ExileHudMode isEqualTo 2); + _environmentTemperatureValue = _display displayCtrl 1308; + _environmentTemperatureValue ctrlShow (ExileHudMode isEqualTo 2); + _bodyTemperatureLabel = _display displayCtrl 1311; + _bodyTemperatureLabel ctrlShow (ExileHudMode isEqualTo 2); + _bodyTemperatureValue = _display displayCtrl 1310; + _bodyTemperatureValue ctrlShow (ExileHudMode isEqualTo 2); +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_updateSB.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_updateSB.sqf new file mode 100644 index 0000000..932d2fa --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Functions/fn_updateSB.sqf @@ -0,0 +1,28 @@ +/* + fn_sbThread.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +private ["_display","_statsBarCtrl"]; +_display = uiNameSpace getVariable ["ExAd_STATSBAR",displayNull]; +_statsBarCtrl = _display displayCtrl ExAd_SB_Dialog_CtrlBar_IDC; + +_statsBarCtrl ctrlSetPosition ExAd_SB_GUI_POS; +_statsBarCtrl ctrlSetBackgroundColor ExAd_SB_GUI_BgColor; +_statsBarCtrl ctrlSetTextColor ExAd_SB_GUI_TextColor; +_statsBarCtrl ctrlCommit 0; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Bank.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Bank.paa new file mode 100644 index 0000000..62b37b4 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Bank.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Compass.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Compass.paa new file mode 100644 index 0000000..e19bc1a Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Compass.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Family.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Family.paa new file mode 100644 index 0000000..8e8fc6a Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Family.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Grid.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Grid.paa new file mode 100644 index 0000000..c92212f Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Grid.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Health.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Health.paa new file mode 100644 index 0000000..e1a144b Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Health.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Hunger.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Hunger.paa new file mode 100644 index 0000000..466dea5 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Hunger.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_KD.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_KD.paa new file mode 100644 index 0000000..c28d9e1 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_KD.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Players.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Players.paa new file mode 100644 index 0000000..a128ddd Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Players.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Respect.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Respect.paa new file mode 100644 index 0000000..37aa0cd Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Respect.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Restart.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Restart.paa new file mode 100644 index 0000000..c7f636c Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Restart.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Temp.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Temp.paa new file mode 100644 index 0000000..184e02c Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Temp.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Thirst.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Thirst.paa new file mode 100644 index 0000000..2656c8a Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Thirst.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Wallet.paa b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Wallet.paa new file mode 100644 index 0000000..acd7511 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/StatsBar/Icons/ExAd_Wallet.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/RscTitles.cpp b/mpmissions/Exile.Altis/ExAdClient/StatsBar/RscTitles.cpp new file mode 100644 index 0000000..808aa52 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/RscTitles.cpp @@ -0,0 +1,43 @@ +//Modified + +#include "base.cpp" + +class ExAd_STATSBAR +{ + idd = 2186; + movingEnable = 0; + enableSimulation = 1; + enableDisplay = 1; + duration = 10e10; + fadein = 0; + fadeout = 0; + name = "ExAd_STATSBAR"; + onLoad = "with uiNameSpace do { ExAd_STATSBAR = _this select 0 };"; + class controls + { + class StatsBar: RscStructuredText + { + idc = 1100; + text = ""; + x = "safeZoneX"; + y = "safeZoneY + safeZoneH - 32 * pixelH"; + w = "safeZoneW"; + h = "30 * pixelH"; + }; + class Logo + { + type= 0; + idc = 1000; + x = "safeZoneX + safeZoneW - 128 * pixelW"; + y = "safeZoneY + 60 * pixelH - 32 * pixelH"; + w = "64 * pixelW"; + h = "64 * pixelH"; + style=48; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,1}; + font="TahomaB"; + sizeEx=0; + text = ""; + }; + }; +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/base.cpp b/mpmissions/Exile.Altis/ExAdClient/StatsBar/base.cpp new file mode 100644 index 0000000..2abc6f8 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/base.cpp @@ -0,0 +1,23 @@ +class RscStructuredText +{ + deletable = 0; + fade = 0; + access = 0; + type = 13; + idc = -1; + style = 0; + colorText[] = {1,1,1,1}; + colorBackground[] = {0,0,0,0}; + class Attributes + { + font = "PuristaMedium"; + color = "#ffffff"; + colorLink = "#D09B43"; + align = "left"; + shadow = 0; + }; + x = 0; y = 0; h = 0.035; w = 0.1; + text = ""; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + shadow = 1; +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/customize.sqf new file mode 100644 index 0000000..3acec57 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/customize.sqf @@ -0,0 +1,78 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_SB_ICON_BANK = "ExAdClient\StatsBar\Icons\ExAd_Bank.paa"; //STRING - Path to bank icon +ExAd_SB_ICON_CLAN = "ExAdClient\StatsBar\Icons\ExAd_Family.paa"; //STRING - Path to family icon +ExAd_SB_ICON_COMPASS = "ExAdClient\StatsBar\Icons\ExAd_Compass.paa"; //STRING - Path to compass icon +ExAd_SB_ICON_GRID = "ExAdClient\StatsBar\Icons\ExAd_Grid.paa"; //STRING - Path to grid icon +ExAd_SB_ICON_HP = "ExAdClient\StatsBar\Icons\ExAd_Health.paa"; //STRING - Path to health icon +ExAd_SB_ICON_HUNGER = "ExAdClient\StatsBar\Icons\ExAd_Hunger.paa"; //STRING - Path to hunger icon +ExAd_SB_ICON_KD = "ExAdClient\StatsBar\Icons\ExAd_KD.paa"; //STRING - Path to kill death ratio icon +ExAd_SB_ICON_PLAYERS = "ExAdClient\StatsBar\Icons\ExAd_Players.paa"; //STRING - Path to players icon +ExAd_SB_ICON_RESPECT = "ExAdClient\StatsBar\Icons\ExAd_Respect.paa"; //STRING - Path to respect icon +ExAd_SB_ICON_TEMP = "ExAdClient\StatsBar\Icons\ExAd_Temp.paa"; //STRING - Path to temperature icon +ExAd_SB_ICON_THIRST = "ExAdClient\StatsBar\Icons\ExAd_Thirst.paa"; //STRING - Path to thirst icon +ExAd_SB_ICON_TIMER = "ExAdClient\StatsBar\Icons\ExAd_Restart.paa"; //STRING - Path to restart icon +ExAd_SB_ICON_Wallet = "ExAdClient\StatsBar\Icons\ExAd_Wallet.paa"; //STRING - Path to POP TABS icon +ExAd_SB_ICON_LOGO = "ExAdClient\Core\Img\ExAd_logo_128.paa"; //STRING - Path to logo + +ExAd_SB_COMPONENTS_COLORS = ["#ff0000", "#ff8800","#ffaa00","#f2ff00","#A9C700","#11BF03"]; //STRINGS - Array of color codes, from bad to good. + +ExAd_SB_Timer = 4; //SCALAR - Restart time measured in hours. + +ExAd_SB_GUI_POS_Default = [safeZoneX, safeZoneY + safeZoneH - 32 * pixelH, safeZoneW, 30 * pixelH]; //ARRAY - Position with this attributes [x,y,w,h]; +ExAd_SB_GUI_TextColor_Default = [1,1,1,1]; //ARRAY - rgba array with values between 0-1, 0 => 0 | 255 => 1 +ExAd_SB_GUI_BgColor_Default = [0,0,0,0]; //ARRAY - rgba array with values between 0-1, 0 => 0 | 255 => 1 + +ExAd_SB_Text_Margin_Default = " "; //STRING - Margin between components measured in blankspaces +ExAd_SB_Text_InnerMargin_Default = ""; //STRING - Margin between icon and text within the component measured in blankspaces +ExAd_SB_Text_Font_Default = "OrbitronLight"; //STRING - Font family +ExAd_SB_Text_Align_Default = "center"; //STRING - Alignment (left,center,right) +ExAd_SB_Text_Size_Default = 1; //SCALAR - Text size ( 0-2 ) +ExAd_SB_Img_Size_Default = 1; //SCALAR - Icon size ( 0-2 ) + +ExAd_SB_Show_KD_Default = false; //BOOLEAN - Template, show kill death ratio +ExAd_SB_Show_HP_Default = true; //BOOLEAN - Template, show health +ExAd_SB_Show_Thirst_Default = false; //BOOLEAN - Template, show thirst +ExAd_SB_Show_Hunger_Default = false; //BOOLEAN - Template, show hunger +ExAd_SB_Show_Wallet_Default = true; //BOOLEAN - Template, show pop tabs on player +ExAd_SB_Show_Bank_Default = false; //BOOLEAN - Template, show pop tabs in locker +ExAd_SB_Show_Respect_Default = false; //BOOLEAN - Template, show respect +ExAd_SB_Show_FPS_Default = true; //BOOLEAN - Template, show fps +ExAd_SB_Show_Time_Default = true; //BOOLEAN - Template, show restart timer +ExAd_SB_Show_Temp_Default = true; //BOOLEAN - Template, show body temperature +ExAd_SB_Show_Grid_Default = true; //BOOLEAN - Template, show grid location +ExAd_SB_Show_Compass_Default = true; //BOOLEAN - Template, show compass +ExAd_SB_Show_PlayerCount_Default = true; //BOOLEAN - Template, show online players count +ExAd_SB_Show_ClanCount_Default = false; //BOOLEAN - Template, show online family members count + + +ExAd_SB_Allow_KD = true; //BOOLEAN - Allow showing kill death ratio +ExAd_SB_Allow_HP = true; //BOOLEAN - Allow showing health +ExAd_SB_Allow_Thirst = true; //BOOLEAN - Allow showing thirst +ExAd_SB_Allow_Hunger = true; //BOOLEAN - Allow showing hunger +ExAd_SB_Allow_Wallet = true; //BOOLEAN - Allow showing wallet +ExAd_SB_Allow_Bank = true; //BOOLEAN - Allow showing bank saldo +ExAd_SB_Allow_Respect = true; //BOOLEAN - Allow showing respect +ExAd_SB_Allow_FPS = true; //BOOLEAN - Allow showing fps +ExAd_SB_Allow_Time = true; //BOOLEAN - Allow showing restart timer +ExAd_SB_Allow_Temp = true; //BOOLEAN - Allow showing body temperature +ExAd_SB_Allow_Grid = true; //BOOLEAN - Allow showing grid location +ExAd_SB_Allow_Compass = true; //BOOLEAN - Allow showing compass +ExAd_SB_Allow_PlayerCount = true; //BOOLEAN - Allow showing players count +ExAd_SB_Allow_ClanCount = false; //BOOLEAN - Allow showing online family members count diff --git a/mpmissions/Exile.Altis/ExAdClient/StatsBar/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/StatsBar/postInit.sqf new file mode 100644 index 0000000..9f9fef2 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/StatsBar/postInit.sqf @@ -0,0 +1,153 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +_path = "ExAdClient\StatsBar\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +if(isNil "ExAd_SB_ICON_BANK")then{ExAd_SB_ICON_BANK = "ExAdClient\StatsBar\Icons\ExAd_Bank.paa";}; +if(isNil "ExAd_SB_ICON_CLAN")then{ExAd_SB_ICON_CLAN = "ExAdClient\StatsBar\Icons\ExAd_Family.paa";}; +if(isNil "ExAd_SB_ICON_COMPASS")then{ExAd_SB_ICON_COMPASS = "ExAdClient\StatsBar\Icons\ExAd_Compass.paa";}; +if(isNil "ExAd_SB_ICON_GRID")then{ExAd_SB_ICON_GRID = "ExAdClient\StatsBar\Icons\ExAd_Grid.paa";}; +if(isNil "ExAd_SB_ICON_HP")then{ExAd_SB_ICON_HP = "ExAdClient\StatsBar\Icons\ExAd_Health.paa";}; +if(isNil "ExAd_SB_ICON_HUNGER")then{ExAd_SB_ICON_HUNGER = "ExAdClient\StatsBar\Icons\ExAd_Hunger.paa";}; +if(isNil "ExAd_SB_ICON_KD")then{ExAd_SB_ICON_KD = "ExAdClient\StatsBar\Icons\ExAd_KD.paa";}; +if(isNil "ExAd_SB_ICON_PLAYERS")then{ExAd_SB_ICON_PLAYERS = "ExAdClient\StatsBar\Icons\ExAd_Players.paa";}; +if(isNil "ExAd_SB_ICON_RESPECT")then{ExAd_SB_ICON_RESPECT = "ExAdClient\StatsBar\Icons\ExAd_Respect.paa";}; +if(isNil "ExAd_SB_ICON_TEMP")then{ExAd_SB_ICON_TEMP = "ExAdClient\StatsBar\Icons\ExAd_Temp.paa";}; +if(isNil "ExAd_SB_ICON_THIRST")then{ExAd_SB_ICON_THIRST = "ExAdClient\StatsBar\Icons\ExAd_Thirst.paa";}; +if(isNil "ExAd_SB_ICON_TIMER")then{ExAd_SB_ICON_TIMER = "ExAdClient\StatsBar\Icons\ExAd_Restart.paa";}; +if(isNil "ExAd_SB_ICON_Wallet")then{ExAd_SB_ICON_Wallet = "ExAdClient\StatsBar\Icons\ExAd_Wallet.paa";}; +if(isNil "ExAd_SB_ICON_LOGO")then{ExAd_SB_ICON_LOGO = "ExAdClient\Core\Img\ExAd_logo_128.paa";}; + +if(isNil "ExAd_SB_GUI_POS_Default")then{ExAd_SB_GUI_POS_Default = [safeZoneX, safeZoneY + safeZoneH - 32 * pixelH, safeZoneW, 30 * pixelH];}; +if(isNil "ExAd_SB_GUI_TextColor_Default")then{ExAd_SB_GUI_TextColor_Default = [1,1,1,1];}; +if(isNil "ExAd_SB_GUI_BgColor_Default")then{ExAd_SB_GUI_BgColor_Default = [0,0,0,0];}; + +if(isNil "ExAd_SB_Text_Margin_Default")then{ExAd_SB_Text_Margin_Default = " ";}; +if(isNil "ExAd_SB_Text_InnerMargin_Default")then{ExAd_SB_Text_InnerMargin_Default = "";}; +if(isNil "ExAd_SB_Text_Font_Default")then{ExAd_SB_Text_Font_Default = "OrbitronLight";}; +if(isNil "ExAd_SB_Text_Align_Default")then{ExAd_SB_Text_Align_Default = "center";}; +if(isNil "ExAd_SB_Text_Size_Default")then{ExAd_SB_Text_Size_Default = 1;}; +if(isNil "ExAd_SB_Img_Size_Default")then{ExAd_SB_Img_Size_Default = 1;}; + +if(isNil "ExAd_SB_Timer")then{ExAd_SB_Timer = 3;}; + +if(isNil "ExAd_SB_Show_KD_Default")then{ExAd_SB_Show_KD_Default = false;}; +if(isNil "ExAd_SB_Show_HP_Default")then{ExAd_SB_Show_HP_Default = true;}; +if(isNil "ExAd_SB_Show_Thirst_Default")then{ExAd_SB_Show_Thirst_Default = false;}; +if(isNil "ExAd_SB_Show_Hunger_Default")then{ExAd_SB_Show_Hunger_Default = false;}; +if(isNil "ExAd_SB_Show_Wallet_Default")then{ExAd_SB_Show_Wallet_Default = true;}; +if(isNil "ExAd_SB_Show_Bank_Default")then{ExAd_SB_Show_Bank_Default = false;}; +if(isNil "ExAd_SB_Show_Respect_Default")then{ExAd_SB_Show_Respect_Default = false;}; +if(isNil "ExAd_SB_Show_FPS_Default")then{ExAd_SB_Show_FPS_Default = true;}; +if(isNil "ExAd_SB_Show_Time_Default")then{ExAd_SB_Show_Time_Default = true;}; +if(isNil "ExAd_SB_Show_Temp_Default")then{ExAd_SB_Show_Temp_Default = true;}; +if(isNil "ExAd_SB_Show_Grid_Default")then{ExAd_SB_Show_Grid_Default = true;}; +if(isNil "ExAd_SB_Show_Compass_Default")then{ExAd_SB_Show_Compass_Default = true;}; +if(isNil "ExAd_SB_Show_PlayerCount_Default")then{ExAd_SB_Show_PlayerCount_Default = true;}; +if(isNil "ExAd_SB_Show_ClanCount_Default")then{ExAd_SB_Show_ClanCount_Default = false;}; + + +if(isNil "ExAd_SB_COMPONENTS_COLORS")then{ExAd_SB_COMPONENTS_COLORS = ["#000000", "#440B00","#FE1106","#CA7400","#A9C700","#11BF03"];}; +if(isNil "ExAd_SB_Dialog_Layer")then{ExAd_SB_Dialog_Layer = 102;}; +if(isNil "ExAd_SB_Dialog_CtrlLogo_IDC")then{ExAd_SB_Dialog_CtrlLogo_IDC = 1000;}; +if(isNil "ExAd_SB_Dialog_CtrlBar_IDC")then{ExAd_SB_Dialog_CtrlBar_IDC = 1100;}; + +{ + _x call ExAd_fnc_localize; +}forEach [ + ["STR_ExAd_SB_APP_GO_BACK", "Go Back"], + ["STR_ExAd_SB_APP_CB_KD", "Kill/Death Ratio"], + ["STR_ExAd_SB_APP_CB_HP", "Health"], + ["STR_ExAd_SB_APP_CB_THIRST", "Thirst"], + ["STR_ExAd_SB_APP_CB_HUNGER", "Hunger"], + ["STR_ExAd_SB_APP_CB_WALLET", "POP TABS in wallet"], + ["STR_ExAd_SB_APP_CB_BANK", "POP TABS in bank"], + ["STR_ExAd_SB_APP_CB_RESPECT", "Respect"], + ["STR_ExAd_SB_APP_CB_COLORS", "Use color indications"], + ["STR_ExAd_SB_APP_CB_FPS", "FPS"], + ["STR_ExAd_SB_APP_CB_TIMER", "Restart time"], + ["STR_ExAd_SB_APP_CB_TEMP", "Body Temperature"], + ["STR_ExAd_SB_APP_CB_GRID", "Grid location"], + ["STR_ExAd_SB_APP_CB_COMPASS", "Compass"], + ["STR_ExAd_SB_APP_CB_PLAYERS", "Players online"], + ["STR_ExAd_SB_APP_CB_CLAN_MEMBERS", "Family members online"], + ["STR_ExAd_SB_APP_CB_HIDE_EXILE_SB", "Hide Exile Status bar"], + ["STR_ExAd_SB_APP_SLIDER_BG_COLOR", "Background Color"], + ["STR_ExAd_SB_APP_SLIDER_POS_SIZE", "Position/Size"], + ["STR_ExAd_SB_APP_COMBO_FONT", "Font"], + ["STR_ExAd_SB_APP_COMBO_TOOLTIP_FONT", "Font"], + ["STR_ExAd_SB_APP_COMBO_TOOLTIP_ALIGN", "Align"], + ["STR_ExAd_SB_APP_SLIDER_TEXT_COLOR", "Text Color"], + ["STR_ExAd_SB_APP_SLIDER_UPDATE_RATE", "Update Rate"], + ["STR_ExAd_SB_APP_SLIDER_TEXT_SIZE", "Text Size"], + ["STR_ExAd_SB_APP_SLIDER_TEXT_MARGIN", "Margin"], + ["STR_ExAd_SB_APP_SLIDER_TEXT_PADDING", "Padding"], + ["STR_ExAd_SB_APP_SLIDER_IMG_SIZE", "Image Size"], + ["STR_ExAd_SB_APP_BTN_SHOW", "Show"], + ["STR_ExAd_SB_APP_BTN_HIDE", "Hide"] +]; + + + +ExAd_SB_Update_Rate = profileNamespace getVariable ["ExAd_SB_Update_Rate", 1]; +ExAd_SB_Active = profileNamespace getVariable ["ExAd_SB_Active", true]; + +ExAd_SB_GUI_POS = profileNamespace getVariable ["ExAd_SB_GUI_POS", ExAd_SB_GUI_POS_Default]; +ExAd_SB_GUI_TextColor = profileNamespace getVariable ["ExAd_SB_GUI_TextColor", ExAd_SB_GUI_TextColor_Default]; +ExAd_SB_GUI_BgColor = profileNamespace getVariable ["ExAd_SB_GUI_BgColor", ExAd_SB_GUI_BgColor_Default]; + +ExAd_SB_Text_Margin = profileNamespace getVariable ["ExAd_SB_Text_Margin", ExAd_SB_Text_Margin_Default]; +ExAd_SB_Text_InnerMargin = profileNamespace getVariable ["ExAd_SB_Text_InnerMargin", ExAd_SB_Text_InnerMargin_Default]; +ExAd_SB_Text_Font = profileNamespace getVariable ["ExAd_SB_Text_Font", ExAd_SB_Text_Font_Default]; +ExAd_SB_Text_Align = profileNamespace getVariable ["ExAd_SB_Text_Align", ExAd_SB_Text_Align_Default]; +ExAd_SB_Text_Size = profileNamespace getVariable ["ExAd_SB_Text_Size", ExAd_SB_Text_Size_Default]; +ExAd_SB_Img_Size = profileNamespace getVariable ["ExAd_SB_Img_Size", ExAd_SB_Img_Size_Default]; + +ExAd_SB_Show_KD = profileNamespace getVariable ["ExAd_SB_Show_KD", ExAd_SB_Show_KD_Default]; +ExAd_SB_Show_HP = profileNamespace getVariable ["ExAd_SB_Show_HP", ExAd_SB_Show_HP_Default]; +ExAd_SB_Show_Thirst = profileNamespace getVariable ["ExAd_SB_Show_Thirst", ExAd_SB_Show_Thirst_Default]; +ExAd_SB_Show_Hunger = profileNamespace getVariable ["ExAd_SB_Show_Hunger", ExAd_SB_Show_Hunger_Default]; +ExAd_SB_Show_Wallet = profileNamespace getVariable ["ExAd_SB_Show_Wallet", ExAd_SB_Show_Wallet_Default]; +ExAd_SB_Show_Bank = profileNamespace getVariable ["ExAd_SB_Show_Bank", ExAd_SB_Show_Bank_Default]; +ExAd_SB_Show_Respect = profileNamespace getVariable ["ExAd_SB_Show_Respect", ExAd_SB_Show_Respect_Default]; +ExAd_SB_Show_FPS = profileNamespace getVariable ["ExAd_SB_Show_FPS", ExAd_SB_Show_FPS_Default]; +ExAd_SB_Show_Time = profileNamespace getVariable ["ExAd_SB_Show_Time", ExAd_SB_Show_Time_Default]; +ExAd_SB_Show_Temp = profileNamespace getVariable ["ExAd_SB_Show_Temp", ExAd_SB_Show_Temp_Default]; +ExAd_SB_Show_Grid = profileNamespace getVariable ["ExAd_SB_Show_Grid", ExAd_SB_Show_Grid_Default]; +ExAd_SB_Show_Compass = profileNamespace getVariable ["ExAd_SB_Show_Compass", ExAd_SB_Show_Compass_Default]; +ExAd_SB_Show_PlayerCount = profileNamespace getVariable ["ExAd_SB_Show_PlayerCount", ExAd_SB_Show_PlayerCount_Default]; +ExAd_SB_Show_ClanCount = profileNamespace getVariable ["ExAd_SB_Show_ClanCount", ExAd_SB_Show_ClanCount_Default]; + +ExAd_SB_COMPONENTS_ACTIVE_COLORS = profileNamespace getVariable ["ExAd_SB_COMPONENTS_ACTIVE_COLORS", true]; +ExAd_SB_EXILE_HUD_ACTIVE = profileNamespace getVariable ["ExAd_SB_EXILE_HUD_ACTIVE", true]; + +if(!ExAd_SB_Active)exitWith{false}; + +[] spawn { + waituntil { !isnil "bis_fnc_init" && !isNull findDisplay 46 && alive player && !isNil "ExileClientLoadedIn" }; + waitUntil { ExileClientLoadedIn }; + + call ExAd_fnc_loadSB; + + if(!ExAd_SB_EXILE_HUD_ACTIVE)then{ + call ExAd_fnc_toggleExileHUD; + }; + +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp new file mode 100644 index 0000000..e8cb588 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp @@ -0,0 +1,30 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +class VirtualGarage +{ + file = "ExAdClient\VirtualGarage\Functions"; + class allowedVGVeh {}; + class allowVGStore {}; + class fillVGList {}; + class loadVGContent {}; + class loadVGDetailView {}; + class onBtnClickVG {}; + class postInitVG {file = "ExAdClient\VirtualGarage\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgHints.cpp b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgHints.cpp new file mode 100644 index 0000000..148bf97 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgHints.cpp @@ -0,0 +1,38 @@ +/* + CfgHints.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +class VGStore +{ + displayName = "Vehicle stored"; + /*displayNameShort = "Your vehicle has been stored and is available through the Virtual Garage interface";*/ + description = "Your vehicle has been stored and is only available through the territory it has been stored at. "; + image = "ExAdClient\Core\Img\logo.paa"; + noImage = false; + tip = ""; + arguments[] = {}; +}; +class VGLoad +{ + displayName = "Vehicle loaded to world"; + description = "%1Your vehicle has been loaded to the world, the pin code is %11"; + image = "ExAdClient\Core\Img\logo.paa"; + noImage = false; + tip = ""; + arguments[] = {"VGLoad select 0"}; + parameters[] = {"STRING"}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CustomCode/ExileServer_system_territory_database_load.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CustomCode/ExileServer_system_territory_database_load.sqf new file mode 100644 index 0000000..5fe53ba --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CustomCode/ExileServer_system_territory_database_load.sqf @@ -0,0 +1,61 @@ +/** + * ExileServer_system_territory_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_territoryID","_data","_id","_owner","_position","_radius","_level","_flagTexture","_flagStolen","_flagStolenBy","_lastPayed","_buildRights","_moderators","_flagObject"]; +_territoryID = _this; +_data = format ["loadTerritory:%1", _territoryID] call ExileServer_system_database_query_selectSingle; +_id = _data select 0; +_owner = _data select 1; +_name = _data select 2; +_position = +[ + _data select 3, + _data select 4, + _data select 5 +]; +_radius = _data select 6; +_level = _data select 7; +_flagTexture = _data select 8; +_flagStolen = _data select 9; +_flagStolenBy = _data select 10; +_lastPayed = _data select 11; +_buildRights = _data select 12; +_moderators = _data select 13; +_flagObject = createVehicle ["Exile_Construction_Flag_Static",_position, [], 0, "CAN_COLLIDE"]; +if (_flagStolen isEqualTo 0) then +{ + _flagObject setFlagTexture _flagTexture; +}; +ExileLocations pushBack _flagObject; +_flagObject setVariable ["ExileTerritoryName", _name, true]; +_flagObject setVariable ["ExileDatabaseID", _id]; +_flagObject setVariable ["ExileOwnerUID", _owner, true]; +_flagObject setVariable ["ExileTerritorySize", _radius, true]; +_flagObject setVariable ["ExileTerritoryBuildRights", _buildRights, true]; +_flagObject setVariable ["ExileTerritoryModerators", _moderators, true]; +_flagObject setVariable ["ExileTerritoryLevel", _level, true]; +_flagObject setVariable ["ExileTerritoryLastPayed", _lastPayed]; +_flagObject call ExileServer_system_territory_maintenance_recalculateDueDate; +_flagObject setVariable ["ExileTerritoryNumberOfConstructions", _data select 15, true]; +_flagObject setVariable ["ExileRadiusShown", false, true]; +_flagObject setVariable ["ExileFlagStolen",_flagStolen,true]; +_flagObject setVariable ["ExileFlagTexture",_flagTexture]; + +//////////////////////// +///// ExAd START ///// +//////////////////////// +_vehicles = format ["loadTerritoryVehicles:%1", _territoryID] call ExileServer_system_database_query_selectFull; +_flagObject setVariable ["ExAdVGVeh", _vehicles, true]; +//////////////////////// +///// ExAd END ///// +//////////////////////// + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf new file mode 100644 index 0000000..fd31d0f --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf @@ -0,0 +1,31 @@ +/* + fn_allowVGStore.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private ["_res","_flag","_cmon1","_cmon2"]; + +_cmon1 = if (ExileClientPlayerIsInCombat && ExAd_STOP_COMBAT_STORING)exitWith{["ErrorTitleAndText", ["ExAd - Virtual Garage", "You cannot store Vehicles While in Combat!"]] call ExileClient_gui_toaster_addTemplateToast;}; + +_cmon2 = if (isNil "ExAdCurFlagNetId")exitWith{diag_log "ExAdClient: allowVGStore - ExAdCurFlagNetId is nil";false}; + +_flag = objectFromNetId ExAdCurFlagNetId; + +_allowedVeh = _flag call ExAd_fnc_allowedVGVeh; +_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]); + +_res = if(_allowedVeh > _storedVeh)then{true}else{false}; + +_res diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowedVGVeh.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowedVGVeh.sqf new file mode 100644 index 0000000..1edc066 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowedVGVeh.sqf @@ -0,0 +1,22 @@ +/* + fn_allowedVGVeh.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params ["_flag"]; + +_res = ExAd_VG_MIN_ALLOWED_VEH + round(ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR * (_flag getVariable ["ExileTerritoryLevel", 1])); + +_res \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_fillVGList.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_fillVGList.sqf new file mode 100644 index 0000000..68acc45 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_fillVGList.sqf @@ -0,0 +1,38 @@ +/* + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +private ["_list","_idc","_vehClass","_data","_name","_index","_pic"]; + +_list = _this select 0; +_idc = _this select 1; + +lbClear _idc; + +{ + _vehClass = if(typeName _x isEqualTo "ARRAY")then{_x select 1}else{typeOf _x}; + _data = if(typeName _x isEqualTo "ARRAY")then{format["%1",_x select 0]}else{netId _x}; + + _name = getText(configFile >> "CfgVehicles" >> _vehClass >> "displayName"); + _index = lbAdd[_idc,_name]; + _pic = getText(configFile >> "CfgVehicles" >> _vehClass >> "picture"); + lbSetPicture [_idc, _index, _pic]; + lbSetPictureColor [_idc, _index, [1,1,1,1]]; + lbSetData [_idc, _index, _data]; + lbSetTooltip [_idc, _index, _vehClass]; +}forEach _list; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf new file mode 100644 index 0000000..86f117e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf @@ -0,0 +1,44 @@ +/* + fn_loadVGContent.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private ["_display","_error","_slides","_flag","_allowedVeh","_storedVeh","_strTxtVehCntColor","_strTxtVehCnt"]; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +if (isNull _display) exitWith {_error = "Error loading XM8 VG app, display is null"; systemChat _error; diag_log _error;}; + +_slides = _display displayCtrl 4007; +if (isNull _slides) exitWith {_error = "Error loading XM8 VG app, slides control is null"; systemChat _error; diag_log _error;}; + +_flag = if(typeName ExAdCurFlagNetId == "STRING")then{objectFromNetId ExAdCurFlagNetId}else{ExAdCurFlagNetId}; + +_allowedVeh = _flag call ExAd_fnc_allowedVGVeh; +_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]); +_strTxtVehCntColor = if(_allowedVeh > _storedVeh)then{"#FFFFFF"}else{"#B22400"}; + +_strTxtVehCnt = [_display,"ExAd_VG","SubTitle1Cnt"] call ExAd_fnc_getAppCtrl; +_strTxtVehCnt ctrlSetStructuredText parseText format ["%2/%3",_strTxtVehCntColor,_storedVeh,_allowedVeh]; + +[(objectFromNetId ExAdCurFlagNetId) getVariable ["ExAdVGVeh", []],ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList; +for "_i" from 0 to 3 do { + _index = lbAdd[ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl),""]; +}; + +[[_flag, ExAd_VG_ALLOWED_VEH_TYPE,_flag getVariable ["ExileTerritorySize", 50]] call ExAd_fnc_getNearByLocalVeh,ctrlIDC ([_display,"ExAd_VG","NearVehicleList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList; + +([_display,"ExAd_VG","InfoCB"] call ExAd_fnc_getAppCtrl) cbSetChecked ((profileNamespace getVariable["ExAd_StreamFriendlyUI",0]) == 1); + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGDetailView.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGDetailView.sqf new file mode 100644 index 0000000..ca75dfa --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGDetailView.sqf @@ -0,0 +1,27 @@ +/* + fn_loadVGDetailView.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params ["_text","_idc"]; +disableSerialization; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +if(isNull _display)exitWith{false}; + +(_display displayCtrl _idc) ctrlSetStructuredText parseText _text; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf new file mode 100644 index 0000000..2abf36a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf @@ -0,0 +1,40 @@ +/* + fn_onBtnClickVG.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +private ["_fnc","_idc","_data"]; + +_fnc = [_this,0,nil] call BIS_fnc_param; +_idc = [_this,1,nil] call BIS_fnc_param; + +if(isNil "ExAdCurFlagNetId" || isNil "_fnc" || isNil "_idc")exitWith{ + disableUserInput false; + ["extraApps", 1] call ExileClient_gui_xm8_slide; + false +}; + +_data = lbData [_idc, lbCurSel _idc]; + +if(count _data == 0)then{ + ["ErrorTitleAndText", ["ExAd - Virtual Garage", "You have to choose a vehicle in the proper list!!"]] call ExileClient_gui_toaster_addTemplateToast; +}else{ + [_fnc, [_data, ExAdCurFlagNetId, netId player]] call ExAd_fnc_serverDispatch; + closeDialog 0; +}; +disableUserInput false; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/customize.sqf new file mode 100644 index 0000000..6b46e39 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/customize.sqf @@ -0,0 +1,35 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +ExAd_VG_MIN_ALLOWED_VEH = 5; //SCALAR - Minimun allowed vehicles in the virtual garage. + +ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR = 3;//SCALAR - How many extra vehicle slots for each territory level. + +ExAd_VG_ACCESS_LEVEL = 1; //SCALAR - Lowest level that can access the Virtual Garage --> 1|2|3 -> Pleb|Moderator|Owner. + +ExAd_VG_CLEAN_ON_STORE = true; //BOOLEAN - If vehicle inventory should reset when stored. + +ExAd_VG_SHOW_ADVHINT = false; //BOOLEAN - If the virtual garage should display an Advanced hint upon store and fetch. + +ExAd_STOP_COMBAT_STORING = true; //BOOLEAN - If set to true players cannot store vehicles while they are in combat. Prevents combat storing. + +ExAd_VG_GIVE_GM = true; //BOOLEAN - If set to true, vehicles spawned from the VG will have Godmode enabled on them. + +ExAd_VG_GM_TIME = 20; //SCALAR - Time for vehicles to have Godmode enabled in seconds (Will be ingored if ExAd_VG_GIVE_GODMODE = false) + +ExAd_VG_ALLOWED_VEH_TYPE = ["Car","Tank","Plane","Air","Ship","Submarine"];//ARRAY - Array with allowed vehicle types for the virtual garage. | "Car", "Tank", "Helicopter", "Plane" or "Air" for both WARNING DON'T USE "LandVehicle" Can crash the Exile system. diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/postInit.sqf new file mode 100644 index 0000000..366e439 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/postInit.sqf @@ -0,0 +1,44 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +_path = "ExAdClient\VirtualGarage\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +if(isNil "ExAd_VG_MIN_ALLOWED_VEH")then{ExAd_VG_MIN_ALLOWED_VEH = 5;}; +if(isNil "ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR")then{ExAd_VG_ALLOWED_VEH_MULTIPLE_FACTOR = 3;}; +if(isNil "ExAd_VG_ACCESS_LEVEL")then{ExAd_VG_ACCESS_LEVEL = 1;}; +if(isNil "ExAd_VG_CLEAN_ON_STORE")then{ExAd_VG_CLEAN_ON_STORE = true;}; +if(isNil "ExAd_VG_SHOW_ADVHINT")then{ExAd_VG_SHOW_ADVHINT = false;}; +if(isNil "ExAd_STOP_COMBAT_STORING")then{ExAd_STOP_COMBAT_STORING = true;}; +if(isNil "ExAd_VG_GIVE_GM")then{ExAd_VG_GIVE_GM = false;}; +if(isNil "ExAd_VG_GM_TIME")then{ExAd_VG_GM_TIME = 20;}; +if(isNil "ExAd_VG_ALLOWED_VEH_TYPE")then{ExAd_VG_ALLOWED_VEH_TYPE = ["Car","Tank","Plane","Air","Ship","Submarine"];}; + +["STR_ExAd_VG_NOTI_FULL", "The garage is full"] call ExAd_fnc_localize; +["STR_ExAd_VG_NOTI_NOT_PERSISTENT", "You can only store pincode protected vehicles into the garage!"] call ExAd_fnc_localize; +["STR_ExAd_VG_NOTI_NOT_AVAILABLE", "The vehicle is not available anymore!"] call ExAd_fnc_localize; + +["STR_ExAd_VG_APP_DETAILS", "%2 %1Pin code: %3 %1Fuel: %4 %1Damage: %5 %1Texture: %6 %1Items: %7 %1Magazines: %8 %1Weapons: %9"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_BTN_BACK", "Go Back"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_BTN_FETCH", "Fetch"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_BTN_STORE", "Store"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_TTL_STORED", "Stored"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_TTL_DETAILS", "Stored Vehicle Details"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_TTL_NEAR", "In Radius"] call ExAd_fnc_localize; +["STR_ExAd_VG_APP_CB_SECRET", "Stream friendly UI"] call ExAd_fnc_localize; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/BRAma.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/BRAma.paa new file mode 100644 index 0000000..494f919 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/BRAma.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/config.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/config.sqf new file mode 100644 index 0000000..110928a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/config.sqf @@ -0,0 +1,243 @@ +BRAmaRecipesPath = "ExAdClient\XM8\Apps\BRAmaRecipes"; +fnc_recipe_Load = { +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +lbClear 85502; +lbClear 85501; +(_display displayCtrl 85507) ctrlSetText BRAmaRecipesPath + "\BRAma.paa"; + +_CategoryCtrl = _this select 0; +_SelectedCategory = _CategoryCtrl lbData (lbCurSel _CategoryCtrl); + + +for '_j' from 0 to (count (missionConfigFile >> "CfgCraftingRecipes"))-1 do +{ + _CategoryConfig = (missionConfigFile >> "CfgCraftingRecipes") select _j; + _pictureItemClassName = getText(_CategoryConfig >> "pictureItem"); + _RecipeCategory = getText(_CategoryConfig >> "category"); + _RecipeClass = configName _CategoryConfig; + _currentRecipeName = getText(_CategoryConfig >> "name"); + _pictureItemConfig = configFile >> "CfgMagazines" >> _pictureItemClassName; + _recipePicture = getText(_pictureItemConfig >> "picture"); + + if (_RecipeCategory == _SelectedCategory) then + { + _lbsize = lbSize (_display displayCtrl 85501); + (_display displayCtrl 85501) lbAdd Format["%1",_currentRecipeName]; + (_display displayCtrl 85501) lbSetPicture [_lbsize,_recipePicture]; + (_display displayCtrl 85501) lbSetData [_lbsize,_RecipeClass]; + } + else + { + if (_SelectedCategory == "Uncategorised" && _RecipeCategory == "") then + { + _lbsize = lbSize (_display displayCtrl 85501); + (_display displayCtrl 85501) lbAdd Format["%1",_currentRecipeName]; + (_display displayCtrl 85501) lbSetPicture [_lbsize,_recipePicture]; + (_display displayCtrl 85501) lbSetData [_lbsize,_RecipeClass]; + }; + }; + +}; + + lbSort (_display displayCtrl 85501); + +}; + +fnc_components_Load = { +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +_equippedMagazines = magazines player; +_SelectedRecipeCtrl = _this select 0; +SelectedRecipe = _SelectedRecipeCtrl lbData (lbCurSel _SelectedRecipeCtrl); + +_components = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "components"); +_Tools = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "tools"); +_requiredInteractionModelGroup = getText(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiredInteractionModelGroup"); +_requiresOcean = getNumber(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiresOcean"); +_requiresFire = getNumber(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiresFire"); +_returnedItems = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "returnedItems"); + +lbClear 85502; + + /*********************** + * Populate Components * + ***********************/ + (_display displayCtrl 85502) lbAdd Format["====== COMPONENTS ======"]; + { + _Quantity = _x select 0; + _Component = _x select 1; + + _ComponentDispName = getText (configfile >> "CfgMagazines" >> _Component >> "displayName"); + _ComponentPicture = getText (configfile >> "CfgMagazines" >> _Component >> "picture"); + + //Exile Code + _equippedComponentQuantity = { _x == _Component} count _equippedMagazines; + if (_equippedComponentQuantity < _Quantity ) then + { + (_display displayCtrl 85502) lbAdd Format["%3 - [%1/%2]", _equippedComponentQuantity, _Quantity, _ComponentDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%3 - [%1/%2]", _equippedComponentQuantity, _Quantity, _ComponentDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + + + + (_display displayCtrl 85502) lbSetPicture [_forEachIndex+1,_ComponentPicture]; + (_display displayCtrl 85502) lbSetData [_forEachIndex+1,_Component]; + + } forEach _components; + + + /*********************** + * Populate Tools * + ***********************/ + if (count _Tools > 0) then { (_display displayCtrl 85502) lbAdd Format["====== TOOLS ======"]; }; + + { + + _Tool = _x; + + _ToolDispName = getText (configfile >> "CfgMagazines" >> _Tool >> "displayName"); + _ToolPicture = getText (configfile >> "CfgMagazines" >> _Tool >> "picture"); + + //Exile Code + _equippedToolQuantity = { _x == _Tool } count _equippedMagazines; + if (_equippedToolQuantity == 0 ) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]",_ToolDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_ToolDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + + }; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetPicture [_lbsize-1,_ToolPicture]; + (_display displayCtrl 85502) lbSetData [_lbsize-1,_Tool]; + } forEach _Tools; + + + /*********************** + * Populate Required * + ***********************/ + if (_requiredInteractionModelGroup != "" || _requiresOcean == 1 || _requiresFire == 1) then { (_display displayCtrl 85502) lbAdd Format["====== REQUIRES ======"]; }; + + /*********************** + * Populate Models * + ***********************/ + + if (_requiredInteractionModelGroup != "") then + { + _foundObject = false; + + _interactionModelGroupConfig = missionConfigFile >> "CfgInteractionModels" >> _requiredInteractionModelGroup; + _RequiredDispName = getText(_interactionModelGroupConfig >> "name"); + _interactionModelGroupModels = getArray(_interactionModelGroupConfig >> "models"); + + //Exile Code + if ([ASLtoAGL (getPosASL player), 10, _interactionModelGroupModels] call ExileClient_util_model_isNearby) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + _foundObject = true; + } + else + { + if ( _interactionModelGroupModels call ExileClient_util_model_isLookingAt ) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + _foundObject = true; + }; + }; + if !(_foundObject) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + }; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetData [_lbsize-1,_requiredInteractionModelGroup]; + }; + + /*********************** + * Populate Ocean * + ***********************/ + + if (_requiresOcean == 1) then + { + //Exile Code + if !(surfaceIsWater getPos player) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]", "Ocean"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]", "Ocean"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + + }; + + /*********************** + * Populate Fire * + ***********************/ + + if (_requiresFire == 1) then + { + //Exile Code + if !([player, 4] call ExileClient_util_world_isFireInRange) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]", "Fire"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]", "Fire"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + + }; + + /*********************** + * Populate Returns * + ***********************/ + + (_display displayCtrl 85502) lbAdd Format["====== RETURNS ======"]; + { + _Quantity = _x select 0; + _Component = _x select 1; + + _ComponentDispName = getText (configfile >> "CfgMagazines" >> _Component >> "displayName"); + _ComponentPicture = getText (configfile >> "CfgMagazines" >> _Component >> "picture"); + + (_display displayCtrl 85502) lbAdd Format["%2 - [%1]", _Quantity, _ComponentDispName]; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetPicture [_lbsize-1,_ComponentPicture]; + (_display displayCtrl 85502) lbSetData [_lbsize-1,_Component]; + (_display displayCtrl 85507) ctrlSetText _ComponentPicture; + } forEach _returnedItems; + + + +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onLoad.sqf new file mode 100644 index 0000000..73a6701 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onLoad.sqf @@ -0,0 +1,65 @@ +params["_display","_slide","_idc"]; +private ["_recipesRecipeList","_goCraftBtn","_backbtn","_recipeList","_recipesPic","_componentsList","_RecipeCategories","_j","_CategoryConfig","_RecipeCategory","_newParent"]; +disableSerialization; + +_pW = 0.025; +_pH = 0.04; +_footTop = 0.04; +_slideClass = "BRAmaRecipes"; + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[0, -0.03, 34 * _pW, 0.76]] call ExAd_fnc_createCtrlGrp; +_newParent ctrlEnable true; +_recipesCategories = _display ctrlCreate ["RscCombo", 85505,_newParent]; +_recipesCategories ctrlSetPosition [0.01, 0.1,0.38,0.04]; +_recipesCategories ctrlSetEventHandler ["LBSelChanged", "_this call fnc_recipe_Load"]; +_recipesCategories ctrlCommit 0; + +_goCraftBtn = _display ctrlCreate ["RscButtonMenu", 85503,_newParent]; +_goCraftBtn ctrlSetPosition [0.4,0.1,0.21,0.04]; +_goCraftBtn ctrlCommit 0; +_goCraftBtn ctrlSetText "Craft"; +_goCraftBtn ctrlSetEventHandler ["ButtonClick", "SelectedRecipe call ExileClient_gui_crafting_show;"]; + +_backbtn = _display ctrlCreate ["RscButtonMenu", 85504,_newParent]; +_backbtn ctrlSetPosition [0.62,0.1,0.20,0.04]; +_backbtn ctrlCommit 0; +_backbtn ctrlSetText "Go Back"; +_backbtn ctrlSetEventHandler ["ButtonClick", "['extraApps', 1] call ExileClient_gui_xm8_slide"]; + +_recipeList = _display ctrlCreate ["RscListBox", 85501,_newParent]; +_recipeList ctrlSetPosition [0.01, 0.16, 0.38, 0.28]; +_recipeList ctrlSetEventHandler ["LBSelChanged", "_this call fnc_components_Load;"]; +_recipeList ctrlCommit 0; + +_recipesPic = _display ctrlCreate ["RscPictureKeepAspect", 85507,_newParent]; +_recipesPic ctrlSetPosition [0.01, 0.43, 0.38, 0.28]; +_recipesPic ctrlCommit 0; +_RecipePic ctrlSetText BRAmaRecipesPath + "\BRAma.paa"; + + +_componentsList = _display ctrlCreate ["RscListBox", 85502,_newParent]; +_componentsList ctrlSetPosition [0.4, 0.16, 0.42, 0.57]; +_componentsList ctrlCommit 0; + +_RecipeCategories = []; + +for '_j' from 0 to (count (missionConfigFile >> "CfgCraftingRecipes"))-1 do +{ + _CategoryConfig = (missionConfigFile >> "CfgCraftingRecipes") select _j; + + _RecipeCategory = getText(_CategoryConfig >> "category"); + + if!(_RecipeCategory in _RecipeCategories)then{_RecipeCategories pushBack _RecipeCategory;}; + _RecipeCategory = "Uncategorised"; + if!(_RecipeCategory in _RecipeCategories)then{_RecipeCategories pushBack _RecipeCategory;}; + +}; + +lbClear _recipesCategories; +{ + _recipesCategories lbAdd Format["%1",_x]; + _recipesCategories lbSetData [_forEachIndex,_x]; +} foreach _RecipeCategories; + +lbSort _recipesCategories; +_recipesCategories lbSetCurSel 0; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onOpen.sqf new file mode 100644 index 0000000..63cb3eb --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/BRAmaRecipes/onOpen.sqf @@ -0,0 +1,217 @@ +fnc_recipe_Load = { + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + + lbClear 85502; + lbClear 85501; + (_display displayCtrl 85507) ctrlSetText BRAmaRecipesPath + "\BRAma.paa"; + + _CategoryCtrl = _this select 0; + _SelectedCategory = _CategoryCtrl lbData (lbCurSel _CategoryCtrl); + + + for '_j' from 0 to (count (missionConfigFile >> "CfgCraftingRecipes"))-1 do + { + _CategoryConfig = (missionConfigFile >> "CfgCraftingRecipes") select _j; + _pictureItemClassName = getText(_CategoryConfig >> "pictureItem"); + _RecipeCategory = getText(_CategoryConfig >> "category"); + _RecipeClass = configName _CategoryConfig; + _currentRecipeName = getText(_CategoryConfig >> "name"); + _pictureItemConfig = configFile >> "CfgMagazines" >> _pictureItemClassName; + _recipePicture = getText(_pictureItemConfig >> "picture"); + + if (_RecipeCategory == _SelectedCategory) then + { + _lbsize = lbSize (_display displayCtrl 85501); + (_display displayCtrl 85501) lbAdd Format["%1",_currentRecipeName]; + (_display displayCtrl 85501) lbSetPicture [_lbsize,_recipePicture]; + (_display displayCtrl 85501) lbSetData [_lbsize,_RecipeClass]; + } + else + { + if (_SelectedCategory == "Uncategorised" && _RecipeCategory == "") then + { + _lbsize = lbSize (_display displayCtrl 85501); + (_display displayCtrl 85501) lbAdd Format["%1",_currentRecipeName]; + (_display displayCtrl 85501) lbSetPicture [_lbsize,_recipePicture]; + (_display displayCtrl 85501) lbSetData [_lbsize,_RecipeClass]; + }; + }; + + }; + lbSort (_display displayCtrl 85501); +}; + +fnc_components_Load = { + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + + _equippedMagazines = magazines player; + _SelectedRecipeCtrl = _this select 0; + SelectedRecipe = _SelectedRecipeCtrl lbData (lbCurSel _SelectedRecipeCtrl); + + _components = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "components"); + _Tools = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "tools"); + _requiredInteractionModelGroup = getText(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiredInteractionModelGroup"); + _requiresOcean = getNumber(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiresOcean"); + _requiresFire = getNumber(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiresFire"); + _returnedItems = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "returnedItems"); + + lbClear 85502; + + //Populate Components + (_display displayCtrl 85502) lbAdd Format["====== COMPONENTS ======"]; + + { + _Quantity = _x select 0; + _Component = _x select 1; + + _ComponentDispName = getText (configfile >> "CfgMagazines" >> _Component >> "displayName"); + _ComponentPicture = getText (configfile >> "CfgMagazines" >> _Component >> "picture"); + + //Exile Code + _equippedComponentQuantity = { _x == _Component} count _equippedMagazines; + if (_equippedComponentQuantity < _Quantity ) then + { + (_display displayCtrl 85502) lbAdd Format["%3 - [%1/%2]", _equippedComponentQuantity, _Quantity, _ComponentDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%3 - [%1/%2]", _equippedComponentQuantity, _Quantity, _ComponentDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + + + + (_display displayCtrl 85502) lbSetPicture [_forEachIndex+1,_ComponentPicture]; + (_display displayCtrl 85502) lbSetData [_forEachIndex+1,_Component]; + + } forEach _components; + + + //Populate Tools + if (count _Tools > 0) then { (_display displayCtrl 85502) lbAdd Format["====== TOOLS ======"]; }; + { + _Tool = _x; + + _ToolDispName = getText (configfile >> "CfgMagazines" >> _Tool >> "displayName"); + _ToolPicture = getText (configfile >> "CfgMagazines" >> _Tool >> "picture"); + + //Exile Code + _equippedToolQuantity = { _x == _Tool } count _equippedMagazines; + if (_equippedToolQuantity == 0 ) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]",_ToolDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_ToolDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + + }; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetPicture [_lbsize-1,_ToolPicture]; + (_display displayCtrl 85502) lbSetData [_lbsize-1,_Tool]; + } forEach _Tools; + + + //Populate Required + if (_requiredInteractionModelGroup != "" || _requiresOcean == 1 || _requiresFire == 1) then { (_display displayCtrl 85502) lbAdd Format["====== REQUIRES ======"]; }; + + //Populate Models + if (_requiredInteractionModelGroup != "") then + { + _foundObject = false; + + _interactionModelGroupConfig = missionConfigFile >> "CfgInteractionModels" >> _requiredInteractionModelGroup; + _RequiredDispName = getText(_interactionModelGroupConfig >> "name"); + _interactionModelGroupModels = getArray(_interactionModelGroupConfig >> "models"); + + //Exile Code + if ([ASLtoAGL (getPosASL player), 10, _interactionModelGroupModels] call ExileClient_util_model_isNearby) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + _foundObject = true; + } + else + { + if ( _interactionModelGroupModels call ExileClient_util_model_isLookingAt ) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + _foundObject = true; + }; + }; + if !(_foundObject) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]",_RequiredDispName]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + }; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetData [_lbsize-1,_requiredInteractionModelGroup]; + }; + + //Populate Ocean + if (_requiresOcean == 1) then + { + //Exile Code + if !(surfaceIsWater getPos player) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]", "Ocean"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]", "Ocean"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + }; + + //Populate Fire + if (_requiresFire == 1) then + { + //Exile Code + if !([player, 4] call ExileClient_util_world_isFireInRange) then + { + (_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]", "Fire"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]]; + } + else + { + (_display displayCtrl 85502) lbAdd Format["%1 - [OK]", "Fire"]; + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]]; + }; + }; + + //Populate Returns + (_display displayCtrl 85502) lbAdd Format["====== RETURNS ======"]; + { + _Quantity = _x select 0; + _Component = _x select 1; + + _ComponentDispName = getText (configfile >> "CfgMagazines" >> _Component >> "displayName"); + _ComponentPicture = getText (configfile >> "CfgMagazines" >> _Component >> "picture"); + + (_display displayCtrl 85502) lbAdd Format["%2 - [%1]", _Quantity, _ComponentDispName]; + + _lbsize = lbSize (_display displayCtrl 85502); + (_display displayCtrl 85502) lbSetPicture [_lbsize-1,_ComponentPicture]; + (_display displayCtrl 85502) lbSetData [_lbsize-1,_Component]; + (_display displayCtrl 85507) ctrlSetText _ComponentPicture; + } forEach _returnedItems; + +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onCheckedChanged.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onCheckedChanged.sqf new file mode 100644 index 0000000..464ca26 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onCheckedChanged.sqf @@ -0,0 +1,25 @@ +_state = [_this, 0, 0, [0]] call BIS_fnc_param; +_syncVar = [_this, 1, "", [""]] call BIS_fnc_param; +_slider = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; +_text = [_this, 3, controlNull, [0, controlNull]] call BIS_fnc_param; +_sliderView = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param; +_varType = [_this, 5, "", [""]] call BIS_fnc_param; + +if (_state == 1) then { + call compile format ["%1 = true",_syncVar]; + call compile format ["profileNamespace setVariable ['%1',%1]", _syncVar]; + ctrlEnable [_slider, false]; + ctrlEnable [_text, false]; + + ctrlSetText [_text, str round ((sliderPosition _sliderView) min CHVD_maxObj)]; + sliderSetPosition [_slider, (sliderPosition _sliderView) min CHVD_maxObj]; + + call compile format ["%1 = %2", _varType, (sliderPosition _sliderView) min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType]; + [3] call CHVD_fnc_updateSettings; +} else { + call compile format ["%1 = false",_syncVar]; + call compile format ["profileNamespace setVariable ['%1',%1]", _syncVar]; + ctrlEnable [_slider, true]; + ctrlEnable [_text, true]; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBinput.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBinput.sqf new file mode 100644 index 0000000..b07294a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBinput.sqf @@ -0,0 +1,81 @@ +private ["_textValue","_updateType"]; +_varType1 = [_this, 0, "", [""]] call BIS_fnc_param; +_slider1 = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param; +_text1 = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; +_varType2 = [_this, 3, "", [""]] call BIS_fnc_param; +_slider2 = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param; +_text2 = [_this, 5, controlNull, [0, controlNull]] call BIS_fnc_param; +_syncVar = [_this, 6, "", [""]] call BIS_fnc_param; + +if (count _this < 7) then { + _updateType = 2; +} else { + if (call compile _syncVar) then { + _updateType = 3; + } else { + _updateType = 1; + }; +}; + +switch (_updateType) do { + case 1: { + _textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString; + _textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0}; + + sliderSetPosition [_slider1, _textValue min CHVD_maxView]; + //ctrlSetText [_text1, str round (_textValue min CHVD_maxView)]; + sliderSetRange [_slider2, 0, _textValue min CHVD_maxView]; + + call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxView]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _textValue) then { + sliderSetPosition [_slider2, _textValue min CHVD_maxObj]; + ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 2: { + _textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString; + _textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0}; + + sliderSetPosition [_slider1, _textValue min CHVD_maxObj]; + //ctrlSetText [_text1, str round (_textValue min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 3: { + _textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString; + _textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0}; + + sliderSetPosition [_slider1, _textValue min CHVD_maxView]; + //ctrlSetText [_text1, str round (_textValue min CHVD_maxView)]; + sliderSetRange [_slider2, 0, _textValue min CHVD_maxView]; + + call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxView]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _textValue) then { + sliderSetPosition [_slider2, _textValue min CHVD_maxObj]; + ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + sliderSetPosition [_slider2, _textValue min CHVD_maxObj]; + ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + + [_updateType] call CHVD_fnc_updateSettings; + }; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBterrainInput.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBterrainInput.sqf new file mode 100644 index 0000000..89250d5 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onEBterrainInput.sqf @@ -0,0 +1,33 @@ +private ["_textValue"]; +_varType = [_this, 0, "", [""]] call BIS_fnc_param; +_textCtrl = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param; +_listbox = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; + +_textValue = [ctrlText _textCtrl, "0123456789."] call BIS_fnc_filterString; +_textValue = if (_textValue == "") then {50} else {call compile _textValue min 50 max 3.125}; + + +if (!CHVD_allowNoGrass) then { + _textValue = _textValue min 48.99; +}; + +//update listbox +_listboxCtrl = (finddisplay 2900) displayCtrl _listbox; +//remove EH not to cause huge lag +_listboxCtrl ctrlRemoveAllEventHandlers "LBSelChanged"; +_sel = [_textValue] call CHVD_fnc_selTerrainQuality; +if (CHVD_allowNoGrass) then { + _listboxCtrl lbSetCurSel _sel; +} else { + _listboxCtrl lbSetCurSel (_sel - 1); +}; +//add EH again +_listboxCtrl ctrlSetEventHandler ["LBSelChanged", + format ["[_this select 1, '%1', %2] call CHVD_fnc_onLBSelChanged", _varType, _textCtrl] +]; + +//ctrlSetText [_textCtrl, str _textValue]; +call compile format ["%1 = %2",_varType, _textValue]; +call compile format ["profileNamespace setVariable ['%1',%1]", _varType]; + +[] call CHVD_fnc_updateTerrain; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onLBSelChanged.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onLBSelChanged.sqf new file mode 100644 index 0000000..180b472 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onLBSelChanged.sqf @@ -0,0 +1,27 @@ +private ["_index","_terrainGrid"]; +_index = _this select 0; +_varType = _this select 1; +_text = _this select 2; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +_ctrl = [_display,"ExAd_CHVD",_text] call ExAd_fnc_getAppCtrl; + +if (!CHVD_allowNoGrass) then { + _index = _index + 1; +}; + +switch (_index) do { + case 0: {_terrainGrid = 50}; + case 1: {_terrainGrid = 25}; + case 2: {_terrainGrid = 12.5}; + case 3: {_terrainGrid = 3.125}; +}; + +if (!CHVD_allowNoGrass) then { + _terrainGrid = _terrainGrid min 48.99; +}; + +_ctrl ctrlSetText format["%1",_terrainGrid]; +call compile format ["%1 = %2",_varType, _terrainGrid]; +call compile format ["profileNamespace setVariable ['%1',%1]", _varType]; +[] call CHVD_fnc_updateTerrain; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onSliderChange.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onSliderChange.sqf new file mode 100644 index 0000000..78f0948 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_onSliderChange.sqf @@ -0,0 +1,73 @@ +private ["_sliderPos","_updateType"]; +_varType1 = [_this, 0, "", [""]] call BIS_fnc_param; +_slider1 = ctrlIDC ([_this, 1, 0, [0, controlNull]] call BIS_fnc_param); +_sliderPos = [_this, 2, 0, [0]] call BIS_fnc_param; +_text1 = [_this, 3, 0, [0, controlNull]] call BIS_fnc_param; +_varType2 = [_this, 4, "", [""]] call BIS_fnc_param; +_slider2 = [_this, 5, 0, [0, controlNull]] call BIS_fnc_param; +_text2 = [_this, 6, 0, [0, controlNull]] call BIS_fnc_param; +_syncVar = [_this, 7, "", [""]] call BIS_fnc_param; + +if (count _this < 8) then { + _updateType = 2; +} else { + if (call compile _syncVar) then { + _updateType = 3; + } else { + _updateType = 1; + }; +}; + +switch (_updateType) do { + case 1: { + sliderSetPosition [_slider1, _sliderPos min CHVD_maxView]; + ctrlSetText [_text1, str round (_sliderPos min CHVD_maxView)]; + sliderSetRange [_slider2, 0, _sliderPos min CHVD_maxView]; + + call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxView]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _sliderPos) then { + sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj]; + ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 2: { + sliderSetPosition [_slider1, _sliderPos min CHVD_maxObj]; + ctrlSetText [_text1, str round (_sliderPos min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 3: { + sliderSetPosition [_slider1, _sliderPos min CHVD_maxView]; + ctrlSetText [_text1, str round (_sliderPos min CHVD_maxView)]; + sliderSetRange [_slider2, 0, _sliderPos min CHVD_maxView]; + + call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxView]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _sliderPos) then { + sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj]; + ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj]; + ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)]; + + call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + + [_updateType] call CHVD_fnc_updateSettings; + }; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_selTerrainQuality.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_selTerrainQuality.sqf new file mode 100644 index 0000000..0853b83 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_selTerrainQuality.sqf @@ -0,0 +1,20 @@ +private ["_output"]; +_terrainGrid = _this select 0; +switch (true) do { + case (_terrainGrid >= 49): { + _output = 0; + }; + case (_terrainGrid >= 25): { + _output = 1; + }; + case (_terrainGrid >= 12.5): { + _output = 2; + }; + case (_terrainGrid >= 3.125): { + _output = 3; + }; + default { + _output = 0; + }; +}; +_output \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateSettings.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateSettings.sqf new file mode 100644 index 0000000..e80bb0d --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateSettings.sqf @@ -0,0 +1,61 @@ +_updateType = [_this, 0, 0, [0]] call BIS_fnc_param; // 1 - view, 2 - obj, 3 - both, 0 - both and terrain +_inUAV = if (isNil {_this select 1}) then {UAVControl (getConnectedUAV player) select 1 != ""} else {_this select 1}; + +if (_inUAV) then { + switch (true) do { + case (getConnectedUAV player isKindOf "LandVehicle" || getConnectedUAV player isKindOf "Ship"): { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_car; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_carObj; + }; + }; + case (getConnectedUAV player isKindOf "Man"): { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_foot; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_footObj; + }; + }; + default { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_air; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_airObj; + }; + }; + }; +} else { + switch (true) do { + case (vehicle player isKindOf "LandVehicle" || vehicle player isKindOf "Ship"): { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_car; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_carObj; + }; + }; + case (vehicle player isKindOf "Air"): { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_air; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_airObj; + }; + }; + default { + if (_updateType == 1 || _updateType == 0 || _updateType == 3) then { + setViewDistance CHVD_foot; + }; + if (_updateType == 2 || _updateType == 0 || _updateType == 3) then { + setObjectViewDistance CHVD_footObj; + }; + }; + }; +}; +if (_updateType == 0) then { + [_inUAV] call CHVD_fnc_updateTerrain; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateTerrain.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateTerrain.sqf new file mode 100644 index 0000000..0e5515a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Functions/fn_updateTerrain.sqf @@ -0,0 +1,27 @@ +_inUAV = if (isNil {_this select 0}) then {UAVControl (getConnectedUAV player) select 1 != ""} else {_this select 0}; + +if (_inUAV) then { + switch (true) do { + case (getConnectedUAV player isKindOf "LandVehicle" || getConnectedUAV player isKindOf "Ship"): { + setTerrainGrid CHVD_carTerrain; + }; + case (getConnectedUAV player isKindOf "Man"): { + setTerrainGrid CHVD_footTerrain; + }; + default { + setTerrainGrid CHVD_airTerrain; + }; + }; +} else { + switch (true) do { + case (vehicle player isKindOf "LandVehicle" || vehicle player isKindOf "Ship"): { + setTerrainGrid CHVD_carTerrain; + }; + case (vehicle player isKindOf "Air"): { + setTerrainGrid CHVD_airTerrain; + }; + default { + setTerrainGrid CHVD_footTerrain; + }; + }; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Icon_CHVD.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Icon_CHVD.paa new file mode 100644 index 0000000..c40e23a Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Icon_CHVD.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/config.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/config.sqf new file mode 100644 index 0000000..bf8e87d --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/config.sqf @@ -0,0 +1,90 @@ + +CHVD_allowNoGrass = true; //TRUE||FALSE + +CHVD_maxView = 12000; //0-12000 + +CHVD_maxObj = 12000; //0-12000 + + +/*///////////////////////////////////////////////////////////////////////////////////// +//////DON'T TOUCH ANYTHING BELLOW THIS HERE IF YOU DON'T KNOW WHAT YOU ARE DOING ////// +/////////////////////////////////////////////////////////////////////////////////////*/ + +{ + _x call ExAd_fnc_localize; +}forEach +[ + ["STR_chvd_title","View Distance Settings"],["STR_chvd_foot","ON FOOT"],["STR_chvd_car","IN CAR"],["STR_chvd_air","IN AIR"],["STR_chvd_view","VIEW"],["STR_chvd_object","OBJECT"],["STR_chvd_terrain","TERRAIN"],["STR_chvd_sync","Sync object with view"],["STR_chvd_close",""],["STR_chvd_low","Low"],["STR_chvd_standard","Standard"],["STR_chvd_high","High"],["STR_chvd_veryHigh","Very High"] +]; + +["STR_chvd_title","View Distance Settings"] call ExAd_fnc_localize; + +{ + _code = ''; + _function = _x select 0; + _file = format["ExAdClient\XM8\Apps\CHVD\Functions\%1", _x select 1]; + + _code = compileFinal (preprocessFileLineNumbers _file); + + missionNamespace setVariable [_function, _code]; +} +forEach +[ + ["CHVD_fnc_onCheckedChanged", "fn_onCheckedChanged.sqf"], + ["CHVD_fnc_onSliderChange", "fn_onSliderChange.sqf"], + ["CHVD_fnc_onLBSelChanged", "fn_onLBSelChanged.sqf"], + ["CHVD_fnc_onEBinput", "fn_onEBinput.sqf"], + ["CHVD_fnc_onEBterrainInput", "fn_onEBterrainInput.sqf"], + ["CHVD_fnc_selTerrainQuality", "fn_selTerrainQuality.sqf"], + ["CHVD_fnc_updateTerrain", "fn_updateTerrain.sqf"], + ["CHVD_fnc_updateSettings", "fn_updateSettings.sqf"] +]; + + +[] spawn { + CHVD_scriptRunning = true; + //Wait for mission init, in case there are variables defined some place else + waitUntil {time > 0 && !isNil "ExileClientPlayerIsSpawned"}; + + //Define variables, load from profileNamespace + CHVD_allowNoGrass = if (isNil "CHVD_allowNoGrass") then {true} else {CHVD_allowNoGrass}; + CHVD_maxView = if (isNil "CHVD_maxView") then {12000} else {CHVD_maxView}; + CHVD_maxObj = if (isNil "CHVD_maxObj") then {12000} else {CHVD_maxObj}; + + CHVD_footSyncObj = profileNamespace getVariable ["CHVD_footSyncObj",false]; + CHVD_carSyncObj = profileNamespace getVariable ["CHVD_carSyncObj",false]; + CHVD_airSyncObj = profileNamespace getVariable ["CHVD_airSyncObj",false]; + + CHVD_foot = (profileNamespace getVariable ["CHVD_foot",viewDistance]) min CHVD_maxView; + CHVD_car = (profileNamespace getVariable ["CHVD_car",viewDistance]) min CHVD_maxView; + CHVD_air = (profileNamespace getVariable ["CHVD_air",viewDistance]) min CHVD_maxView; + + CHVD_footObj = (profileNamespace getVariable ["CHVD_footObj",viewDistance]) min CHVD_maxObj; + CHVD_carObj = (profileNamespace getVariable ["CHVD_carObj",viewDistance]) min CHVD_maxObj; + CHVD_airObj = (profileNamespace getVariable ["CHVD_airObj",viewDistance]) min CHVD_maxObj; + + CHVD_footTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_footTerrain",25]} else {(profileNamespace getVariable ["CHVD_footTerrain",25]) min 48.99 max 3.125}; + CHVD_carTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_carTerrain",25]} else {(profileNamespace getVariable ["CHVD_carTerrain",25]) min 48.99 max 3.125}; + CHVD_airTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_airTerrain",25]} else {(profileNamespace getVariable ["CHVD_airTerrain",25]) min 48.99 max 3.125}; + + //Begin initialization + waitUntil {!isNull player}; + waitUntil {!isNull findDisplay 46}; + + //Detect when to change setting type + [] spawn { + for "_i" from 0 to 1 step 0 do { + [nil, false] call CHVD_fnc_updateSettings; + _currentVehicle = vehicle player; + waitUntil {_currentVehicle != vehicle player}; + }; + }; + [] spawn { + for "_i" from 0 to 1 step 0 do { + waitUntil {UAVControl (getConnectedUAV player) select 1 != ""}; + [nil, true] call CHVD_fnc_updateSettings; + waitUntil {UAVControl (getConnectedUAV player) select 1 == ""}; + [nil, false] call CHVD_fnc_updateSettings; + }; + }; +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onClose.sqf new file mode 100644 index 0000000..e69de29 diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onLoad.sqf new file mode 100644 index 0000000..ecbd0e1 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onLoad.sqf @@ -0,0 +1,101 @@ +/* + onLoad.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; + +_margin = 0.5; +_rowH = 1.3 * _pH; +_blockH = 6 * _pH; + +_leftCol = 0 * _pW; +_leftColW = 6 * _pW; + +_midCol = _leftCol + _leftColW + (_margin * _pW); +_midColW = 20 * _pW; + +_rightCol = _midCol + _midColW + (_margin * _pW); +_rightColW = 5 * _pW; + +_footTop = 1 * _pH; +_carTop = _footTop + _blockH; +_airTop = _carTop + _blockH; + +_slideClass = "ExAd_CHVD"; + +[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',"GO BACK"] call ExAd_fnc_createButton; + + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[0, _footTop, 34 * _pW, 16 * _pH]] call ExAd_fnc_createCtrlGrp; +_newParent ctrlEnable true; + +//ON FOOT +[_display,_newParent,([_slideClass,"strTxtFootTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop, _leftColW, _rowH],STR_chvd_foot,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"strTxtFootSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _footTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"cbFootSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _footTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox; + +[_display,_newParent,([_slideClass,"strTxtFootView"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderFootView"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editFootView"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtFootObj"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderFootObj"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editFootObj"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtFootTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"xListFootTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList; +[_display,_newParent,([_slideClass,"strTxtFootTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText; + +//IN CAR +[_display,_newParent,([_slideClass,"strTxtCarTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop, _leftColW, _rowH],STR_chvd_car,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"strTxtCarSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _carTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"cbCarSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _carTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox; + +[_display,_newParent,([_slideClass,"strTxtCarView"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderCarView"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editCarView"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtCarObj"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderCarObj"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editCarObj"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtCarTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"xListCarTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList; +[_display,_newParent,([_slideClass,"strTxtCarTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText; + + +//IN AIR +[_display,_newParent,([_slideClass,"strTxtAirTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop, _leftColW, _rowH],STR_chvd_air,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"strTxtAirSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _airTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"cbAirSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _airTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox; + +[_display,_newParent,([_slideClass,"strTxtAirView"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderAirView"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editAirView"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtAirObj"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"sliderAirObj"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH; +[_display,_newParent,([_slideClass,"editAirObj"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit; + +[_display,_newParent,([_slideClass,"strTxtCarTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; +[_display,_newParent,([_slideClass,"xListAirTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList; +[_display,_newParent,([_slideClass,"strTxtAirTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText; + + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onOpen.sqf new file mode 100644 index 0000000..15f594c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onOpen.sqf @@ -0,0 +1,139 @@ +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +{ + ([_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl) ctrlSetText format["%1", _x select 1]; +} forEach +[ + ["editFootView", str round CHVD_foot], + ["editFootObj", str round CHVD_footObj], + ["editCarView", str round CHVD_car], + ["editCarObj", str round CHVD_carObj], + ["editAirView", str round CHVD_air], + ["editAirObj", str round CHVD_airObj], + ["strTxtFootTerrainEdit", str CHVD_footTerrain], + ["strTxtCarTerrainEdit", str CHVD_carTerrain], + ["strTxtAirTerrainEdit", str CHVD_airTerrain] +]; + +{ + private["_ctrl"]; + _ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl; + _ctrl sliderSetRange [0, _x select 2]; + _ctrl sliderSetSpeed [500, 500]; + _ctrl sliderSetPosition (_x select 1); +} forEach +[ + ["sliderFootView", CHVD_foot, CHVD_maxView], + ["sliderFootObj", CHVD_footObj, CHVD_maxObj], + ["sliderCarView", CHVD_car, CHVD_maxView], + ["sliderCarObj", CHVD_carObj, CHVD_maxObj], + ["sliderAirView", CHVD_air, CHVD_maxView], + ["sliderAirObj", CHVD_airObj, CHVD_maxObj] +]; + +{ + ([_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl) cbSetChecked (_x select 1); +} forEach +[ + ["cbFootSyncObj",CHVD_footSyncObj], + ["cbCarSyncObj",CHVD_carSyncObj], + ["cbAirSyncObj",CHVD_airSyncObj] +]; + +{ + _ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl; + if (CHVD_allowNoGrass) then { + _ctrl lbAdd STR_chvd_low; + }; + _ctrl lbAdd STR_chvd_standard; + _ctrl lbAdd STR_chvd_high; + _ctrl lbAdd STR_chvd_veryHigh; + + _sel = [_x select 1] call CHVD_fnc_selTerrainQuality; + if (CHVD_allowNoGrass) then { + _ctrl lbSetCurSel _sel; + } else { + _ctrl lbSetCurSel (_sel - 1); + }; +} forEach +[ + ["xListFootTerrain",CHVD_footTerrain], + ["xListCarTerrain",CHVD_carTerrain], + ["xListAirTerrain",CHVD_airTerrain] +]; + +//Edit eventHandlers +_sliderFootView = [_display,"ExAd_CHVD","sliderFootView"] call ExAd_fnc_getAppCtrl; +_editFootView = [_display,"ExAd_CHVD","editFootView"] call ExAd_fnc_getAppCtrl; +_sliderFootObj = [_display,"ExAd_CHVD","sliderFootObj"] call ExAd_fnc_getAppCtrl; +_editFootObj = [_display,"ExAd_CHVD","editFootObj"] call ExAd_fnc_getAppCtrl; +_cbFootSyncObj = [_display,"ExAd_CHVD","cbFootSyncObj"] call ExAd_fnc_getAppCtrl; + +_editFootView ctrlSetEventHandler ["KeyDown", format["['CHVD_foot', %1, _this select 0, 'CHVD_footObj', %2, %3, 'CHVD_footSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderFootView, ctrlIDC _sliderFootObj, ctrlIDC _editFootObj]]; + +_editFootObj ctrlSetEventHandler ["KeyDown", format["['CHVD_footObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderFootObj]]; + +_cbFootSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_footSyncObj', %1, %2, %3, 'CHVD_footObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderFootObj, ctrlIDC _editFootObj, ctrlIDC _sliderFootView]]; + +_sliderFootView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_foot', _this select 0, _this select 1, %1, 'CHVD_footObj', %2, %3, 'CHVD_footSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editFootView, ctrlIDC _sliderFootObj, ctrlIDC _editFootObj]]; + +_sliderFootObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_footObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editFootObj]]; + + +_sliderCarView = [_display,"ExAd_CHVD","sliderCarView"] call ExAd_fnc_getAppCtrl; +_editCarView = [_display,"ExAd_CHVD","editCarView"] call ExAd_fnc_getAppCtrl; +_sliderCarObj = [_display,"ExAd_CHVD","sliderCarObj"] call ExAd_fnc_getAppCtrl; +_editCarObj = [_display,"ExAd_CHVD","editCarObj"] call ExAd_fnc_getAppCtrl; +_cbCarSyncObj = [_display,"ExAd_CHVD","cbCarSyncObj"] call ExAd_fnc_getAppCtrl; + +_editCarView ctrlSetEventHandler ["KeyDown", format["['CHVD_car', %1, _this select 0, 'CHVD_carObj', %2, %3, 'CHVD_carSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderCarView, ctrlIDC _sliderCarObj, ctrlIDC _editCarObj]]; + +_editCarObj ctrlSetEventHandler ["KeyDown", format["['CHVD_carObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderCarObj]]; + +_cbCarSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_carSyncObj', %1, %2, %3, 'CHVD_carObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderCarObj, ctrlIDC _editCarObj, ctrlIDC _sliderCarView]]; + +_sliderCarView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_car', _this select 0, _this select 1, %1, 'CHVD_carObj', %2, %3, 'CHVD_carSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editCarView, ctrlIDC _sliderCarObj, ctrlIDC _editCarObj]]; + +_sliderCarObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_carObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editCarObj]]; + + +_sliderAirView = [_display,"ExAd_CHVD","sliderAirView"] call ExAd_fnc_getAppCtrl; +_editAirView = [_display,"ExAd_CHVD","editAirView"] call ExAd_fnc_getAppCtrl; +_sliderAirObj = [_display,"ExAd_CHVD","sliderAirObj"] call ExAd_fnc_getAppCtrl; +_editAirObj = [_display,"ExAd_CHVD","editAirObj"] call ExAd_fnc_getAppCtrl; +_cbAirSyncObj = [_display,"ExAd_CHVD","cbAirSyncObj"] call ExAd_fnc_getAppCtrl; + +_editAirView ctrlSetEventHandler ["KeyDown", format["['CHVD_air', %1, _this select 0, 'CHVD_airObj', %2, %3, 'CHVD_airSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderAirView, ctrlIDC _sliderAirObj, ctrlIDC _editAirObj]]; + +_editAirObj ctrlSetEventHandler ["KeyDown", format["['CHVD_airObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderAirObj]]; + +_cbAirSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_airSyncObj', %1, %2, %3, 'CHVD_airObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderAirObj, ctrlIDC _editAirObj, ctrlIDC _sliderAirView]]; + +_sliderAirView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_air', _this select 0, _this select 1, %1, 'CHVD_airObj', %2, %3, 'CHVD_airSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editAirView, ctrlIDC _sliderAirObj, ctrlIDC _editAirObj]]; + +_sliderAirObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_airObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editAirObj]]; + + +{ + _ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl; + _handle = _ctrl ctrlSetEventHandler ["LBSelChanged", + format ["[_this select 1, '%1', '%2'] call CHVD_fnc_onLBSelChanged", _x select 1, _x select 2] + ]; +} forEach +[ + ["xListFootTerrain","CHVD_footTerrain","strTxtFootTerrainEdit"], + ["xListCarTerrain","CHVD_carTerrain","strTxtCarTerrainEdit"], + ["xListAirTerrain","CHVD_airTerrain","strTxtAirTerrainEdit"] +]; + + +_footObj = if(CHVD_footSyncObj)then{false}else{true}; +([_display,"ExAd_CHVD","sliderFootObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _footObj; +([_display,"ExAd_CHVD","editFootObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _footObj; + +_carObj = if(CHVD_carSyncObj)then{false}else{true}; +([_display,"ExAd_CHVD","sliderCarObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _carObj; +([_display,"ExAd_CHVD","editCarObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _carObj; + +_airObj = if(CHVD_airSyncObj)then{false}else{true}; +([_display,"ExAd_CHVD","sliderAirObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _airObj; +([_display,"ExAd_CHVD","editAirObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _airObj; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md new file mode 100644 index 0000000..248683c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md @@ -0,0 +1,84 @@ +#Installation Instructions + +* Move "DeployVehicle" into your "mpmissions\Exile.Tanoa\ExAdClient\XM8\Apps\" folder. +* Navigate and open "mpmissions\Exile.Tanoa\config.cpp" insert the classes "PackDeployedVehicle" into appropriate parent classes. +```cpp +class CfgInteractionMenus +{ + class Car + { + targetType = 2; + target = "Car"; + + class Actions + { + class PackDeployedVehicle: ExileAbstractAction + { + title = "Pack Vehicle"; + condition = "call ExAd_XM8_DV_fnc_canPack"; + action = "call ExAd_XM8_DV_fnc_pack"; + }; + }; + }; + class Bikes + { + targetType = 2; + target = "Bicycle"; + + class Actions + { + class PackDeployedVehicle: ExileAbstractAction + { + title = "Pack Bike"; + condition = "call ExAd_XM8_DV_fnc_canPack"; + action = "call ExAd_XM8_DV_fnc_pack"; + }; + }; + }; +}; +``` + +* Move over and pack exad_dv into "@ExileServer\addons\" +* Add deploy classes into CfgXM8 in "mpmissions\Exile.Tanoa\config.cpp" and add them to the extraApps array; E.g. +```cpp +class CfgXM8 +{ + extraApps[] = {"ExAd_Bike","ExAd_Quad"}; + + class ExAd_Bike + { + title = "Deploy Bike"; + config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf"; + bambiState = 0; + vehicleClass = "Exile_Bike_MountainBike"; + recipe[] = {{"Exile_Item_ExtensionCord",-1}}; + packable = 1; + autoCleanUp = 1; + quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; + }; + class ExAd_Quad + { + title = "Deploy Quad"; + bambiState = 0; + vehicleClass = "Exile_Bike_QuadBike_Fia"; + recipe[] = {{"Exile_Item_ExtensionCord",1}}; + packable = 1; + quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle"; + }; +}; + +``` +## How to use +Each class added to the CfgXM8 will represent a vehicle possible to deploy and add commit a "More" button to it. +One of the deploy classes needs to include the config script so all needed functions will be prepared and read to memory. + +### Options +* title = "Deploy Bike"; -- Button title +* bambiState = 0; -- Bambistate required || 1 = True / 0 = False +* vehicleClass = "Exile_Bike_MountainBike"; -- CfgVehicles class name of desired vehicle +* recipe[] = { + {"Exile_Item_ExtensionCord",-1} + }; -- items needed to craft vehicle, first class name then amount (-1 means required but will not be taken from inventory) +* packable = 1; -- Deployed vehicle can be pack again || 1 = True / 0 = False +* autoCleanUp = 1; -- Server monitize crafted vehicles and despawn if idle to long. || 1 = True / 0 = False +* quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; -- Function that is binded to the button if slide is not neccessary. diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/config.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/config.sqf new file mode 100644 index 0000000..be3d6eb --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/config.sqf @@ -0,0 +1,142 @@ +ExAd_DV_DESPAWN_IDLE_TIME = 600; + +ExAd_XM8_DV_fnc_itemsInCargo = { + params ["_container","_itemArray","_item","_amount","_response"]; + + _item = toLower (_itemArray select 0); + _amount = _itemArray select 1; + + _response = false; + { + if(_item == toLower _x)then{ + _amount = _amount - 1; + }; + if(_amount <= 0)exitWith{_response = true} + }forEach magazines player; + + _response +}; + +ExAd_XM8_DV_fnc_itemsMissing = { + params["_recipe","_recipeStr"]; + + _recipeStr = ""; + { + private["_amount","_configName","_displayName","_text"]; + _amount = if(count _x > 1)then{_x select 1}else{1}; + _text = [_x select 0] call ExAd_XM8_DV_fnc_getDisplayName; + _recipeStr = _recipeStr + format["%1x : %2
",(if(_amount < 0)then{((-1) * _amount)}else{_amount}), _text]; + }forEach _recipe; + + _response = format["You need
%1",_recipeStr]; + + _response +}; + +ExAd_XM8_DV_fnc_getDisplayName = { + params["_class","_configName","_displayName"]; + _configName = _class call ExileClient_util_gear_getConfigNameByClassName; + _displayName = getText(configFile >> _configName >> _class >> "displayName"); + _text = if(count _displayName > 0)then{_displayName}else{_class}; + + _text +}; + +ExAd_XM8_DV_fnc_canPack = { + ( ExileClientInteractionObject getVariable["ExAd_DV_Packable", false] ) +}; + +ExAd_XM8_DV_fnc_pack = { + [ExileClientInteractionObject] spawn { + params["_obj"]; + + disableUserInput true; + player playActionNow "Medic"; + + uiSleep 3; + ["despawnDeployableVehicle", [netId _obj]] call ExAd_fnc_serverDispatch; + uiSleep 1; + + ["SuccessTitleAndText", ["Vehicle Packed"]] call ExileClient_gui_toaster_addTemplateToast; + disableUserInput false; + }; +}; + +ExAd_XM8_DV_fnc_spawnVehicle = { + params["_slideClass","_bambiState","_delopyRecipe","_vehicleClass"]; + + try + { + + if !(vehicle player == player) then { throw "You can't do this in a vehicle!"}; + + _bambiState = if(isNumber(missionConfigFile >> "CfgXM8" >> _slideClass >> "bambiState")) then + { + if(getNumber(missionConfigFile >> "CfgXM8" >> _slideClass >> "bambiState") > 0)then{true}else{false} + } else {true}; + + if(_bambiState && !ExileClientPlayerIsBambi) then { throw "You can only spawn this vehicle as a bambi!"}; + + _szDeploy = if(isNumber(missionConfigFile >> "CfgXM8" >> _slideClass >> "blockInSafezone")) then + { + if(getNumber(missionConfigFile >> "CfgXM8" >> _slideClass >> "blockInSafezone") > 0)then{true}else{false} + } else {true}; + + if(_szDeploy && ExilePlayerInSafezone) then { throw "You cannot deploy this vehicle in a SafeZone."}; + + _delopyRecipe = getArray(missionConfigFile >> "CfgXM8" >> _slideClass >> "recipe"); + if(count _delopyRecipe > 0) then + { + { + if(count _x > 1) then + { + _amount = if(_x select 1 == -1)then{1}else{_x select 1}; + if!([player, [_x select 0, _amount]] call ExAd_XM8_DV_fnc_itemsInCargo) then + { + throw ([_delopyRecipe] call ExAd_XM8_DV_fnc_itemsMissing); + }; + } else { + if!([player, _x select 0] call ExileClient_util_playerEquipment_contains) then + { + throw ([_delopyRecipe] call ExAd_XM8_DV_fnc_itemsMissing); + } + } + }forEach _delopyRecipe; + + { + _count = if(count _x > 1)then{(_x select 1)}else{1}; + for "_i" from 1 to _count do { + [player, _x select 0] call ExileClient_util_playerCargo_remove + } + }forEach _delopyRecipe; + }; + + _vehicleClass = getText(missionConfigFile >> "CfgXM8" >> _slideClass >> "vehicleClass"); + if!(isClass(configFile >> "CfgVehicles" >> _vehicleClass ))then { throw "The vehicle class doesn't exist"}; + + [_slideClass] spawn { + params["_slideClass"]; + disableUserInput true; + player playActionNow "Medic"; + + uiSleep 3; + ["spawnDeployableVehicle", [netId player, _slideClass]] call ExAd_fnc_serverDispatch; + uiSleep 1; + ["SuccessTitleAndText", ["Vehicle deployed"]] call ExileClient_gui_toaster_addTemplateToast; + ExileClientXM8CurrentSlide = "extraApps"; + disableUserInput false; + }; + + ["extraApps", 1] call ExileClient_gui_xm8_slide; + closeDialog 0; + + + } + catch{ + [_exception] spawn { + UISleep 0.5; + ["ErrorTitleAndText", ["ExAd - Deploy Vehicle", _this select 0]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide; + }; + }; +}; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/Icon_SI.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/Icon_SI.paa new file mode 100644 index 0000000..1aa7949 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/Icon_SI.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.sqf new file mode 100644 index 0000000..0a87374 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.sqf @@ -0,0 +1,22 @@ +/** + + Edit this file and what is on it will be formatted as structured text in game + on the Server Info App. + For information on Structured text in ArmA 3, go here: + https://community.bistudio.com/wiki/Structured_Text + + **/ + +GENERAL RULES
+______________________________________________________________________________
+ +
SIDE-CHAT
+______________________________________________________________________________
+ +GREEN TRADE-ZONE RULES
+______________________________________________________________________________
+ +BUILDING RULES
+______________________________________________________________________________
+ +
ExAd by Janski

diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf new file mode 100644 index 0000000..e69de29 diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf new file mode 100644 index 0000000..48b9b9f --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf @@ -0,0 +1,35 @@ +/* + onLoad.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 0; +_leftColW = 12.8; +_rightCol = _leftCol + _leftColW + 2; +_rightColW = _leftColW + 3; +_margin = 0.2; + +_slideClass = "ExAd_Info"; + +[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',"Go Back"] call ExAd_fnc_createButton; + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1 * _pH, (_leftColW + _rightCol + 6) * _pW, 16 * _pH]] call ExAd_fnc_createCtrlGrp; +[_display,_newParent,([_slideClass,"strTxt"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1.5 * _pH, (_leftColW + _rightCol + 5) * _pW, 15 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf new file mode 100644 index 0000000..e037193 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf @@ -0,0 +1,29 @@ +private["_display","_message","_strTxt","_pos"]; + +try +{ + _message = preprocessFileLineNumbers "ExAdClient\XM8\Apps\Info\message.sqf"; + _message = _message select [(_message find "ExAdClient") + (count "ExAdClient\XM8\Apps\Info\message.sqf") + 1]; + + if(count _message == 0)exitWith{ + throw "No server info provided"; + }; + + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + if(isNull _display)exitWith{ + throw "XM8 not loaded!"; + }; + + _strTxt = [_display,"ExAd_Info","strTxt"] call ExAd_fnc_getAppCtrl; + _strTxt ctrlSetStructuredText parseText format[_message]; + + _pos = ctrlPosition _strTxt; + _strTxt ctrlSetPosition [_pos select 0, _pos select 1, _pos select 2, ctrlTextHeight _strTxt]; + _strTxt ctrlcommit 0; + ([_display,"ExAd_Info","strTxt"] call ExAd_fnc_getAppCtrl) ctrlEnable true; +} +catch +{ + ["ErrorTitleAndText", ["ExAd - Server Info", _exception]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/ExAd_Scroll.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/ExAd_Scroll.paa new file mode 100644 index 0000000..b92d9d8 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/ExAd_Scroll.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/Icon_Journal.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/Icon_Journal.paa new file mode 100644 index 0000000..8a928b4 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/Icon_Journal.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/config.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/config.sqf new file mode 100644 index 0000000..7d10f6f --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/config.sqf @@ -0,0 +1,41 @@ +ExAd_journal_fnc_addNote = { + params["_listCtrl","_editCtrl", "_text"]; + + _text = ctrlText _editCtrl; + + if(count _text == 0)exitWith{ + ["ErrorTitleAndText", ["ExAd - Journal", "Nothing to save, write something first!!"]] call ExileClient_gui_toaster_addTemplateToast; + }; + + _index = lbAdd [_listCtrl, _text]; + lbSetTooltip [_listCtrl, _index, _text]; + + ctrlSetText [_editCtrl, ""]; + + [_listCtrl] call ExAd_journal_fnc_updateDB; +}; + +ExAd_journal_fnc_removeNote = { + params["_listCtrl"]; + + _index = lbCurSel _listCtrl; + + if(_index == -1)exitWith{ + ["ErrorTitleAndText", ["ExAd - Journal", "Select a note to remove!!"]] call ExileClient_gui_toaster_addTemplateToast; + }; + + lbDelete [_listCtrl, _index]; + + [_listCtrl] call ExAd_journal_fnc_updateDB; +}; + +ExAd_journal_fnc_updateDB = { + params["_listCtrl"]; + + _notes = []; + for "_i" from 0 to (lbSize _listCtrl) -1 do { + _notes pushBack (lbText [_listCtrl, _i]) + }; + + profileNamespace setVariable ["ExAd_Journal_Notes",_notes]; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onClose.sqf new file mode 100644 index 0000000..e69de29 diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onLoad.sqf new file mode 100644 index 0000000..e06ee4e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onLoad.sqf @@ -0,0 +1,46 @@ +/* + onLoad.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 0; +_leftColW = 12.8; +_rightCol = _leftCol + _leftColW + 2; +_rightColW = _leftColW + 3; +_margin = 0.2; + +_slideClass = "ExAd_Journal"; + +[_display,_slide,([_slideClass,"picBg"] call ExAd_fnc_getNextIDC),[1 * _pW, -1 * _pH, (_leftColW + _rightCol + 5) * _pW, 21 * _pH],"ExAdClient\XM8\Apps\Journal\ExAd_Scroll.paa",[1,1,1,1],false,false,""] call ExAd_fnc_createPicture; + +[_display,_slide,([_slideClass,"btnBack"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',"Go Back"] call ExAd_fnc_createButton; + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[6.5 * _pW, 3 * _pH, 21 * _pW, 13 * _pH]] call ExAd_fnc_createCtrlGrp; +_listCtrl = [_display,_newParent,([_slideClass,"listNotes"] call ExAd_fnc_getNextIDC),[0 * _pW, 0 * _pH, 21 * _pW, 13 * _pH],""] call ExAd_fnc_createList; + +_editCtrl = [_display,_slide,([_slideClass,"editNote"] call ExAd_fnc_getNextIDC),[6.5 * _pW, 16.05 * _pH, 21 * _pW, 1 * _pH],""] call ExAd_fnc_createEdit; + + +[_display,_slide,([_slideClass,"btnSave"] call ExAd_fnc_getNextIDC),[11.5 * _pW, 17 * _pH, 4 * _pW, 1 * _pH],format["[%1, %2] call ExAd_journal_fnc_addNote", ctrlIDC _listCtrl, ctrlIDC _editCtrl],"Save"] call ExAd_fnc_createButton; + + +[_display,_slide,([_slideClass,"btnRemove"] call ExAd_fnc_getNextIDC),[18.5 * _pW, 17 * _pH, 4 * _pW, 1 * _pH],format["[%1] call ExAd_journal_fnc_removeNote", ctrlIDC _listCtrl],"Remove"] call ExAd_fnc_createButton; + + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onOpen.sqf new file mode 100644 index 0000000..e48ec82 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Journal/onOpen.sqf @@ -0,0 +1,14 @@ +private["_display"]; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +_notes = profileNamespace getVariable ["ExAd_Journal_Notes",[]]; + +_listCtrl = [_display,"ExAd_Journal","listNotes"] call ExAd_fnc_getAppCtrl; +lbClear _listCtrl; + +{ + _index = _listCtrl lbAdd _x; + _listCtrl lbSetTooltip [_index, _x]; + +}forEach _notes; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/Icon_SB.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/Icon_SB.paa new file mode 100644 index 0000000..1aa7949 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/Icon_SB.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/onLoad.sqf new file mode 100644 index 0000000..dff2332 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/SB_Settings/onLoad.sqf @@ -0,0 +1,283 @@ +/* + onLoad.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; + +_rowH = 1.3 * _pH; +_leftCol = 0 * _pW; +_leftColW = 17 * _pW; + +_cbCompTop = 1 * _pH; +_cbW = 1.25 * _pW; +_cbH = _rowH * 0.8; + +_cbStr = _leftCol + _cbW; +_cbStrW = _leftColW - _cbW; + +_rightCol = _leftCol + _leftColW; +_rightCbStr = _rightCol + _cbW; + +_slideClass = "ExAd_SB"; + +[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_SB_APP_GO_BACK] call ExAd_fnc_createButton; + + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[0, _cbCompTop, 34 * _pW, 16 * _pH]] call ExAd_fnc_createCtrlGrp; +_newParent ctrlEnable true; + +//CheckBox setup +//First col +_cbStrAlign = "left"; _titleStrAlign = "center"; _cbStrTextColor = "#ffffff"; _cbStrTextFont = "PuristaMedium"; _cbStrTextSize = 1; + +if(ExAd_SB_Allow_KD)then{ + _cbKD = [_display,_newParent,([_slideClass,"cbShowKD"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop, _cbW, _cbH],"ExAd_SB_Show_KD = !ExAd_SB_Show_KD",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowKD"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_KD,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbKD cbSetChecked ExAd_SB_Show_KD; +}; + +if(ExAd_SB_Allow_HP)then{ + _cbHP = [_display,_newParent,([_slideClass,"cbShowHP"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 1, _cbW, _cbH],"ExAd_SB_Show_HP = !ExAd_SB_Show_HP",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowHP"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 1, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_HP,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbHP cbSetChecked ExAd_SB_Show_HP; +}; + +if(ExAd_SB_Allow_Thirst)then{ + _cbThirst = [_display,_newParent,([_slideClass,"cbShowThirst"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 2, _cbW, _cbH],"ExAd_SB_Show_Thirst = !ExAd_SB_Show_Thirst",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowThirst"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 2, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_THIRST,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbThirst cbSetChecked ExAd_SB_Show_Thirst; +}; + +if(ExAd_SB_Allow_Hunger)then{ + _cbHunger = [_display,_newParent,([_slideClass,"cbShowHunger"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 3, _cbW, _cbH],"ExAd_SB_Show_Hunger = !ExAd_SB_Show_Hunger",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowHunger"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 3, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_HUNGER,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbHunger cbSetChecked ExAd_SB_Show_Hunger; +}; + +if(ExAd_SB_Allow_Wallet)then{ + _cbWallet = [_display,_newParent,([_slideClass,"cbShowWallet"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 4, _cbW, _cbH],"ExAd_SB_Show_Wallet = !ExAd_SB_Show_Wallet",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowWallet"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 4, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_WALLET,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbWallet cbSetChecked ExAd_SB_Show_Wallet; +}; + +if(ExAd_SB_Allow_Bank)then{ + _cbBank = [_display,_newParent,([_slideClass,"cbShowBank"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 5, _cbW, _cbH],"ExAd_SB_Show_Bank = !ExAd_SB_Show_Bank",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowBank"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 5, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_BANK,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbBank cbSetChecked ExAd_SB_Show_Bank; +}; + +if(ExAd_SB_Allow_Respect)then{ + _cbRespect = [_display,_newParent,([_slideClass,"cbShowRespect"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 6, _cbW, _cbH],"ExAd_SB_Show_Respect = !ExAd_SB_Show_Respect",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowRespect"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 6, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_RESPECT,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbRespect cbSetChecked ExAd_SB_Show_Respect; +}; + +_cbColor = [_display,_newParent,([_slideClass,"cbShowColor"] call ExAd_fnc_getNextIDC),[_leftCol, _cbCompTop + _rowH * 7, _cbW, _cbH],"ExAd_SB_COMPONENTS_ACTIVE_COLORS = !ExAd_SB_COMPONENTS_ACTIVE_COLORS",""] call ExAd_fnc_createCheckBox; +[_display,_newParent,([_slideClass,"strTxtShowColor"] call ExAd_fnc_getNextIDC),[_cbStr, _cbCompTop + _rowH * 7, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_COLORS,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + +//Second col +if(ExAd_SB_Allow_FPS)then{ + _cbFPS = [_display,_newParent,([_slideClass,"cbShowFPS"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop, _cbW, _cbH],"ExAd_SB_Show_FPS = !ExAd_SB_Show_FPS",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowFPS"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_FPS,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbFPS cbSetChecked ExAd_SB_Show_FPS; +}; + +if(ExAd_SB_Allow_Time)then{ + _cbTime = [_display,_newParent,([_slideClass,"cbShowTime"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 1, _cbW, _cbH],"ExAd_SB_Show_Time = !ExAd_SB_Show_Time",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowTime"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 1, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_TIMER,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbTime cbSetChecked ExAd_SB_Show_Time; +}; + +if(ExAd_SB_Allow_Temp)then{ + _cbTemp = [_display,_newParent,([_slideClass,"cbShowTemp"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 2, _cbW, _cbH],"ExAd_SB_Show_Temp = !ExAd_SB_Show_Temp",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowTemp"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 2, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_TEMP,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbTemp cbSetChecked ExAd_SB_Show_Temp; +}; + +if(ExAd_SB_Allow_Grid)then{ + _cbGrid = [_display,_newParent,([_slideClass,"cbShowGrid"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 3, _cbW, _cbH],"ExAd_SB_Show_Grid = !ExAd_SB_Show_Grid",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowGrid"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 3, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_GRID,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbGrid cbSetChecked ExAd_SB_Show_Grid; +}; + +if(ExAd_SB_Allow_Compass)then{ + _cbCompass = [_display,_newParent,([_slideClass,"cbShowCompass"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 4, _cbW, _cbH],"ExAd_SB_Show_Compass = !ExAd_SB_Show_Compass",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowCompass"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 4, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_COMPASS,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbCompass cbSetChecked ExAd_SB_Show_Compass; +}; + +if(ExAd_SB_Allow_PlayerCount)then{ + _cbPlayers = [_display,_newParent,([_slideClass,"cbShowPlayers"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 5, _cbW, _cbH],"ExAd_SB_Show_PlayerCount = !ExAd_SB_Show_PlayerCount",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowPlayers"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 5, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_PLAYERS,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbPlayers cbSetChecked ExAd_SB_Show_PlayerCount; +}; + +if(ExAd_SB_Allow_ClanCount)then{ + _cbClan = [_display,_newParent,([_slideClass,"cbShowClan"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 6, _cbW, _cbH],"ExAd_SB_Show_ClanCount = !ExAd_SB_Show_ClanCount",""] call ExAd_fnc_createCheckBox; + [_display,_newParent,([_slideClass,"strTxtShowClan"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 6, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_CLAN_MEMBERS,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + _cbClan cbSetChecked ExAd_SB_Show_ClanCount; +}; + +_cbHUD = [_display,_newParent,([_slideClass,"cbShowHUD"] call ExAd_fnc_getNextIDC),[_rightCol, _cbCompTop + _rowH * 7, _cbW, _cbH],"ExAd_SB_EXILE_HUD_ACTIVE = !ExAd_SB_EXILE_HUD_ACTIVE;call ExAd_fnc_toggleExileHUD",""] call ExAd_fnc_createCheckBox; +[_display,_newParent,([_slideClass,"strTxtShowHUD"] call ExAd_fnc_getNextIDC),[_rightCbStr, _cbCompTop + _rowH * 7, _cbStrW, _rowH],STR_ExAd_SB_APP_CB_HIDE_EXILE_SB,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; + + +_cbColor cbSetChecked ExAd_SB_COMPONENTS_ACTIVE_COLORS; +_cbHUD cbSetChecked !ExAd_SB_EXILE_HUD_ACTIVE; + + +//Setup sliders +_cbW = _cbW + 0.5 * _pW; _scale = 0.5; _margin = (_rowH * _scale / 2); _bgCompTop = _cbCompTop + _rowH * 9; +[_display,_newParent,([_slideClass,"strTxtTitleBgColor"] call ExAd_fnc_getNextIDC),[_leftCol, _bgCompTop, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_BG_COLOR,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; + +[_display,_newParent,([_slideClass,"strTxtSliderR"] call ExAd_fnc_getNextIDC),[_leftCol, _bgCompTop + _rowH * 1, _cbW, _cbH],"R",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderR = [_display,_newParent,([_slideClass,"sliderR"] call ExAd_fnc_getNextIDC),[_cbStr, _bgCompTop + _rowH * 1 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderG"] call ExAd_fnc_getNextIDC),[_leftCol, _bgCompTop + _rowH * 2, _cbW, _cbH],"G",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderG = [_display,_newParent,([_slideClass,"sliderG"] call ExAd_fnc_getNextIDC),[_cbStr, _bgCompTop + _rowH * 2 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderB"] call ExAd_fnc_getNextIDC),[_leftCol, _bgCompTop + _rowH * 3, _cbW, _cbH],"B",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderB = [_display,_newParent,([_slideClass,"sliderB"] call ExAd_fnc_getNextIDC),[_cbStr, _bgCompTop + _rowH * 3 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderA"] call ExAd_fnc_getNextIDC),[_leftCol, _bgCompTop + _rowH * 4, _cbW, _cbH],"A",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderA = [_display,_newParent,([_slideClass,"sliderA"] call ExAd_fnc_getNextIDC),[_cbStr, _bgCompTop + _rowH * 4 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + + +[_display,_newParent,([_slideClass,"strTxtTitlePos"] call ExAd_fnc_getNextIDC),[_rightCol, _bgCompTop, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_POS_SIZE,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; + +[_display,_newParent,([_slideClass,"strTxtSliderX"] call ExAd_fnc_getNextIDC),[_rightCol, _bgCompTop + _rowH * 1, _cbW, _cbH],"X",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderX = [_display,_newParent,([_slideClass,"sliderX"] call ExAd_fnc_getNextIDC),[_rightCbStr, _bgCompTop + _rowH * 1 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderY"] call ExAd_fnc_getNextIDC),[_rightCol, _bgCompTop + _rowH * 2, _cbW, _cbH],"Y",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderY = [_display,_newParent,([_slideClass,"sliderY"] call ExAd_fnc_getNextIDC),[_rightCbStr, _bgCompTop + _rowH * 2 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderW"] call ExAd_fnc_getNextIDC),[_rightCol, _bgCompTop + _rowH * 3, _cbW, _cbH],"W",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderW = [_display,_newParent,([_slideClass,"sliderW"] call ExAd_fnc_getNextIDC),[_rightCbStr, _bgCompTop + _rowH * 3 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderH"] call ExAd_fnc_getNextIDC),[_rightCol, _bgCompTop + _rowH * 4, _cbW, _cbH],"H",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderH = [_display,_newParent,([_slideClass,"sliderH"] call ExAd_fnc_getNextIDC),[_rightCbStr, _bgCompTop + _rowH * 4 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + + +[_sliderR,[0,1],ExAd_SB_GUI_BgColor select 0] call ExAd_fnc_prepareSlider; +[_sliderG,[0,1],ExAd_SB_GUI_BgColor select 1] call ExAd_fnc_prepareSlider; +[_sliderB,[0,1],ExAd_SB_GUI_BgColor select 2] call ExAd_fnc_prepareSlider; +[_sliderA,[0,1],ExAd_SB_GUI_BgColor select 3] call ExAd_fnc_prepareSlider; + +_sliderR ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_BgColor set [0, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderG ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_BgColor set [1, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderB ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_BgColor set [2, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderA ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) * 100)) + '%1');ExAd_SB_GUI_BgColor set [3, _this select 1];call ExAd_fnc_updateSB","%"]]; + +[_sliderX,[safeZoneX,safeZoneX + safeZoneW],ExAd_SB_GUI_POS select 0] call ExAd_fnc_prepareSlider; +[_sliderY,[safeZoneY,safeZoneY + safeZoneH],ExAd_SB_GUI_POS select 1] call ExAd_fnc_prepareSlider; +[_sliderW,[0,safeZoneW],ExAd_SB_GUI_POS select 2] call ExAd_fnc_prepareSlider; +[_sliderH,[0,safeZoneH],ExAd_SB_GUI_POS select 3] call ExAd_fnc_prepareSlider; + +_sliderX ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (_this select 1);ExAd_SB_GUI_POS set [0, _this select 1];call ExAd_fnc_updateSB","%"]]; +_sliderY ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (_this select 1);ExAd_SB_GUI_POS set [1, _this select 1];call ExAd_fnc_updateSB","%"]]; +_sliderW ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) / safeZoneW * 100)) + '%1');ExAd_SB_GUI_POS set [2, _this select 1];call ExAd_fnc_updateSB","%"]]; +_sliderH ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) / safeZoneH * 100)) + '%1');ExAd_SB_GUI_POS set [3, _this select 1];call ExAd_fnc_updateSB","%"]]; + +//Text Font +_textCompTop = _bgCompTop + _rowH * 6; +[_display,_newParent,([_slideClass,"strTxtTitleTextFont"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop, _leftColW, _rowH],STR_ExAd_SB_APP_COMBO_FONT,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_comboFont = [_display,_newParent,([_slideClass,"comboFont"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop + _rowH * 1, _cbStrW, _rowH * 0.75],"ExAd_SB_Text_Font = ((_this select 0) lbData (_this select 1))",STR_ExAd_SB_APP_COMBO_TOOLTIP_FONT] call ExAd_fnc_createCombo; +{ + private["_index"]; + _index = _comboFont lbAdd _x; + _comboFont lbSetData [_index, _x] +}forEach ((configfile >> "CfgFontFamilies") call BIS_fnc_getCfgSubClasses); + +for "_i" from 0 to lbSize _comboFont do { + if((_comboFont lbData _i) isEqualTo ExAd_SB_Text_Font)exitWith{ + _comboFont lbSetCurSel _i; + } +}; + +_comboAlign = [_display,_newParent,([_slideClass,"comboAlign"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop + _rowH * 2, _cbStrW, _rowH * 0.75],"ExAd_SB_Text_Align = ((_this select 0) lbData (_this select 1))",STR_ExAd_SB_APP_COMBO_TOOLTIP_ALIGN] call ExAd_fnc_createCombo; +{ + private["_index"]; + _index = _comboAlign lbAdd _x; + _comboAlign lbSetData [_index, _x] +}forEach ["Left","Center","Right"]; + +for "_i" from 0 to lbSize _comboAlign do { + if((_comboAlign lbData _i) isEqualTo ExAd_SB_Text_Align)exitWith{ + _comboAlign lbSetCurSel _i; + } +}; + +[_display,_newParent,([_slideClass,"strTxtTitleTextColor"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_TEXT_COLOR,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; + +[_display,_newParent,([_slideClass,"strTxtSliderFontR"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 1, _cbW, _cbH],"R",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderFontR = [_display,_newParent,([_slideClass,"sliderFontR"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 1 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderFontG"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 2, _cbW, _cbH],"G",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderFontG = [_display,_newParent,([_slideClass,"sliderFontG"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 2 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderFontB"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 3, _cbW, _cbH],"B",_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderFontB = [_display,_newParent,([_slideClass,"sliderFontB"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 3 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtSliderFontA"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 4, _cbW, _cbH],"A",_cbStrTextFont,_cbS6trTextSize,_cbStrTextColor,_cbStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderFontA = [_display,_newParent,([_slideClass,"sliderFontA"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 4 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtTitleUpdateRate"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 5, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_UPDATE_RATE,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderUpdateRate = [_display,_newParent,([_slideClass,"sliderUpdateRate"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 6 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtTitleIconSize"] call ExAd_fnc_getNextIDC),[_leftCol, _textCompTop + _rowH * 7, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_IMG_SIZE,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderIconSize = [_display,_newParent,([_slideClass,"sliderIconSize"] call ExAd_fnc_getNextIDC),[_cbStr, _textCompTop + _rowH * 8 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtTitleTextSize"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop + _rowH * 3, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_TEXT_SIZE,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderTextSize = [_display,_newParent,([_slideClass,"sliderTextSize"] call ExAd_fnc_getNextIDC),[_rightCbStr, _textCompTop + _rowH * 4 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtTitleTextSize"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop + _rowH * 5, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_TEXT_MARGIN,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderTextMargin = [_display,_newParent,([_slideClass,"sliderTextMargin"] call ExAd_fnc_getNextIDC),[_rightCbStr, _textCompTop + _rowH * 6 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + +[_display,_newParent,([_slideClass,"strTxtTitleTextSize"] call ExAd_fnc_getNextIDC),[_rightCol, _textCompTop + _rowH * 7, _leftColW, _rowH],STR_ExAd_SB_APP_SLIDER_TEXT_PADDING,_cbStrTextFont,_cbStrTextSize,_cbStrTextColor,_titleStrAlign,1] call ExAd_fnc_createStructuredText; +_sliderTextPadding = [_display,_newParent,([_slideClass,"sliderTextMargin"] call ExAd_fnc_getNextIDC),[_rightCbStr, _textCompTop + _rowH * 8 + _margin, _cbStrW, _rowH * _scale]] call ExAd_fnc_createXSliderH; + + +[_sliderFontR,[0,1],ExAd_SB_GUI_TextColor select 0] call ExAd_fnc_prepareSlider; +[_sliderFontG,[0,1],ExAd_SB_GUI_TextColor select 1] call ExAd_fnc_prepareSlider; +[_sliderFontB,[0,1],ExAd_SB_GUI_TextColor select 2] call ExAd_fnc_prepareSlider; +[_sliderFontA,[0,1],ExAd_SB_GUI_TextColor select 3] call ExAd_fnc_prepareSlider; + +_sliderFontR ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_TextColor set [0, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderFontG ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_TextColor set [1, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderFontB ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str (round ((_this select 1) * 255));ExAd_SB_GUI_TextColor set [2, _this select 1];call ExAd_fnc_updateSB"]]; +_sliderFontA ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) * 100)) + '%1');ExAd_SB_GUI_TextColor set [3, _this select 1];call ExAd_fnc_updateSB", "%"]]; + + +[_sliderTextSize,[0,2],ExAd_SB_Text_Size] call ExAd_fnc_prepareSlider; +[_sliderTextMargin,[0,5],count ExAd_SB_Text_Margin] call ExAd_fnc_prepareSlider; +[_sliderTextPadding,[0,5],count ExAd_SB_Text_InnerMargin] call ExAd_fnc_prepareSlider; +[_sliderUpdateRate,[1,60],60 / ExAd_SB_Update_Rate] call ExAd_fnc_prepareSlider; +[_sliderIconSize,[0,2], ExAd_SB_Img_Size] call ExAd_fnc_prepareSlider; + +_sliderTextSize ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) * 100)) + '%1');ExAd_SB_Text_Size = _this select 1", "%"]]; +_sliderTextMargin ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str floor(_this select 1);ExAd_SB_Text_Margin = [_this select 1] call ExAd_fnc_getBlankSpace"]]; +_sliderTextPadding ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip str floor(_this select 1);ExAd_SB_Text_InnerMargin = [_this select 1] call ExAd_fnc_getBlankSpace"]]; +_sliderUpdateRate ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (_this select 1) + ' times/min');ExAd_SB_Update_Rate = 60 / (_this select 1);if(ExAd_SB_Active)then{call ExAd_fnc_sbStop; call ExAd_fnc_loadSB;call ExAd_fnc_sbThread}"]]; +_sliderIconSize ctrlSetEventHandler ["SliderPosChanged", format["(_this select 0) ctrlSetTooltip (str (round ((_this select 1) * 100)) + '%1');ExAd_SB_Img_Size = _this select 1", "%"]]; + + +[_display,_newParent,([_slideClass,"btnSave"] call ExAd_fnc_getNextIDC),[_leftCol + (_leftColW / 9), _textCompTop + _rowH * 10, _leftColW / 3, _rowH],"call ExAd_fnc_sbSave","Save"] call ExAd_fnc_createButton; +[_display,_newParent,([_slideClass,"btnOnOff"] call ExAd_fnc_getNextIDC),[_leftCol + (_leftColW / 2) + (_leftColW / 9), _textCompTop + _rowH * 10, _leftColW / 3, _rowH],"_this call ExAd_fnc_sbPowerToggle",(if(!ExAd_SB_Active)then{STR_ExAd_SB_APP_BTN_SHOW}else{STR_ExAd_SB_APP_BTN_HIDE})] call ExAd_fnc_createButton; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/Icon_VG.paa b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/Icon_VG.paa new file mode 100644 index 0000000..e116406 Binary files /dev/null and b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/Icon_VG.paa differ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf new file mode 100644 index 0000000..08e1c45 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf @@ -0,0 +1,4 @@ +if (ExileClientXM8CurrentSlide == "ExAd_VG") then { + ExileClientXM8CurrentSlide = "apps"; +}; +ExAdCurFlagNetId = nil; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf new file mode 100644 index 0000000..594c384 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf @@ -0,0 +1,78 @@ +/* + onLoad.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 1; +_leftColW = 12.8; +_rightCol = _leftCol + _leftColW + 2; +_rightColW = _leftColW + 3; +_margin = 0.2; + +[_display,_slide,(["ExAd_VG","backButton"] call ExAd_fnc_getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton; + +/*Stored Vehicle Details*/ +[_display,_slide,(["ExAd_VG","InfoTitle"] call ExAd_fnc_getNextIDC),[_rightCol * _pW, 2.75 * _pH, _rightColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_DETAILS,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoBgBox"] call ExAd_fnc_getNextIDC),[_rightCol * _pW, 4 * _pH, _rightColW * _pW, 13.5 * _pH]] call ExAd_fnc_createBackgroundGUI; + +_idcInfoPic = ["ExAd_VG","InfoPic"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcInfoPic,[(_rightCol + 9) * _pW, 4 * _pH, 6.75 * _pW, 5.5 * _pH],"",[1,1,1,1],false,true,""] call ExAd_fnc_createPicture; + +_idcInfoStr = ["ExAd_VG","InfoVehStr"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcInfoStr,[(_rightCol + _margin) * _pW, (4 + _margin) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],"","PuristaMedium",0.75,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoCBStr"] call ExAd_fnc_getNextIDC),[(_rightCol + _margin + 0.4) * _pW, (16.5 - _margin + 0.25 ) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],STR_ExAd_VG_APP_CB_SECRET,"PuristaMedium",0.65,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoCB"] call ExAd_fnc_getNextIDC),[(_rightCol + _margin) * _pW, (16.5 - _margin + 0.2) * _pH, 0.75 * _pW, 0.75 * _pH],'profileNamespace setVariable["ExAd_StreamFriendlyUI",_this select 1]',"Toogle - Stream friendly UI"] call ExAd_fnc_createCheckBox; + +/*Stored Vehicles*/ +[_display,_slide,(["ExAd_VG","SubTitle1"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 2.75 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_STORED,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","SubTitle1Cnt"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 3 * _pH, _leftColW * _pW, 1 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; + +_idcStoredVehList = ["ExAd_VG","StoreVehList"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcStoredVehList,[_leftCol * _pW, 4 * _pH, _leftColW * _pW, 5 * _pH],format["[_this select 0,%1,%2] call XM8_VG_elChanged",_idcInfoPic,_idcInfoStr],""] call ExAd_fnc_createList; + +[_display,_slide,(["ExAd_VG","fetchButton"] call ExAd_fnc_getNextIDC),[_leftCol*_pW, 9*_pH, _leftColW*_pW, 1*_pH],format["disableUserInput true;['VGLoad', %1] call ExAd_fnc_onBtnClickVG",_idcStoredVehList],STR_ExAd_VG_APP_BTN_FETCH,""] call ExAd_fnc_createButton; + +/*Nearby vehicles*/ +[_display,_slide,(["ExAd_VG","SubTitle2"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 10.25 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_NEAR,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +_idcNearVehList = ["ExAd_VG","NearVehicleList"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcNearVehList,[_leftCol * _pW, 11.5 * _pH, _leftColW * _pW, 5 * _pH],"",""] call ExAd_fnc_createList; + +[_display,_slide,(["ExAd_VG","storeButton"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 16.5 * _pH, _leftColW * _pW, 1 * _pH],format["if(call ExAd_fnc_allowVGStore)then{disableUserInput true;['VGStore', %1] call ExAd_fnc_onBtnClickVG}else{['ErrorTitleAndText', ['ExAd - Virtual Garage', '%2']] call ExileClient_gui_toaster_addTemplateToast}",_idcNearVehList,STR_ExAd_VG_NOTI_FULL],STR_ExAd_VG_APP_BTN_STORE,""] call ExAd_fnc_createButton; + +XM8_VG_elChanged = { + params ["_listCtrl","_picCtrl","_strCtrl","_ref","_data","_pic"]; + + _ref = _listCtrl lbData (lbCurSel _listCtrl); + _data = {if(str (_x select 0) == _ref)exitWith{_x}}forEach ((objectFromNetId ExAdCurFlagNetId) getVariable["ExAdVGVeh",[]]); + if(!isNil "_data")then{ + _pic = getText(configFile >> "CfgVehicles" >> (_data select 1) >> "picture"); + ctrlSetText [_picCtrl, _pic]; + ["requestVGDetailInfo", [_ref, ExAdCurFlagNetId, (profileNamespace getVariable["ExAd_StreamFriendlyUI",0]), netId player, _strCtrl]] call ExAd_fnc_serverDispatch; + }else{ + ctrlSetText [_picCtrl, ""]; + ["",_strCtrl] call ExAd_fnc_loadVGDetailView; + } +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf new file mode 100644 index 0000000..97403d1 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf @@ -0,0 +1,28 @@ +private ["_flags","_flag"]; +_flags = nearestObjects [player,["Exile_Construction_Flag_Static"],150]; + +try +{ + if(count _flags == 0)exitWith{ + throw "No connetion to a Virtual Garage" + }; + + _flag = _flags select 0; + if((player distance _flag) > (_flag getVariable ["ExileTerritorySize", 50]))exitWith{ + throw "Weak signal, get closer" + }; + + if((([_flag, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) >= ExAd_VG_ACCESS_LEVEL)then{ + ExAdCurFlagNetId = netId _flag; + call ExAd_fnc_loadVGContent; + } + else + { + throw "You aren't eligible to access this virtual garage!" + } +} +catch +{ + ["ErrorTitleAndText", ["ExAd - Virtual Garage", _exception]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp new file mode 100644 index 0000000..3cdda09 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp @@ -0,0 +1,41 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +class XM8_Apps +{ +file = "ExAdClient\XM8\Functions"; + class addApps {}; + class createBackgroundGUI {}; + class createButton {}; + class createCheckBox {}; + class createCombo {}; + class createCtrlGrp {}; + class createEdit {}; + class createExtraApps {}; + class createFrame {}; + class createList {}; + class createPicture {}; + class createStructuredText {}; + class createXList {}; + class createXSliderH {}; + class getAppCtrl {}; + class getBlankSpace {}; + class getNextIDC {}; + class prepareSlider {}; + class postInitXM8 {file = "ExAdClient\XM8\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf new file mode 100644 index 0000000..1a2ef39 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf @@ -0,0 +1,81 @@ +/** + * ExileClient_gui_xm8_show + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_display","_control","_slideControlID","_slideName","_slideTitle","_slideControl","_titleControl","_toSlideOpenFunction"]; +disableSerialization; +createDialog "RscExileXM8"; +ExileClientXM8IsVisible = true; +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +if (ExileClientXM8IsPowerOn) then +{ + _control = _display displayCtrl 4002; + _control ctrlSetFade 1; + _control ctrlCommit 0; +} +else +{ + { + _control = _display displayCtrl _x; + _control ctrlSetFade 1; + _control ctrlCommit 0; + } + forEach + [ + 4002, + 4003, + 4004, + 4005, + 4007, + 4001, + 4010, + 4030, + 4020 + ]; +}; +true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; +if (ExileClientXM8CurrentSlide isEqualTo "party") then +{ + if (ExileClientPartyID isEqualTo -1) then + { + ExileClientXM8CurrentSlide = "apps"; + }; +}; + +//Add configured controls and add them to "More" +call ExAd_fnc_createExtraApps; + +{ + _slideControlID = getNumber (_x >> "controlID"); + _slideName = configName _x; + _slideTitle = getText (_x >> "title"); + _slideControl = _display displayCtrl _slideControlID; + if (_slideName isEqualTo ExileClientXM8CurrentSlide) then + { + _titleControl = _display displayCtrl 4004; + _titleControl ctrlSetStructuredText (parseText (format ["%1", _slideTitle])); + _slideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)]; + _slideControl ctrlCommit 0; + _slideControl ctrlShow true; + _toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _slideName], ""]; + if !(_toSlideOpenFunction isEqualTo "") then + { + call _toSlideOpenFunction; + }; + } + else + { + _slideControl ctrlShow false; + }; +} +forEach (("true" configClasses (configFile >> "CfgXM8")) + ("true" configClasses (missionConfigFile >> "CfgXM8"))); + +ExileXM8ThreadHandle = [10, ExileClient_gui_xm8_thread_update, [], true] call ExileClient_system_thread_addtask; +call ExileClient_gui_xm8_thread_update; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf new file mode 100644 index 0000000..7f916fb --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf @@ -0,0 +1,71 @@ +/** + * ExileClient_gui_xm8_slide + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_toSlideName","_direction","_display","_toSlideControlID","_toSlideControl","_toSlideTitle","_titleControl","_toSlideOpenFunction","_fromSlideControlID","_fromSlideControl","_fromSlideCloseFunction"]; +disableSerialization; +_toSlideName = _this select 0; +_direction = _this select 1; + +if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then +{ + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + + //ExAd Manipulate the source of config data + _src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile}; + _toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID"); + _toSlideControl = _display displayCtrl _toSlideControlID; + + _toSlideTitle = getText (_src >> "CfgXM8" >> _toSlideName >> "title"); + + _titleControl = _display displayCtrl 4004; + _titleControl ctrlSetStructuredText (parseText (format ["%1", _toSlideTitle])); + _toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _toSlideName], ""]; + if !(_toSlideOpenFunction isEqualTo "") then + { + call _toSlideOpenFunction; + }; + + //ExAd Load Apps + if(toLower _toSlideName == 'extraapps')then{ + call ExAd_fnc_addApps; + }; + //ExAd Manipulating the source of config data + _src2 = if(isClass(configFile >> "CfgXM8" >> ExileClientXM8CurrentSlide))then{configFile}else{missionConfigFile}; + _fromSlideControlID = getNumber(_src2 >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID"); + + _fromSlideControl = _display displayCtrl _fromSlideControlID; + _fromSlideCloseFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onClose", ExileClientXM8CurrentSlide], ""]; + if !(_fromSlideCloseFunction isEqualTo "") then + { + call _fromSlideCloseFunction; + }; + if (_direction isEqualTo 0) then + { + _toSlideControl ctrlSetPosition [(19 * 0.05), (0 * 0.05)]; + _toSlideControl ctrlShow true; + _toSlideControl ctrlCommit 0; + _toSlideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)]; + _toSlideControl ctrlCommit 0.25; + _fromSlideControl ctrlSetPosition [(-19 * 0.05), (0 * 0.05)]; + _fromSlideControl ctrlCommit 0.25; + } + else + { + _toSlideControl ctrlSetPosition [(-19 * 0.05), (0 * 0.05)]; + _toSlideControl ctrlShow true; + _toSlideControl ctrlCommit 0; + _toSlideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)]; + _toSlideControl ctrlCommit 0.25; + _fromSlideControl ctrlSetPosition [(19 * 0.05), (0 * 0.05)]; + _fromSlideControl ctrlCommit 0.25; + }; + ExileClientXM8CurrentSlide = _toSlideName; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf new file mode 100644 index 0000000..f3965f5 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf @@ -0,0 +1,85 @@ +/* + fn_addApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private["_apps","_idc","_title","_display"]; + +_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps"); +if(count _apps == 0)exitWith{false}; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +if(isNil "ExAd_XM8_FIRST_IDC") then { + private ["_continue","_idc"]; + _continue = true; + _idc = 5001; + while{ _continue } do { + _ctrl = _display displayCtrl _idc; + if(ctrlText _ctrl == "")then{ + _continue = false; + ExAd_XM8_FIRST_IDC = _idc; + }else{ + _idc = _idc + 1; + } + }; +}; + +_idc = ExAd_XM8_FIRST_IDC; + +_pW = 0.025; _pH = 0.04; +_slide = ctrlParentControlsGroup (_display displayCtrl _idc); +_lastPos = []; +{ + private["_ctrl","_pos","_logo","_function"]; + _ctrl = _display displayCtrl _idc; + + if(isNull _ctrl)then{ + _ctrl = _display ctrlCreate ["RscExileXM8AppButton1x1",_idc,_slide]; + _xPos = if( (_lastPos select 0) == (30 - 3) * (0.025) ) then { (4 - 3) * (0.025) } else { (_lastPos select 0) + ( 6.5 * 0.025 ) }; + _yPos = if( (_lastPos select 0) == (30 - 3) * (0.025) ) then { + //Move Go Back button + /* + _goBackIdc = -1; + _goBackCtrl = _display displayCtrl _goBackIdc; + _goBackPos = ctrlPosition _goBackCtrl; + _goBackPos set [2, (_goBackPos select 1) + ( 5.5 * 0.04)]; + _goBackCtrl ctrlSetPosition _pos; + _goBackCtrl ctrlCommit 0; + */ + (_lastPos select 1) + ( 5.5 * 0.04 ) + } else { (_lastPos select 1) }; + + _pos = [ _xPos , _yPos, _lastPos select 2, _lastPos select 3]; + _ctrl ctrlSetPosition _pos; + _ctrl ctrlCommit 0; + } else { + _pos = ctrlPosition _ctrl; + }; + + _logo = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "logo"))then{getText(missionConfigFile >> "CfgXM8" >> _x >> "logo")}else{"ExAdClient\Core\Img\logo.paa"}; + [_display,_slide,([_x,format["AppIcon%1",_idc]] call ExAd_fnc_getNextIDC),[(_pos select 0) + 1.5 * _pW, (_pos select 1) + 0.625 * _pH, 3 * _pW, 3 * _pH],_logo,[1,1,1,1],false,true,""] call ExAd_fnc_createPicture; + + _ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title"); + _function = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "quickFunction"))then{ + getText(missionConfigFile >> "CfgXM8" >> _x >> "quickFunction") + } else {format["['%1', 0] call ExileClient_gui_xm8_slide",_x]}; + _ctrl ctrlSetEventHandler ["ButtonClick", _function]; + + _lastPos = _pos; + _idc = _idc + 1; +}forEach _apps; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf new file mode 100644 index 0000000..e580be0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf @@ -0,0 +1,8 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscBackgroundGUI", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlCommit 0; +_ctrl ctrlSetBackgroundColor [0,0,0,0.5]; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf new file mode 100644 index 0000000..d2269d0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf @@ -0,0 +1,11 @@ +params ["_display","_parent","_idc","_position",["_action",""],["_text",""],["_tooltip",""],"_ctrl"]; + +/*_ctrl = _display ctrlCreate ["RscButtonMenu",_idc,_parent];*/ +_ctrl = _display ctrlCreate ["RscExileXM8ButtonMenu",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetText _text; +_ctrl ctrlSetEventHandler ["ButtonClick",_action]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf new file mode 100644 index 0000000..cf29ecc --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscCheckBox",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["CheckedChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf new file mode 100644 index 0000000..cdc6e4b --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscCombo",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf new file mode 100644 index 0000000..2d9b76a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf @@ -0,0 +1,7 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscControlsGroup", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createEdit.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createEdit.sqf new file mode 100644 index 0000000..a595774 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createEdit.sqf @@ -0,0 +1,8 @@ +params ["_display","_parent","_idc","_position","_text"]; + +_ctrl = _display ctrlCreate ["RscExileXM8Edit", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetText _text; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf new file mode 100644 index 0000000..096be05 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf @@ -0,0 +1,34 @@ +/* + fn_createExtraApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private["_apps","_display"]; + +_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps"); +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +{ + call compile format["ExAd_XM8_MAP_%1 = [];",_x]; + + if(isClass(missionConfigFile >> "CfgXM8" >> _x))then{ + _idc = getNumber(missionConfigFile >> "CfgXM8" >> _x >> "controlID"); + _slide = _display ctrlCreate ["RscExileXM8Slide",_idc, _display displayCtrl 4007]; + [_display, _slide, _idc]call compile preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onLoad"); + _slide ctrlShow false; + } +}forEach _apps; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf new file mode 100644 index 0000000..e254e1e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf @@ -0,0 +1,8 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscFrame", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlEnable false; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf new file mode 100644 index 0000000..1989867 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscExileXM8ListBox",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf new file mode 100644 index 0000000..852f479 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf @@ -0,0 +1,11 @@ +params ["_display","_parent","_idc","_position","_picture","_color","_enable","_keepAspect","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate [(if (_keepAspect) then {"RscPictureKeepAspect"} else {"RscPicture"}), _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetText _picture; +_ctrl ctrlSetTextColor _color; +_ctrl ctrlEnable _enable; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf new file mode 100644 index 0000000..53dfa25 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_text","_font","_size","_color","_align","_shadow","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscStructuredText", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetStructuredText (parseText format ["%1", _text,_size,_color, _align,_font,_shadow]); +_ctrl ctrlEnable false; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXList.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXList.sqf new file mode 100644 index 0000000..d07cce3 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXList.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscXListBox",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXSliderH.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXSliderH.sqf new file mode 100644 index 0000000..6912d85 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createXSliderH.sqf @@ -0,0 +1,7 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscXSliderH", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf new file mode 100644 index 0000000..ace02c5 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf @@ -0,0 +1,11 @@ +params ["_display","_slide","_key","_map","_index",["_ctrl", controlNull]]; + +_map = call compile format["ExAd_XM8_MAP_%1",_slide]; +_index = _map find _key; + +if (_index != -1) then { + _idc = ((getNumber (missionConfigFile >> "CfgXM8" >> _slide >> "controlID")) + _index); + _ctrl = _display displayCtrl _idc; +}; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getBlankSpace.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getBlankSpace.sqf new file mode 100644 index 0000000..8a3ce9a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getBlankSpace.sqf @@ -0,0 +1,23 @@ +/* + fn_getBlankSpace.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_size"]; +_response = ""; +for "_i" from 0 to _size do { + _response = format["%1 ",_response] +}; +_response \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf new file mode 100644 index 0000000..84a9f82 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf @@ -0,0 +1,6 @@ +params ["_slide","_key","_baseIDC","_map"]; + +_baseIDC = getNumber (missionConfigFile >> "CfgXM8" >> _slide >> "controlID"); +_map = call compile format["ExAd_XM8_MAP_%1",_slide]; + +(_baseIDC + (_map pushBack _key)) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_prepareSlider.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_prepareSlider.sqf new file mode 100644 index 0000000..1030d6a --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_prepareSlider.sqf @@ -0,0 +1,24 @@ +/* + fn_prepareSlider.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_ctrl","_range","_pos"]; + +_ctrl sliderSetRange _range; +_ctrl sliderSetSpeed [500, 500]; +_ctrl sliderSetPosition _pos; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf new file mode 100644 index 0000000..cd45dc7 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf @@ -0,0 +1,17 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf new file mode 100644 index 0000000..b66e020 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf @@ -0,0 +1,36 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +_path = "ExAdClient\XM8\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +{ + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"))then{ + _code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen")); + missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onOpen",_x], _code]; + }; + + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"))then{ + _code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onClose")); + missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onClose",_x], _code]; + }; + + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "config"))then{ + call compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "config")); + }; +}forEach (getArray(missionConfigFile >> "CfgXM8" >> "extraApps")); \ No newline at end of file diff --git a/mpmissions/Exile.Altis/call.fsm b/mpmissions/Exile.Altis/call.fsm new file mode 100644 index 0000000..edb993b --- /dev/null +++ b/mpmissions/Exile.Altis/call.fsm @@ -0,0 +1,32 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"call_FSM",1,4346,100.000000,-75.000000,200.000000,-25.000000,0.000000,"call FSM"}; +globals[] = {0.000000,0,0,0,0,640,480,1,22,6316128,1,-31.507059,261.199463,749.303589,-86.793678,202,577,1}; +window[] = {0,-1,-1,-1,-1,836,458,1418,87,1,220}; +*//*%FSM*/ +class FSM +{ + fsmName = "call.fsm"; + class States + { + /*%FSM*/ + class call_FSM + { + name = "call_FSM"; + itemno = 0; + init = /*%FSM*/"(_this select 0) call (_this select 1)"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + }; + initState=""; + finalStates[] = + { + "call_FSM", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/mpmissions/Exile.Altis/description.ext b/mpmissions/Exile.Altis/description.ext index 3260f3e..ff2cebf 100644 --- a/mpmissions/Exile.Altis/description.ext +++ b/mpmissions/Exile.Altis/description.ext @@ -69,22 +69,8 @@ showHUD[] = #include "config.cpp" -class CfgRemoteExec -{ - class Functions - { - mode = 1; - jip = 0; - - class ExileServer_system_network_dispatchIncomingMessage - { - allowedTargets = 2; - }; - }; - - class Commands - { - mode = 0; - jip = 0; - }; -}; +#include "CfgRemoteExec.hpp" +#include "infiSTAR_defines.hpp" +#include "infiSTAR_AdminMenu.hpp" +#include "infiSTAR_chat.hpp" +#include "infiSTAR_KeyBinds.hpp" diff --git a/mpmissions/Exile.Altis/infiSTAR_AdminMenu.hpp b/mpmissions/Exile.Altis/infiSTAR_AdminMenu.hpp new file mode 100644 index 0000000..b2a0e16 --- /dev/null +++ b/mpmissions/Exile.Altis/infiSTAR_AdminMenu.hpp @@ -0,0 +1,184 @@ +/* +Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de +#16100 +*/ +class infiSTAR_AdminMenu +{ + idd=-1338; + movingenable=false; + version=2; + controls[]= + { + infi_TXT2, + infi_BTN10, + infi_BTN11, + infi_BTN12, + infi_LIST1500, + infi_LIST1501, + infi_BTN20, + infi_BTN21, + infi_BTN23, + infi_BTN24, + infi_BTN25, + infi_EDIT1, + infi_EDIT2, + infi_BTN36, + infi_BTN37, + infi_BTN38, + infi_HTML_1 + }; + class infi_LIST1500:RscListBox_infiSTAR + { + idc=1500; + x=4.99852e-005 * safezoneW + safezoneX; + y=0.0617197 * safezoneH + safezoneY; + w=0.189063 * safezoneW; + h=0.938333 * safezoneH; + }; + class infi_LIST1501:RscListBox_infiSTAR + { + idc=1501; + x=0.188975 * safezoneW + safezoneX; + y=0.0617197 * safezoneH + safezoneY; + w=0.344271 * safezoneW; + h=0.945999 * safezoneH; + }; + class infi_EDIT1:RscEdit_infiSTAR + { + idc=100; + text=""; + x=0.1964 * safezoneW + safezoneX; + y=0.125933 * safezoneH + safezoneY; + w=0.326563 * safezoneW; + h=0.044 * safezoneH; + }; + class infi_EDIT2:RscEdit_infiSTAR_multi + { + idc=103; + show=0; + }; + class infi_TXT2:RscText_infiSTAR + { + idc=2; + text="infiSTAR.de"; + x=-5.31323e-005 * safezoneW + safezoneX; + y=-7.50085e-005 * safezoneH + safezoneY; + w=1 * safezoneW; + h=0.0341667 * safezoneH; + colorText[]={1,1,1,0.9}; + colorBackground[]={0.56,0.04,0.04,1}; + }; + class infi_HTML_1:RscHTML_infiSTAR + { + idc=1; + x=0.535 * safezoneW + safezoneX; + y=0.06 * safezoneH + safezoneY; + w=0.40 * safezoneW; + h=0.35 * safezoneH; + onLoad="uiNamespace setVariable ['RscHTML_infiSTAR_Admin', _this select 0]"; + onUnload="uiNamespace setVariable ['RscHTML_infiSTAR_Admin', displayNull]"; + }; + class infi_BTN10:RscButton_infiSTAR + { + idc=10; + text="Alphabet"; + x=0.005 + safezoneX; + y=0.0379694 * safezoneH + safezoneY; + w=0.06 * safezoneW; + h=0.02 * safezoneH; + action="SortRangePlease=nil;SortAlphaPlease=true;SortGroupsPlease=nil;[] call fnc_fill_infiSTAR_Player;[] call fnc_setFocus;"; + }; + class infi_BTN11:RscButton_infiSTAR + { + idc=11; + text="Groups"; + x=0.01 + safezoneX + (0.06 * safezoneW); + y=0.0379694 * safezoneH + safezoneY; + w=0.06 * safezoneW; + h=0.02 * safezoneH; + action="SortAlphaPlease=nil;SortRangePlease=nil;SortGroupsPlease=true;[] call fnc_fill_infiSTAR_Player;[] call fnc_setFocus;"; + }; + class infi_BTN12:RscButton_infiSTAR + { + idc=12; + text="Range"; + x=0.015 + safezoneX + (0.06 * safezoneW)*2; + y=0.0379694 * safezoneH + safezoneY; + w=0.06 * safezoneW; + h=0.02 * safezoneH; + action="SortAlphaPlease=nil;SortRangePlease=true;SortGroupsPlease=nil;[] call fnc_fill_infiSTAR_Player;[] call fnc_setFocus;"; + }; + class infi_BTN20:RscButton_infiSTAR + { + idc=20; + default="true"; + text="MainMenu"; + x=0.202072 * safezoneW + safezoneX; + y=0.0379694 * safezoneH + safezoneY; + w=0.0625001 * safezoneW; + h=0.02 * safezoneH; + }; + class infi_BTN21:RscButton_infiSTAR + { + idc=21; + text="SpawnMenu"; + x=0.287975 * safezoneW + safezoneX; + y=0.0379694 * safezoneH + safezoneY; + w=0.0625001 * safezoneW; + h=0.02 * safezoneH; + }; + class infi_BTN23:RscButton_infiSTAR + { + idc=23; + text="AHLog"; + x=0.373981 * safezoneW + safezoneX; + y=0.0379694 * safezoneH + safezoneY; + w=0.0625001 * safezoneW; + h=0.02 * safezoneH; + }; + class infi_BTN24:RscButton_infiSTAR + { + idc=24; + text="AdminLog"; + x=0.459884 * safezoneW + safezoneX; + y=0.0379694 * safezoneH + safezoneY; + w=0.0625001 * safezoneW; + h=0.02 * safezoneH; + }; + class infi_BTN25:RscButton_infiSTAR + { + idc=25; + x=0.535 * safezoneW + safezoneX + (0.15 * safezoneW); + y=0.0379694 * safezoneH + safezoneY; + w=0.0625001 * safezoneW; + h=0.02 * safezoneH; + action="call fnc_btn_html"; + }; + class infi_BTN36:RscButton_infiSTAR + { + idc=36; + text="Items"; + x=0.219294 * safezoneW + safezoneX; + y=0.0819514 * safezoneH + safezoneY; + w=0.0916667 * safezoneW; + h=0.0329999 * safezoneH; + }; + class infi_BTN37:RscButton_infiSTAR + { + idc=37; + text="Vehicles"; + x=0.316644 * safezoneW + safezoneX; + y=0.0819514 * safezoneH + safezoneY; + w=0.0916667 * safezoneW; + h=0.0329999 * safezoneH; + }; + class infi_BTN38:RscButton_infiSTAR + { + idc=38; + text="Trader"; + x=0.414097 * safezoneW + safezoneX; + y=0.0819514 * safezoneH + safezoneY; + w=0.0916667 * safezoneW; + h=0.0329999 * safezoneH; + }; +}; diff --git a/mpmissions/Exile.Altis/infiSTAR_KeyBinds.hpp b/mpmissions/Exile.Altis/infiSTAR_KeyBinds.hpp new file mode 100644 index 0000000..c17bb00 --- /dev/null +++ b/mpmissions/Exile.Altis/infiSTAR_KeyBinds.hpp @@ -0,0 +1,210 @@ +class infiSTAR_KeyBinds +{ + idd = 55; + + class ControlsBackground + { + class infiSTAR_KeyBinds_Background + { + type = 0; + idc = 100; + x = safeZoneX + safeZoneW * 0.29375; + y = safeZoneY + safeZoneH * 0.39444445; + w = safeZoneW * 0.413125; + h = safeZoneH * 0.55555556; + style = 0; + text = ""; + colorBackground[] = {0,0,0,0.6}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); + + }; + class infiSTAR_KeyBinds_Title + { + type = 0; + idc = 101; + x = safeZoneX + safeZoneW * 0.29375; + y = safeZoneY + safeZoneH * 0.39333334; + w = safeZoneW * 0.413125; + h = safeZoneH * 0.02555556; + style = 0; + text = "infiSTAR.de Keybinds"; + colorBackground[] = {0.6,0,0,1}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.35); + + }; + + }; + class Controls + { + class infiSTAR_KeyBinds_Actionlist + { + type = 5; + idc = 102; + x = safeZoneX + safeZoneW * 0.3; + y = safeZoneY + safeZoneH * 0.42555556; + w = safeZoneW * 0.18625; + h = safeZoneH * 0.51; + style = 16; + colorBackground[] = {0.1,0.1,0.1,0.6}; + colorDisabled[] = {0.1,0.1,0.1,0.6}; + colorSelect[] = {1,0,0,1}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + maxHistoryDelay = 0; + rowHeight = 0; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9); + soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect",0.09,1.0}; + onLBSelChanged = "_this call fn_infiSTAR_keyBinds_lbSelChanged"; + onLoad = "(_this select 0) call fn_infiSTAR_keyBinds_initListbox"; + class ListScrollBar + { + color[] = {1,1,1,1}; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + + }; + + }; + class infiSTAR_KeyBinds_currentKey + { + type = 0; + idc = 103; + x = safeZoneX + safeZoneW * 0.5; + y = safeZoneY + safeZoneH * 0.43; + w = safeZoneW * 0.19; + h = safeZoneH * 0.035; + style = 0; + text = "ASSIGNED KEY"; + colorBackground[] = {0.1,0.1,0.1,0.6}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.1); + + }; + class infiSTAR_KeyBinds_currentKeyEdit + { + type = 2; + idc = 104; + x = safeZoneX + safeZoneW * 0.5; + y = safeZoneY + safeZoneH * 0.47; + w = safeZoneW * 0.19; + h = safeZoneH * 0.035; + style = 0; + text = ""; + autocomplete = ""; + colorBackground[] = {0,0,0,0.6}; + colorDisabled[] = {0,0,0,0.6}; + colorSelection[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2); + onKeyDown = "_this call fn_infiSTAR_keyBinds_edit_KeyDown;"; + onLoad = "uiNameSpace setVariable ['infiSTAR_keyBinds_edit',_this select 0];"; + + }; + class infiSTAR_KeyBinds_save + { + type = 1; + idc = 105; + x = safeZoneX + safeZoneW * 0.61; + y = safeZoneY + safeZoneH * 0.53; + w = safeZoneW * 0.08; + h = safeZoneH * 0.04555556; + style = 0+2; + text = "Save"; + borderSize = 0; + colorBackground[] = {0.1,0.1,0.1,0.6}; + colorBackgroundActive[] = {0.2,0.2,0.2,0.6}; + colorBackgroundDisabled[] = {0,0,0,0.6}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + offsetPressedX = 0; + offsetPressedY = 0; + offsetX = 0; + offsetY = 0; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.5); + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0}; + soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0}; + soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0}; + soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0}; + action = "[] call fn_infiSTAR_keyBinds_btnSave;"; + + }; + class infiSTAR_KeyBinds_reset + { + type = 1; + idc = 106; + x = safeZoneX + safeZoneW * 0.5; + y = safeZoneY + safeZoneH * 0.53; + w = safeZoneW * 0.08; + h = safeZoneH * 0.04555556; + style = 0+2; + text = "Reset"; + borderSize = 0; + colorBackground[] = {0.1,0.1,0.1,0.6}; + colorBackgroundActive[] = {0.2,0.2,0.2,0.6}; + colorBackgroundDisabled[] = {0,0,0,0.6}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + offsetPressedX = 0; + offsetPressedY = 0; + offsetX = 0; + offsetY = 0; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.5); + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0}; + soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0}; + soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0}; + soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0}; + action = "[] call fn_infiSTAR_keyBinds_btnReset;"; + + }; + class infiSTAR_KeyBinds_resetAll + { + type = 1; + idc = 107; + x = safeZoneX + safeZoneW * 0.5; + y = safeZoneY + safeZoneH * 0.88; + w = safeZoneW * 0.19; + h = safeZoneH * 0.05; + style = 0+2; + text = "Reset All"; + borderSize = 0; + colorBackground[] = {0.1,0.1,0.1,0.6}; + colorBackgroundActive[] = {0.2,0.2,0.2,0.6}; + colorBackgroundDisabled[] = {0,0,0,0.6}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + font = "PuristaMedium"; + offsetPressedX = 0; + offsetPressedY = 0; + offsetX = 0; + offsetY = 0; + sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.5); + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0}; + soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0}; + soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0}; + soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0}; + action = "[] call fn_infiSTAR_keyBinds_btnResetAll;"; + + }; + + }; + +}; diff --git a/mpmissions/Exile.Altis/infiSTAR_chat.hpp b/mpmissions/Exile.Altis/infiSTAR_chat.hpp new file mode 100644 index 0000000..8eea8c2 --- /dev/null +++ b/mpmissions/Exile.Altis/infiSTAR_chat.hpp @@ -0,0 +1,86 @@ +class infiSTAR_CHAT +{ + idd=-1340; + movingenable=false; + onKeyDown="call fnc_chat_onKeyDown;"; + class controls + { + class RscListbox_1500:RscListBox_infiSTAR + { + idc = 1500; + x = 0.133846 * safezoneW + safezoneX; + y = 0.0929318 * safezoneH + safezoneY; + w = 0.165027 * safezoneW; + h = 0.792133 * safezoneH; + onLoad="uiNamespace setVariable ['chat_playerlist', _this select 0];call fnc_fill_chat_playerlist;(_this select 0) lbSetCurSel 0;"; + onLBSelChanged="call fnc_chat_onLBSelChanged;"; + }; + class RscListbox_1501:RscListBox_infiSTAR + { + idc = 1501; + x = 0.298873 * safezoneW + safezoneX; + y = 0.0929318 * safezoneH + safezoneY; + w = 0.505396 * safezoneW; + h = 0.71512 * safezoneH; + sizeEx=0.03; + onLoad="uiNamespace setVariable ['chat_msgbox', _this select 0];call fnc_fill_chat_history;"; + }; + class RscEdit_1401:RscEdit_infiSTAR_multi + { + idc = 1401; + x = 0.298873 * safezoneW + safezoneX; + y = 0.808052 * safezoneH + safezoneY; + w = 0.505396 * safezoneW; + h = 0.0770129 * safezoneH; + onLoad="uiNamespace setVariable ['chat_inputfield', _this select 0];"; + }; + class RscButton_1600:RscButton_infiSTAR + { + idc = 1600; + text = "close"; + x = 0.752 * safezoneW + safezoneX; + y = 0.885064 * safezoneH + safezoneY; + w = 0.051571 * safezoneW; + h = 0.0330055 * safezoneH; + colorBackground[]={0.6,0,0,0.6}; + style = 2; + action = "(findDisplay -1340) closeDisplay 0;"; + }; + class RscButton_1601:RscButton_infiSTAR + { + idc = 1601; + text = "send"; + x = (0.752 * safezoneW + safezoneX)-((0.051571 * safezoneW)*1.1); + y = 0.885064 * safezoneH + safezoneY; + w = 0.051571 * safezoneW; + h = 0.0330055 * safezoneH; + colorBackground[]={0.6,0,0,0.6}; + style = 2; + action = "call fnc_chat_send;"; + }; + class RscButton_1602:RscButton_infiSTAR + { + idc = 1602; + text = "refresh list"; + x = 0.133846 * safezoneW + safezoneX; + y = 0.885064 * safezoneH + safezoneY; + w = 0.051571 * safezoneW; + h = 0.0330055 * safezoneH; + colorBackground[]={0.6,0,0,0.6}; + style = 2; + action = "call fnc_fill_chat_playerlist;"; + }; + class RscText_1000:RscText_infiSTAR + { + idc = 1000; + x = 0.133846 * safezoneW + safezoneX; + y = 0.0599262 * safezoneH + safezoneY; + w = 0.670423 * safezoneW; + h = 0.0330055 * safezoneH; + colorText[]={1,1,1,0.9}; + colorBackground[]={0.6,0,0,1}; + text = "Chatpartner"; + onLoad="uiNamespace setVariable ['chat_text1', _this select 0];"; + }; + }; +}; diff --git a/mpmissions/Exile.Altis/infiSTAR_defines.hpp b/mpmissions/Exile.Altis/infiSTAR_defines.hpp new file mode 100644 index 0000000..8ad693e --- /dev/null +++ b/mpmissions/Exile.Altis/infiSTAR_defines.hpp @@ -0,0 +1,207 @@ +class RscListBox_infiSTAR { + access=0; + type=5; + style=0; + font="PuristaLight"; + sizeEx=0.03; + rowHeight=0; + colorText[]={1,1,1,1}; + colorScrollbar[]={1,1,1,1}; + colorSelect[]={0,0,0,1}; + colorSelect2[]={1,0.5,0,1}; + colorSelectBackground[]={0.6,0.6,0.6,1}; + colorSelectBackground2[]={0.2,0.2,0.2,1}; + colorBackground[]={0,0,0,0.8}; + maxHistoryDelay=1.0; + soundSelect[]={"",0.1,1}; + period=1; + autoScrollSpeed=-1; + autoScrollDelay=5; + autoScrollRewind=0; + arrowEmpty="#(argb,8,8,3)color(1,1,1,1)"; + arrowFull="#(argb,8,8,3)color(1,1,1,1)"; + shadow=0; + colorDisabled[]={1,1,1,0.25}; + border=false; + borderSize=0; + class ScrollBar + { + arrowEmpty="#(argb,8,8,3)color(1,1,1,1)"; + arrowFull="#(argb,8,8,3)color(1,1,1,1)"; + border="#(argb,8,8,3)color(1,1,1,1)"; + color[]={1,1,1,0.6}; + colorActive[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.3}; + thumb="#(argb,8,8,3)color(1,1,1,1)"; + }; + class ListScrollBar:ScrollBar + { + color[]={1,1,1,0.6}; + colorActive[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.3}; + thumb="#(argb,8,8,3)color(1,1,1,1)"; + arrowEmpty="#(argb,8,8,3)color(1,1,1,1)"; + arrowFull="#(argb,8,8,3)color(1,1,1,1)"; + border="#(argb,8,8,3)color(1,1,1,1)"; + shadow=0; + }; +}; +class RscText_infiSTAR { + access=0; + idc=-1; + type=0; + style=0; + linespacing=1; + colorBackground[]={0,0,0,0}; + colorText[]={0.84,0.07,0,1}; + shadow=1; + font="PuristaBold"; + sizeex=0.0400; + fixedWidth=0; +}; +class RscEdit_infiSTAR { + access=0; + type=2; + style=0; + colorBackground[]={0,0,0,0.6}; + colorText[]={1,1,1,1}; + colorSelection[]={1,1,1,0.25}; + colorDisabled[]={1,1,1,0}; + font="PuristaBold"; + sizeEx=0.04; + autocomplete=""; + text=""; + size=0.2; + shadow=0; +}; +class RscButton_infiSTAR { + access=0; + idc=-1; + type=1; + style=0; + text=""; + action=""; + colorText[]={1,1,1,0.9}; + colorDisabled[]={0.6,0.1,0.3,0}; + colorBackground[]={0,0,0,0.8}; + colorBackgroundDisabled[]={0,0.0,0}; + colorBackgroundActive[]={0.15,0.35,0.55,0.7}; + colorFocused[]={0.58,0.05,0,0.7}; + colorShadow[]={0.023529,0,0.0313725,1}; + colorBorder[]={0.023529,0,0.0313725,1}; + soundEnter[]={"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; + soundPush[]={"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; + soundClick[]={"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; + soundEscape[]={"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; + shadow=0; + font="PuristaMedium"; + sizeEx=0.02921; + offsetX=0.003; + offsetY=0.003; + offsetPressedX=0.002; + offsetPressedY=0.002; + borderSize=0; +}; +class RscHTML_infiSTAR { + colorText[]={1,1,1,1}; + colorBold[]={1,1,1,0.75}; + colorLink[]={"63/255","212/255","252/255",1}; + colorLinkActive[]={"63/255","212/255","252/255",0.75}; + colorBackground[]={0,0,0,0}; + colorPicture[]={1,1,1,1}; + colorPictureBorder[]={0,0,0,0}; + colorPictureLink[]={1,1,1,1}; + colorPictureSelected[]={1,1,1,1}; + hppversion=3; + filename=""; + sizeEx=0.03921; + type=9; + style=0; + prevPage="\ca\ui\data\arrow_left_ca.paa"; + nextPage="\ca\ui\data\arrow_right_ca.paa"; + shadow=2; + class def { + font="PuristaMedium"; + fontBold="PuristaBold"; + align="left"; + }; + class H1:def { + sizeEx="38 * pixelH"; + }; + class H2:def { + sizeEx="32 * pixelH"; + }; + class H3:def { + sizeEx="26 * pixelH"; + }; + class H4:def { + sizeEx="20 * pixelH"; + }; + class H5:def { + sizeEx="17 * pixelH"; + }; + class H6:def { + sizeEx="15 * pixelH"; + }; + class P:def { + sizeEx="18 * pixelH"; + }; +}; +class RscEdit_infiSTAR_multi:RscEdit_infiSTAR { + idc=1339; + x=0.1 * safezoneW + safezoneX; + y=0.038 * safezoneH + safezoneY; + w=0.658333 * safezoneW; + h=(0.143 * safezoneH)*3; + font="EtelkaMonospacePro"; + colorText[]={0.95,0.95,0.95,1}; + style=16; + sizeEx="0.65 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + show=1; +}; +class RscEdit_infiSTAR_ss:RscEdit_infiSTAR { + x=0; + y=(safeZoneY + 0.01)+1; + w=1; + h=0.05; + idc=1380; + font="EtelkaMonospacePro"; + colorText[]={0.95,0.95,0.95,1}; + sizeEx="0.65 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + show=1; + autocomplete="scripting"; +}; +class infiSTAR_EDITBOX +{ + idd=-1341; + movingenable=true; + class controls + { + class RscEditMultiSTAR:RscEdit_infiSTAR_multi + { + idc=1336; + x=0.25; + y=0.25; + w=0.5; + h=0.5; + }; + }; +}; +class infiSTAR_EDITBOX2 +{ + idd=-1341; + movingenable=true; + class controls + { + class RscEditMultiSTAR:RscEdit_infiSTAR_multi{autocomplete="scripting";}; + class RscEditSingle1STAR:RscEdit_infiSTAR_ss{idc=1380;}; + class RscEditSingle2STAR:RscEdit_infiSTAR_ss{idc=1381;}; + class RscEditSingle3STAR:RscEdit_infiSTAR_ss{idc=1382;}; + class RscEditSingle4STAR:RscEdit_infiSTAR_ss{idc=1383;}; + class infi_LIST1384:RscListBox_infiSTAR{idc=1384;x=-0.25;y=0.2;w=0.25;h=0.9;sizeEx=0.027;}; + }; +}; +class CfgCommands +{ + allowedHTMLLoadURIs[]={"http://*"}; +}; diff --git a/mpmissions/Exile.Altis/init.sqf b/mpmissions/Exile.Altis/init.sqf new file mode 100644 index 0000000..94a703a --- /dev/null +++ b/mpmissions/Exile.Altis/init.sqf @@ -0,0 +1,3 @@ + +//A3XAI Client +#include "A3XAI_Client\A3XAI_initclient.sqf"; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/mission.sqm b/mpmissions/Exile.Altis/mission.sqm index 6305678..3fd4ae5 100644 --- a/mpmissions/Exile.Altis/mission.sqm +++ b/mpmissions/Exile.Altis/mission.sqm @@ -1,1422 +1,1442 @@ -version=12; -class Mission -{ - addOns[]= - { - "exile_client", - "a3_map_altis" - }; - addOnsAuto[]= - { - "exile_client", - "a3_map_altis" - }; - randomSeed=8080942; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2039; - month=6; - day=24; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; - class Groups - { - items=1; - class Item0 - { - side="GUER"; - class Vehicles - { - items=100; - class Item0 - { - position[]={13237.161,20.660374,11705.338}; - special="NONE"; - id=0; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - leader=1; - skill=0.60000002; - }; - class Item1 - { - position[]={13234.718,19.578526,11705.455}; - special="NONE"; - id=1; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item2 - { - position[]={13232.741,18.706799,11705.57}; - special="NONE"; - id=2; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item3 - { - position[]={13230.821,17.984247,11705.514}; - special="NONE"; - id=3; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item4 - { - position[]={13228.785,17.412029,11705.281}; - special="NONE"; - id=4; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item5 - { - position[]={13226.924,16.956467,11705.455}; - special="NONE"; - id=5; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item6 - { - position[]={13225.296,16.538645,11705.048}; - special="NONE"; - id=6; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item7 - { - position[]={13223.492,16.139071,11705.514}; - special="NONE"; - id=7; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item8 - { - position[]={13221.398,15.754031,11705.338}; - special="NONE"; - id=8; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item9 - { - position[]={13219.652,15.484016,11705.398}; - special="NONE"; - id=9; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item10 - { - position[]={13237.393,20.350965,11702.838}; - special="NONE"; - id=10; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item11 - { - position[]={13235.357,19.481894,11703.129}; - special="NONE"; - id=11; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item12 - { - position[]={13233.264,18.675148,11702.896}; - special="NONE"; - id=12; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item13 - { - position[]={13231.229,18.033972,11703.188}; - special="NONE"; - id=13; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item14 - { - position[]={13229.25,17.450659,11703.068}; - special="NONE"; - id=14; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item15 - { - position[]={13227.622,17.044769,11703.012}; - special="NONE"; - id=15; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item16 - { - position[]={13225.411,16.547203,11703.129}; - special="NONE"; - id=16; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item17 - { - position[]={13223.608,16.157663,11703.068}; - special="NONE"; - id=17; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item18 - { - position[]={13221.864,15.82023,11703.188}; - special="NONE"; - id=18; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item19 - { - position[]={13219.537,15.460279,11703.188}; - special="NONE"; - id=19; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item20 - { - position[]={13237.684,20.122702,11700.919}; - special="NONE"; - id=20; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item21 - { - position[]={13235.242,19.243696,11701.034}; - special="NONE"; - id=21; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item22 - { - position[]={13233.03,18.533854,11700.976}; - special="NONE"; - id=22; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item23 - { - position[]={13230.764,17.812525,11701.093}; - special="NONE"; - id=23; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item24 - { - position[]={13229.134,17.34927,11700.976}; - special="NONE"; - id=24; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item25 - { - position[]={13227.389,16.968922,11701.093}; - special="NONE"; - id=25; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item26 - { - position[]={13225.296,16.517365,11701.209}; - special="NONE"; - id=26; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item27 - { - position[]={13223.435,16.115486,11701.268}; - special="NONE"; - id=27; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item28 - { - position[]={13221.456,15.7518,11701.209}; - special="NONE"; - id=28; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item29 - { - position[]={13219.304,15.384468,11701.326}; - special="NONE"; - id=29; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item30 - { - position[]={13237.858,19.79587,11699.057}; - special="NONE"; - id=30; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item31 - { - position[]={13235.066,18.972578,11698.881}; - special="NONE"; - id=31; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item32 - { - position[]={13232.799,18.265938,11699}; - special="NONE"; - id=32; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item33 - { - position[]={13230.473,17.599703,11699.115}; - special="NONE"; - id=33; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item34 - { - position[]={13228.785,17.253115,11699}; - special="NONE"; - id=34; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item35 - { - position[]={13227.272,16.924681,11698.881}; - special="NONE"; - id=35; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item36 - { - position[]={13225.063,16.448162,11698.939}; - special="NONE"; - id=36; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item37 - { - position[]={13223.201,16.043352,11699.057}; - special="NONE"; - id=37; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item38 - { - position[]={13221.805,15.756227,11699}; - special="NONE"; - id=38; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item39 - { - position[]={13219.421,15.350844,11699.23}; - special="NONE"; - id=39; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item40 - { - position[]={13237.918,19.454409,11696.905}; - special="NONE"; - id=40; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item41 - { - position[]={13236.288,19.065742,11697.021}; - special="NONE"; - id=41; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item42 - { - position[]={13234.486,18.498407,11697.078}; - special="NONE"; - id=42; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item43 - { - position[]={13232.334,17.895802,11697.138}; - special="NONE"; - id=43; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item44 - { - position[]={13230.064,17.49938,11697.138}; - special="NONE"; - id=44; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item45 - { - position[]={13227.68,16.987776,11697.196}; - special="NONE"; - id=45; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item46 - { - position[]={13225.645,16.549015,11697.254}; - special="NONE"; - id=46; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item47 - { - position[]={13224.074,16.186087,11697.196}; - special="NONE"; - id=47; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item48 - { - position[]={13221.864,15.70447,11697.138}; - special="NONE"; - id=48; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item49 - { - position[]={13220.003,15.385726,11697.254}; - special="NONE"; - id=49; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item50 - { - position[]={13237.918,19.109877,11694.752}; - special="NONE"; - id=50; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item51 - { - position[]={13236.639,18.824335,11694.811}; - special="NONE"; - id=51; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item52 - { - position[]={13234.602,18.260323,11694.984}; - special="NONE"; - id=52; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item53 - { - position[]={13232.508,17.89632,11695.102}; - special="NONE"; - id=53; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item54 - { - position[]={13230.473,17.539976,11695.043}; - special="NONE"; - id=54; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item55 - { - position[]={13227.797,16.982367,11695.102}; - special="NONE"; - id=55; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item56 - { - position[]={13225.936,16.558838,11695.275}; - special="NONE"; - id=56; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item57 - { - position[]={13223.666,16.026239,11695.275}; - special="NONE"; - id=57; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item58 - { - position[]={13221.805,15.632082,11695.275}; - special="NONE"; - id=58; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item59 - { - position[]={13219.246,15.186598,11695.567}; - special="NONE"; - id=59; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item60 - { - position[]={13237.801,18.862562,11693.24}; - special="NONE"; - id=60; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item61 - { - position[]={13235.242,18.339025,11692.718}; - special="NONE"; - id=61; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item62 - { - position[]={13233.09,17.966444,11692.948}; - special="NONE"; - id=62; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item63 - { - position[]={13230.995,17.602283,11693.065}; - special="NONE"; - id=63; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item64 - { - position[]={13228.843,17.171389,11693.182}; - special="NONE"; - id=64; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item65 - { - position[]={13227.506,16.857502,11693.182}; - special="NONE"; - id=65; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item66 - { - position[]={13225.47,16.389393,11693.473}; - special="NONE"; - id=66; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item67 - { - position[]={13224.074,16.061972,11693.473}; - special="NONE"; - id=67; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item68 - { - position[]={13221.864,15.586153,11693.588}; - special="NONE"; - id=68; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item69 - { - position[]={13219.421,15.041322,11693.648}; - special="NONE"; - id=69; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item70 - { - position[]={13238.44,17.573044,11689.811}; - special="NONE"; - id=70; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item71 - { - position[]={13236.696,17.677006,11689.926}; - special="NONE"; - id=71; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item72 - { - position[]={13234.66,17.280449,11689.811}; - special="NONE"; - id=72; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item73 - { - position[]={13232.043,16.925327,11689.982}; - special="NONE"; - id=73; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item74 - { - position[]={13230.646,16.802464,11689.982}; - special="NONE"; - id=74; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item75 - { - position[]={13228.437,16.41066,11690.102}; - special="NONE"; - id=75; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item76 - { - position[]={13226.575,15.941986,11689.982}; - special="NONE"; - id=76; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item77 - { - position[]={13224.48,15.510009,11690.041}; - special="NONE"; - id=77; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item78 - { - position[]={13222.91,15.286004,11690.041}; - special="NONE"; - id=78; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item79 - { - position[]={13220.991,14.880125,11690.102}; - special="NONE"; - id=79; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item80 - { - position[]={13237.743,17.021715,11687.831}; - special="NONE"; - id=80; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item81 - { - position[]={13235.531,16.812983,11688.063}; - special="NONE"; - id=81; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item82 - { - position[]={13233.555,16.559767,11688.122}; - special="NONE"; - id=82; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item83 - { - position[]={13230.764,16.298496,11688.063}; - special="NONE"; - id=83; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item84 - { - position[]={13228.959,15.987162,11688.063}; - special="NONE"; - id=84; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item85 - { - position[]={13227.04,15.567765,11688.179}; - special="NONE"; - id=85; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item86 - { - position[]={13225.236,15.280163,11688.122}; - special="NONE"; - id=86; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item87 - { - position[]={13223.608,15.037487,11688.063}; - special="NONE"; - id=87; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item88 - { - position[]={13221.107,14.579975,11688.239}; - special="NONE"; - id=88; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item89 - { - position[]={13219.77,14.262304,11688.239}; - special="NONE"; - id=89; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item90 - { - position[]={13237.393,16.354242,11685.854}; - special="NONE"; - id=90; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item91 - { - position[]={13235.416,16.09985,11685.795}; - special="NONE"; - id=91; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item92 - { - position[]={13233.381,15.905619,11685.738}; - special="NONE"; - id=92; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item93 - { - position[]={13230.938,15.690587,11685.738}; - special="NONE"; - id=93; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item94 - { - position[]={13228.611,15.362325,11685.854}; - special="NONE"; - id=94; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item95 - { - position[]={13226.518,15.063607,11685.854}; - special="NONE"; - id=95; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item96 - { - position[]={13224.249,14.750255,11685.912}; - special="NONE"; - id=96; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item97 - { - position[]={13221.456,14.273185,11686.029}; - special="NONE"; - id=97; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item98 - { - position[]={13218.781,13.587149,11686.145}; - special="NONE"; - id=98; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - class Item99 - { - position[]={13239.08,16.010651,11685.795}; - special="NONE"; - id=99; - side="GUER"; - vehicle="Exile_Unit_GhostPlayer"; - player="PLAY CDG"; - skill=0.60000002; - }; - }; - }; - }; - class Markers - { - items=26; - - class Item0 - { - position[]={3874.3633,18.125629,13280.79}; - name="SpawnKavala"; - text="Kavala"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - class Item1 - { - position[]={3874.3633,18.125629,13280.79}; - name="SpawnKavalaIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - class Item2 - { - position[]={9926.5293,12.364729,12083.253}; - name="SpawnZaros"; - text="Zaros"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - class Item3 - { - position[]={9926.5293,12.364729,12083.253}; - name="SpawnZarosIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - class Item4 - { - position[]={20978.369,27.78056,7045.6055}; - name="SpawnSelekano"; - text="Selekano"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - class Item5 - { - position[]={20978.369,27.78056,7045.6055}; - name="SpawnSelekanoIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - - - class Item6 - { - position[]={17137.752,15.032475,12719.362}; - name="SpawnPrygos"; - text="Pyrgos"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - - class Item7 - { - position[]={17137.752,15.032475,12719.362}; - name="SpawnPrygosIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - class Item8 - { - position[]={25713.313,20.344301,21329.576}; - name="SpawnSofia"; - text="Sofia"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - class Item9 - { - position[]={25713.313,20.344301,21329.576}; - name="SpawnSofiaIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - - class Item10 - { - position[]={8612.5283,180.58038,18272.271}; - name="SpawnSyrta"; - text="Syrta"; - type="ExileSpawnZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=500; - b=500; - drawBorder=1; - }; - class Item11 - { - position[]={8612.5283,180.58038,18272.271}; - name="SpawnSyrtaIcon"; - text=""; - type="ExileSpawnZoneIcon"; - }; - - - class Item12 - { - position[]={14599.966,22.349989,16797.193}; - name="MafiaTraderCity"; - text="Mafia"; - type="ExileTraderZone"; - markerType="ELLIPSE"; - colorName="ColorBlack"; - fillName="Border"; - a=175; - b=175; - drawBorder=1; - }; - class Item13 - { - position[]={14599.966,22.349989,16797.193}; - name="TraderCityMarkerIcon"; - text=""; - type="ExileTraderZoneIcon"; - }; - - class Item14 - { - position[]={23334.605,4.0095582,24188.938}; - name="TraderZoneSilderas"; - text="Trader"; - markerType="ELLIPSE"; - type="ExileTraderZone"; - colorName="ColorBlack"; - fillName="Border"; - a=175; - b=175; - drawBorder=1; - }; - class Item15 - { - position[]={23334.605,4.0095582,24188.938}; - name="TraderZoneSilderasIcon"; - text=""; - type="ExileTraderZoneIcon"; - }; - - class Item16 - { - position[]={2998.0603,3.7756021,18175.479}; - name="TraderZoneFolia"; - text="Trader"; - markerType="ELLIPSE"; - type="ExileTraderZone"; - colorName="ColorBlack"; - fillName="Border"; - a=175; - b=175; - drawBorder=1; - }; - class Item17 - { - position[]={2998.0603,3.7756021,18175.479}; - name="TraderZoneFoliaIcon"; - text=""; - type="ExileTraderZoneIcon"; - }; - - - class Item18 - { - position[]={14354.0,0,18960.1}; - name="ConcreteMixerZoneAthira"; - text="Concrete Mixer"; - markerType="ELLIPSE"; - type="ExileConcreteMixerZone"; - colorName="ColorBlack"; - fillName="Border"; - a=750; - b=750; - drawBorder=1; - }; - class Item19 - { - position[]={14354.0,0,18960.1}; - name="ConcreteMixerZoneAthiraIcon"; - text=""; - type="ExileConcreteMixerZoneIcon"; - }; - - - class Item20 - { - position[]={18309.4,0,15575.0}; - name="ConcreteMixerZoneCharkia"; - text="Concrete Mixer"; - markerType="ELLIPSE"; - type="ExileConcreteMixerZone"; - colorName="ColorBlack"; - fillName="Border"; - a=750; - b=750; - drawBorder=1; - }; - class Item21 - { - position[]={18309.4,0,15575.0}; - name="ConcreteMixerZoneCharkiaIcon"; - text=""; - type="ExileConcreteMixerZoneIcon"; - }; - - class Item22 - { - position[]={11391.2,0,14259.5}; - name="ConcreteMixerZoneAlikampos"; - text="Concrete Mixer"; - markerType="ELLIPSE"; - type="ExileConcreteMixerZone"; - colorName="ColorBlack"; - fillName="Border"; - a=750; - b=750; - drawBorder=1; - }; - class Item23 - { - position[]={11391.2,0,14259.5}; - name="ConcreteMixerZoneAlikamposIcon"; - text=""; - type="ExileConcreteMixerZoneIcon"; - }; - - - - class Item24 - { - position[]={21845.1,0,20977.6}; - name="ContaminatedZoneGhostHotel"; - text="Contaminated Zone"; - markerType="ELLIPSE"; - type="ExileContaminatedZone"; - colorName="ColorBlack"; - fillName="Border"; - a=400; - b=400; - drawBorder=1; - }; - class Item25 - { - position[]={21845.1,0,20977.6}; - name="ContaminatedZoneGhostHotelIcon"; - text=""; - type="ExileContaminatedZoneIcon"; - }; - }; -}; -class Intro -{ - addOns[]= - { - "a3_map_altis" - }; - addOnsAuto[]= - { - "a3_map_altis" - }; - randomSeed=3611332; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=6; - day=24; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; -class OutroWin -{ - addOns[]= - { - "a3_map_altis" - }; - addOnsAuto[]= - { - "a3_map_altis" - }; - randomSeed=15572598; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=6; - day=24; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; -class OutroLoose -{ - addOns[]= - { - "a3_map_altis" - }; - addOnsAuto[]= - { - "a3_map_altis" - }; - randomSeed=13194853; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=6; - day=24; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; +version=12; +class Mission +{ + addOns[]= + { + "exile_client", + "a3_map_altis" + }; + addOnsAuto[]= + { + "exile_client", + "a3_map_altis" + }; + randomSeed=8080942; + class Intel + { + timeOfChanges=1800.0002; + startWeather=0.30000001; + startWind=0.1; + startWaves=0.1; + forecastWeather=0.30000001; + forecastWind=0.1; + forecastWaves=0.1; + forecastLightnings=0.1; + year=2039; + month=6; + day=24; + hour=12; + minute=0; + startFogDecay=0.013; + forecastFogDecay=0.013; + }; + class Groups + { + items=2; + class Item0 + { + side="GUER"; + class Vehicles + { + items=100; + class Item0 + { + position[]={13237.161,20.660374,11705.338}; + special="NONE"; + id=0; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + leader=1; + skill=0.60000002; + }; + class Item1 + { + position[]={13234.718,19.578526,11705.455}; + special="NONE"; + id=1; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item2 + { + position[]={13232.741,18.706799,11705.57}; + special="NONE"; + id=2; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item3 + { + position[]={13230.821,17.984247,11705.514}; + special="NONE"; + id=3; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item4 + { + position[]={13228.785,17.412029,11705.281}; + special="NONE"; + id=4; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item5 + { + position[]={13226.924,16.956467,11705.455}; + special="NONE"; + id=5; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item6 + { + position[]={13225.296,16.538645,11705.048}; + special="NONE"; + id=6; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item7 + { + position[]={13223.492,16.139071,11705.514}; + special="NONE"; + id=7; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item8 + { + position[]={13221.398,15.754031,11705.338}; + special="NONE"; + id=8; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item9 + { + position[]={13219.652,15.484016,11705.398}; + special="NONE"; + id=9; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item10 + { + position[]={13237.393,20.350965,11702.838}; + special="NONE"; + id=10; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item11 + { + position[]={13235.357,19.481894,11703.129}; + special="NONE"; + id=11; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item12 + { + position[]={13233.264,18.675148,11702.896}; + special="NONE"; + id=12; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item13 + { + position[]={13231.229,18.033972,11703.188}; + special="NONE"; + id=13; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item14 + { + position[]={13229.25,17.450659,11703.068}; + special="NONE"; + id=14; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item15 + { + position[]={13227.622,17.044769,11703.012}; + special="NONE"; + id=15; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item16 + { + position[]={13225.411,16.547203,11703.129}; + special="NONE"; + id=16; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item17 + { + position[]={13223.608,16.157663,11703.068}; + special="NONE"; + id=17; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item18 + { + position[]={13221.864,15.82023,11703.188}; + special="NONE"; + id=18; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item19 + { + position[]={13219.537,15.460279,11703.188}; + special="NONE"; + id=19; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item20 + { + position[]={13237.684,20.122702,11700.919}; + special="NONE"; + id=20; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item21 + { + position[]={13235.242,19.243696,11701.034}; + special="NONE"; + id=21; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item22 + { + position[]={13233.03,18.533854,11700.976}; + special="NONE"; + id=22; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item23 + { + position[]={13230.764,17.812525,11701.093}; + special="NONE"; + id=23; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item24 + { + position[]={13229.134,17.34927,11700.976}; + special="NONE"; + id=24; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item25 + { + position[]={13227.389,16.968922,11701.093}; + special="NONE"; + id=25; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item26 + { + position[]={13225.296,16.517365,11701.209}; + special="NONE"; + id=26; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item27 + { + position[]={13223.435,16.115486,11701.268}; + special="NONE"; + id=27; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item28 + { + position[]={13221.456,15.7518,11701.209}; + special="NONE"; + id=28; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item29 + { + position[]={13219.304,15.384468,11701.326}; + special="NONE"; + id=29; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item30 + { + position[]={13237.858,19.79587,11699.057}; + special="NONE"; + id=30; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item31 + { + position[]={13235.066,18.972578,11698.881}; + special="NONE"; + id=31; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item32 + { + position[]={13232.799,18.265938,11699}; + special="NONE"; + id=32; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item33 + { + position[]={13230.473,17.599703,11699.115}; + special="NONE"; + id=33; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item34 + { + position[]={13228.785,17.253115,11699}; + special="NONE"; + id=34; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item35 + { + position[]={13227.272,16.924681,11698.881}; + special="NONE"; + id=35; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item36 + { + position[]={13225.063,16.448162,11698.939}; + special="NONE"; + id=36; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item37 + { + position[]={13223.201,16.043352,11699.057}; + special="NONE"; + id=37; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item38 + { + position[]={13221.805,15.756227,11699}; + special="NONE"; + id=38; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item39 + { + position[]={13219.421,15.350844,11699.23}; + special="NONE"; + id=39; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item40 + { + position[]={13237.918,19.454409,11696.905}; + special="NONE"; + id=40; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item41 + { + position[]={13236.288,19.065742,11697.021}; + special="NONE"; + id=41; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item42 + { + position[]={13234.486,18.498407,11697.078}; + special="NONE"; + id=42; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item43 + { + position[]={13232.334,17.895802,11697.138}; + special="NONE"; + id=43; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item44 + { + position[]={13230.064,17.49938,11697.138}; + special="NONE"; + id=44; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item45 + { + position[]={13227.68,16.987776,11697.196}; + special="NONE"; + id=45; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item46 + { + position[]={13225.645,16.549015,11697.254}; + special="NONE"; + id=46; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item47 + { + position[]={13224.074,16.186087,11697.196}; + special="NONE"; + id=47; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item48 + { + position[]={13221.864,15.70447,11697.138}; + special="NONE"; + id=48; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item49 + { + position[]={13220.003,15.385726,11697.254}; + special="NONE"; + id=49; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item50 + { + position[]={13237.918,19.109877,11694.752}; + special="NONE"; + id=50; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item51 + { + position[]={13236.639,18.824335,11694.811}; + special="NONE"; + id=51; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item52 + { + position[]={13234.602,18.260323,11694.984}; + special="NONE"; + id=52; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item53 + { + position[]={13232.508,17.89632,11695.102}; + special="NONE"; + id=53; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item54 + { + position[]={13230.473,17.539976,11695.043}; + special="NONE"; + id=54; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item55 + { + position[]={13227.797,16.982367,11695.102}; + special="NONE"; + id=55; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item56 + { + position[]={13225.936,16.558838,11695.275}; + special="NONE"; + id=56; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item57 + { + position[]={13223.666,16.026239,11695.275}; + special="NONE"; + id=57; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item58 + { + position[]={13221.805,15.632082,11695.275}; + special="NONE"; + id=58; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item59 + { + position[]={13219.246,15.186598,11695.567}; + special="NONE"; + id=59; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item60 + { + position[]={13237.801,18.862562,11693.24}; + special="NONE"; + id=60; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item61 + { + position[]={13235.242,18.339025,11692.718}; + special="NONE"; + id=61; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item62 + { + position[]={13233.09,17.966444,11692.948}; + special="NONE"; + id=62; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item63 + { + position[]={13230.995,17.602283,11693.065}; + special="NONE"; + id=63; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item64 + { + position[]={13228.843,17.171389,11693.182}; + special="NONE"; + id=64; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item65 + { + position[]={13227.506,16.857502,11693.182}; + special="NONE"; + id=65; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item66 + { + position[]={13225.47,16.389393,11693.473}; + special="NONE"; + id=66; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item67 + { + position[]={13224.074,16.061972,11693.473}; + special="NONE"; + id=67; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item68 + { + position[]={13221.864,15.586153,11693.588}; + special="NONE"; + id=68; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item69 + { + position[]={13219.421,15.041322,11693.648}; + special="NONE"; + id=69; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item70 + { + position[]={13238.44,17.573044,11689.811}; + special="NONE"; + id=70; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item71 + { + position[]={13236.696,17.677006,11689.926}; + special="NONE"; + id=71; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item72 + { + position[]={13234.66,17.280449,11689.811}; + special="NONE"; + id=72; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item73 + { + position[]={13232.043,16.925327,11689.982}; + special="NONE"; + id=73; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item74 + { + position[]={13230.646,16.802464,11689.982}; + special="NONE"; + id=74; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item75 + { + position[]={13228.437,16.41066,11690.102}; + special="NONE"; + id=75; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item76 + { + position[]={13226.575,15.941986,11689.982}; + special="NONE"; + id=76; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item77 + { + position[]={13224.48,15.510009,11690.041}; + special="NONE"; + id=77; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item78 + { + position[]={13222.91,15.286004,11690.041}; + special="NONE"; + id=78; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item79 + { + position[]={13220.991,14.880125,11690.102}; + special="NONE"; + id=79; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item80 + { + position[]={13237.743,17.021715,11687.831}; + special="NONE"; + id=80; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item81 + { + position[]={13235.531,16.812983,11688.063}; + special="NONE"; + id=81; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item82 + { + position[]={13233.555,16.559767,11688.122}; + special="NONE"; + id=82; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item83 + { + position[]={13230.764,16.298496,11688.063}; + special="NONE"; + id=83; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item84 + { + position[]={13228.959,15.987162,11688.063}; + special="NONE"; + id=84; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item85 + { + position[]={13227.04,15.567765,11688.179}; + special="NONE"; + id=85; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item86 + { + position[]={13225.236,15.280163,11688.122}; + special="NONE"; + id=86; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item87 + { + position[]={13223.608,15.037487,11688.063}; + special="NONE"; + id=87; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item88 + { + position[]={13221.107,14.579975,11688.239}; + special="NONE"; + id=88; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item89 + { + position[]={13219.77,14.262304,11688.239}; + special="NONE"; + id=89; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item90 + { + position[]={13237.393,16.354242,11685.854}; + special="NONE"; + id=90; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item91 + { + position[]={13235.416,16.09985,11685.795}; + special="NONE"; + id=91; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item92 + { + position[]={13233.381,15.905619,11685.738}; + special="NONE"; + id=92; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item93 + { + position[]={13230.938,15.690587,11685.738}; + special="NONE"; + id=93; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item94 + { + position[]={13228.611,15.362325,11685.854}; + special="NONE"; + id=94; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item95 + { + position[]={13226.518,15.063607,11685.854}; + special="NONE"; + id=95; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item96 + { + position[]={13224.249,14.750255,11685.912}; + special="NONE"; + id=96; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item97 + { + position[]={13221.456,14.273185,11686.029}; + special="NONE"; + id=97; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item98 + { + position[]={13218.781,13.587149,11686.145}; + special="NONE"; + id=98; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + class Item99 + { + position[]={13239.08,16.010651,11685.795}; + special="NONE"; + id=99; + side="GUER"; + vehicle="Exile_Unit_GhostPlayer"; + player="PLAY CDG"; + skill=0.60000002; + }; + }; + }; + class Item1 + { + side="LOGIC"; + class Vehicles + { + items=1; + class Item0 + { + position[]={10720.502,12.714643,11356.243}; + id=100; + side="LOGIC"; + vehicle="HeadlessClient_F"; + player="PLAY CDG"; + init="this enableSimulation false; this allowDamage false"; + leader=1; + skill=0.60000002; + text="HC"; + }; + }; + }; + }; + class Markers + { + items=26; + + class Item0 + { + position[]={3874.3633,18.125629,13280.79}; + name="SpawnKavala"; + text="Kavala"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + class Item1 + { + position[]={3874.3633,18.125629,13280.79}; + name="SpawnKavalaIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + class Item2 + { + position[]={9926.5293,12.364729,12083.253}; + name="SpawnZaros"; + text="Zaros"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + class Item3 + { + position[]={9926.5293,12.364729,12083.253}; + name="SpawnZarosIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + class Item4 + { + position[]={20978.369,27.78056,7045.6055}; + name="SpawnSelekano"; + text="Selekano"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + class Item5 + { + position[]={20978.369,27.78056,7045.6055}; + name="SpawnSelekanoIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + + + class Item6 + { + position[]={17137.752,15.032475,12719.362}; + name="SpawnPrygos"; + text="Pyrgos"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + + class Item7 + { + position[]={17137.752,15.032475,12719.362}; + name="SpawnPrygosIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + class Item8 + { + position[]={25713.313,20.344301,21329.576}; + name="SpawnSofia"; + text="Sofia"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + class Item9 + { + position[]={25713.313,20.344301,21329.576}; + name="SpawnSofiaIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + + class Item10 + { + position[]={8612.5283,180.58038,18272.271}; + name="SpawnSyrta"; + text="Syrta"; + type="ExileSpawnZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=500; + b=500; + drawBorder=1; + }; + class Item11 + { + position[]={8612.5283,180.58038,18272.271}; + name="SpawnSyrtaIcon"; + text=""; + type="ExileSpawnZoneIcon"; + }; + + + class Item12 + { + position[]={14599.966,22.349989,16797.193}; + name="MafiaTraderCity"; + text="Mafia"; + type="ExileTraderZone"; + markerType="ELLIPSE"; + colorName="ColorBlack"; + fillName="Border"; + a=175; + b=175; + drawBorder=1; + }; + class Item13 + { + position[]={14599.966,22.349989,16797.193}; + name="TraderCityMarkerIcon"; + text=""; + type="ExileTraderZoneIcon"; + }; + + class Item14 + { + position[]={23334.605,4.0095582,24188.938}; + name="TraderZoneSilderas"; + text="Trader"; + markerType="ELLIPSE"; + type="ExileTraderZone"; + colorName="ColorBlack"; + fillName="Border"; + a=175; + b=175; + drawBorder=1; + }; + class Item15 + { + position[]={23334.605,4.0095582,24188.938}; + name="TraderZoneSilderasIcon"; + text=""; + type="ExileTraderZoneIcon"; + }; + + class Item16 + { + position[]={2998.0603,3.7756021,18175.479}; + name="TraderZoneFolia"; + text="Trader"; + markerType="ELLIPSE"; + type="ExileTraderZone"; + colorName="ColorBlack"; + fillName="Border"; + a=175; + b=175; + drawBorder=1; + }; + class Item17 + { + position[]={2998.0603,3.7756021,18175.479}; + name="TraderZoneFoliaIcon"; + text=""; + type="ExileTraderZoneIcon"; + }; + + + class Item18 + { + position[]={14354.0,0,18960.1}; + name="ConcreteMixerZoneAthira"; + text="Concrete Mixer"; + markerType="ELLIPSE"; + type="ExileConcreteMixerZone"; + colorName="ColorBlack"; + fillName="Border"; + a=750; + b=750; + drawBorder=1; + }; + class Item19 + { + position[]={14354.0,0,18960.1}; + name="ConcreteMixerZoneAthiraIcon"; + text=""; + type="ExileConcreteMixerZoneIcon"; + }; + + + class Item20 + { + position[]={18309.4,0,15575.0}; + name="ConcreteMixerZoneCharkia"; + text="Concrete Mixer"; + markerType="ELLIPSE"; + type="ExileConcreteMixerZone"; + colorName="ColorBlack"; + fillName="Border"; + a=750; + b=750; + drawBorder=1; + }; + class Item21 + { + position[]={18309.4,0,15575.0}; + name="ConcreteMixerZoneCharkiaIcon"; + text=""; + type="ExileConcreteMixerZoneIcon"; + }; + + class Item22 + { + position[]={11391.2,0,14259.5}; + name="ConcreteMixerZoneAlikampos"; + text="Concrete Mixer"; + markerType="ELLIPSE"; + type="ExileConcreteMixerZone"; + colorName="ColorBlack"; + fillName="Border"; + a=750; + b=750; + drawBorder=1; + }; + class Item23 + { + position[]={11391.2,0,14259.5}; + name="ConcreteMixerZoneAlikamposIcon"; + text=""; + type="ExileConcreteMixerZoneIcon"; + }; + + + + class Item24 + { + position[]={21845.1,0,20977.6}; + name="ContaminatedZoneGhostHotel"; + text="Contaminated Zone"; + markerType="ELLIPSE"; + type="ExileContaminatedZone"; + colorName="ColorBlack"; + fillName="Border"; + a=400; + b=400; + drawBorder=1; + }; + class Item25 + { + position[]={21845.1,0,20977.6}; + name="ContaminatedZoneGhostHotelIcon"; + text=""; + type="ExileContaminatedZoneIcon"; + }; + }; +}; +class Intro +{ + addOns[]= + { + "a3_map_altis" + }; + addOnsAuto[]= + { + "a3_map_altis" + }; + randomSeed=3611332; + class Intel + { + timeOfChanges=1800.0002; + startWeather=0.30000001; + startWind=0.1; + startWaves=0.1; + forecastWeather=0.30000001; + forecastWind=0.1; + forecastWaves=0.1; + forecastLightnings=0.1; + year=2035; + month=6; + day=24; + hour=12; + minute=0; + startFogDecay=0.013; + forecastFogDecay=0.013; + }; +}; +class OutroWin +{ + addOns[]= + { + "a3_map_altis" + }; + addOnsAuto[]= + { + "a3_map_altis" + }; + randomSeed=15572598; + class Intel + { + timeOfChanges=1800.0002; + startWeather=0.30000001; + startWind=0.1; + startWaves=0.1; + forecastWeather=0.30000001; + forecastWind=0.1; + forecastWaves=0.1; + forecastLightnings=0.1; + year=2035; + month=6; + day=24; + hour=12; + minute=0; + startFogDecay=0.013; + forecastFogDecay=0.013; + }; +}; +class OutroLoose +{ + addOns[]= + { + "a3_map_altis" + }; + addOnsAuto[]= + { + "a3_map_altis" + }; + randomSeed=13194853; + class Intel + { + timeOfChanges=1800.0002; + startWeather=0.30000001; + startWind=0.1; + startWaves=0.1; + forecastWeather=0.30000001; + forecastWind=0.1; + forecastWaves=0.1; + forecastLightnings=0.1; + year=2035; + month=6; + day=24; + hour=12; + minute=0; + startFogDecay=0.013; + forecastFogDecay=0.013; + }; +};