├── .editorconfig
├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── ISSUE_TEMPLATE
│ └── bug_report.md
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ └── validate.yml
├── .gitignore
├── Altis_Life.Altis
├── CfgRemoteExec.hpp
├── Functions.hpp
├── SpyGlass
│ ├── README.md
│ ├── endoftheline.sqf
│ ├── fn_cmdMenuCheck.sqf
│ ├── fn_cookieJar.sqf
│ ├── fn_initSpy.sqf
│ ├── fn_menuCheck.sqf
│ ├── fn_notifyAdmins.sqf
│ ├── fn_observe.sqf
│ └── fn_variableCheck.sqf
├── briefing.sqf
├── config
│ ├── Config_Clothing.hpp
│ ├── Config_Garages.hpp
│ ├── Config_Gather.hpp
│ ├── Config_Housing.hpp
│ ├── Config_Licenses.hpp
│ ├── Config_Loadouts.hpp
│ ├── Config_Master.hpp
│ ├── Config_Process.hpp
│ ├── Config_SpawnPoints.hpp
│ ├── Config_SpyGlass.hpp
│ ├── Config_Vehicles.hpp
│ ├── Config_Weapons.hpp
│ └── Config_vItems.hpp
├── core
│ ├── actions
│ │ ├── fn_arrestAction.sqf
│ │ ├── fn_buyLicense.sqf
│ │ ├── fn_captureHideout.sqf
│ │ ├── fn_catchFish.sqf
│ │ ├── fn_dpFinish.sqf
│ │ ├── fn_dropFishingNet.sqf
│ │ ├── fn_escortAction.sqf
│ │ ├── fn_gather.sqf
│ │ ├── fn_getDPMission.sqf
│ │ ├── fn_gutAnimal.sqf
│ │ ├── fn_healHospital.sqf
│ │ ├── fn_impoundAction.sqf
│ │ ├── fn_mine.sqf
│ │ ├── fn_newsBroadcast.sqf
│ │ ├── fn_packupSpikes.sqf
│ │ ├── fn_pickupItem.sqf
│ │ ├── fn_pickupMoney.sqf
│ │ ├── fn_postBail.sqf
│ │ ├── fn_processAction.sqf
│ │ ├── fn_pulloutAction.sqf
│ │ ├── fn_putInCar.sqf
│ │ ├── fn_removeContainer.sqf
│ │ ├── fn_repairTruck.sqf
│ │ ├── fn_restrainAction.sqf
│ │ ├── fn_robAction.sqf
│ │ ├── fn_searchAction.sqf
│ │ ├── fn_searchVehAction.sqf
│ │ ├── fn_seizePlayerAction.sqf
│ │ ├── fn_serviceChopper.sqf
│ │ ├── fn_stopEscorting.sqf
│ │ ├── fn_storeVehicle.sqf
│ │ ├── fn_surrender.sqf
│ │ ├── fn_ticketAction.sqf
│ │ └── fn_unrestrain.sqf
│ ├── admin
│ │ ├── fn_adminCompensate.sqf
│ │ ├── fn_adminDebugCon.sqf
│ │ ├── fn_adminFreeze.sqf
│ │ ├── fn_adminGetID.sqf
│ │ ├── fn_adminGodMode.sqf
│ │ ├── fn_adminID.sqf
│ │ ├── fn_adminInfo.sqf
│ │ ├── fn_adminMarkers.sqf
│ │ ├── fn_adminMenu.sqf
│ │ ├── fn_adminQuery.sqf
│ │ ├── fn_adminSpectate.sqf
│ │ ├── fn_adminTeleport.sqf
│ │ └── fn_adminTpHere.sqf
│ ├── civilian
│ │ ├── fn_civMarkers.sqf
│ │ ├── fn_demoChargeTimer.sqf
│ │ ├── fn_freezePlayer.sqf
│ │ ├── fn_jail.sqf
│ │ ├── fn_jailMe.sqf
│ │ ├── fn_knockedOut.sqf
│ │ ├── fn_knockoutAction.sqf
│ │ ├── fn_removeLicenses.sqf
│ │ ├── fn_robPerson.sqf
│ │ ├── fn_robReceive.sqf
│ │ └── fn_tazed.sqf
│ ├── clientValidator.sqf
│ ├── config
│ │ ├── fn_houseConfig.sqf
│ │ ├── fn_itemWeight.sqf
│ │ ├── fn_vehicleAnimate.sqf
│ │ └── fn_vehicleWeightCfg.sqf
│ ├── configuration.sqf
│ ├── cop
│ │ ├── fn_bountyReceive.sqf
│ │ ├── fn_containerInvSearch.sqf
│ │ ├── fn_copInteractionMenu.sqf
│ │ ├── fn_copLights.sqf
│ │ ├── fn_copMarkers.sqf
│ │ ├── fn_copSearch.sqf
│ │ ├── fn_copSiren.sqf
│ │ ├── fn_doorAnimate.sqf
│ │ ├── fn_fedCamDisplay.sqf
│ │ ├── fn_licenseCheck.sqf
│ │ ├── fn_licensesRead.sqf
│ │ ├── fn_questionDealer.sqf
│ │ ├── fn_radar.sqf
│ │ ├── fn_repairDoor.sqf
│ │ ├── fn_restrain.sqf
│ │ ├── fn_searchClient.sqf
│ │ ├── fn_seizeClient.sqf
│ │ ├── fn_sirenLights.sqf
│ │ ├── fn_spikeStripEffect.sqf
│ │ ├── fn_ticketGive.sqf
│ │ ├── fn_ticketPaid.sqf
│ │ ├── fn_ticketPay.sqf
│ │ ├── fn_ticketPrompt.sqf
│ │ ├── fn_vehInvSearch.sqf
│ │ └── fn_wantedGrab.sqf
│ ├── fn_initCiv.sqf
│ ├── fn_initCop.sqf
│ ├── fn_initMedic.sqf
│ ├── fn_setupActions.sqf
│ ├── fn_setupEVH.sqf
│ ├── fn_setupStationService.sqf
│ ├── fn_survival.sqf
│ ├── fn_welcomeNotification.sqf
│ ├── fsm
│ │ ├── client.fsm
│ │ └── timeModule.fsm
│ ├── functions
│ │ ├── fn_AAN.sqf
│ │ ├── fn_accType.sqf
│ │ ├── fn_actionKeyHandler.sqf
│ │ ├── fn_animSync.sqf
│ │ ├── fn_calWeightDiff.sqf
│ │ ├── fn_checkMap.sqf
│ │ ├── fn_clearVehicleAmmo.sqf
│ │ ├── fn_dropItems.sqf
│ │ ├── fn_escInterupt.sqf
│ │ ├── fn_fetchCfgDetails.sqf
│ │ ├── fn_fetchDeadGear.sqf
│ │ ├── fn_fetchVehInfo.sqf
│ │ ├── fn_giveDiff.sqf
│ │ ├── fn_handleDamage.sqf
│ │ ├── fn_handleInv.sqf
│ │ ├── fn_handleItem.sqf
│ │ ├── fn_hideObj.sqf
│ │ ├── fn_hudSetup.sqf
│ │ ├── fn_hudUpdate.sqf
│ │ ├── fn_inventoryClosed.sqf
│ │ ├── fn_inventoryOpened.sqf
│ │ ├── fn_isDamaged.sqf
│ │ ├── fn_isUIDActive.sqf
│ │ ├── fn_keyHandler.sqf
│ │ ├── fn_loadDeadGear.sqf
│ │ ├── fn_loadGear.sqf
│ │ ├── fn_moveIn.sqf
│ │ ├── fn_nearATM.sqf
│ │ ├── fn_nearUnits.sqf
│ │ ├── fn_nearestDoor.sqf
│ │ ├── fn_numberText.sqf
│ │ ├── fn_onFired.sqf
│ │ ├── fn_onTakeItem.sqf
│ │ ├── fn_playerSkins.sqf
│ │ ├── fn_playerTags.sqf
│ │ ├── fn_postNewsBroadcast.sqf
│ │ ├── fn_pullOutVeh.sqf
│ │ ├── fn_pushObject.sqf
│ │ ├── fn_receiveItem.sqf
│ │ ├── fn_receiveMoney.sqf
│ │ ├── fn_revealObjects.sqf
│ │ ├── fn_saveGear.sqf
│ │ ├── fn_simDisable.sqf
│ │ ├── fn_startLoadout.sqf
│ │ ├── fn_stripDownPlayer.sqf
│ │ ├── fn_teleport.sqf
│ │ ├── fn_whereAmI.sqf
│ │ └── network
│ │ │ ├── fn_broadcast.sqf
│ │ │ ├── fn_corpse.sqf
│ │ │ ├── fn_jumpFnc.sqf
│ │ │ ├── fn_say3D.sqf
│ │ │ ├── fn_setFuel.sqf
│ │ │ └── fn_soundDevice.sqf
│ ├── gangs
│ │ ├── fn_createGang.sqf
│ │ ├── fn_gangCreated.sqf
│ │ ├── fn_gangDisband.sqf
│ │ ├── fn_gangDisbanded.sqf
│ │ ├── fn_gangInvite.sqf
│ │ ├── fn_gangInvitePlayer.sqf
│ │ ├── fn_gangKick.sqf
│ │ ├── fn_gangLeave.sqf
│ │ ├── fn_gangMenu.sqf
│ │ ├── fn_gangNewLeader.sqf
│ │ ├── fn_gangUpgrade.sqf
│ │ └── fn_initGang.sqf
│ ├── housing
│ │ ├── fn_buyHouse.sqf
│ │ ├── fn_buyHouseGarage.sqf
│ │ ├── fn_containerMenu.sqf
│ │ ├── fn_copBreakDoor.sqf
│ │ ├── fn_copHouseOwner.sqf
│ │ ├── fn_garageRefund.sqf
│ │ ├── fn_getBuildingPositions.sqf
│ │ ├── fn_houseMenu.sqf
│ │ ├── fn_initHouses.sqf
│ │ ├── fn_lightHouse.sqf
│ │ ├── fn_lightHouseAction.sqf
│ │ ├── fn_lockHouse.sqf
│ │ ├── fn_lockupHouse.sqf
│ │ ├── fn_placeContainer.sqf
│ │ ├── fn_playerInBuilding.sqf
│ │ ├── fn_raidHouse.sqf
│ │ ├── fn_sellHouse.sqf
│ │ └── fn_sellHouseGarage.sqf
│ ├── init.sqf
│ ├── items
│ │ ├── fn_blastingCharge.sqf
│ │ ├── fn_boltcutter.sqf
│ │ ├── fn_defuseKit.sqf
│ │ ├── fn_flashbang.sqf
│ │ ├── fn_jerryCanRefuel.sqf
│ │ ├── fn_jerryRefuel.sqf
│ │ ├── fn_lockpick.sqf
│ │ ├── fn_placestorage.sqf
│ │ ├── fn_spikeStrip.sqf
│ │ └── fn_storageBox.sqf
│ ├── medical
│ │ ├── fn_deathScreen.sqf
│ │ ├── fn_medicLights.sqf
│ │ ├── fn_medicMarkers.sqf
│ │ ├── fn_medicRequest.sqf
│ │ ├── fn_medicSiren.sqf
│ │ ├── fn_medicSirenLights.sqf
│ │ ├── fn_onPlayerKilled.sqf
│ │ ├── fn_onPlayerRespawn.sqf
│ │ ├── fn_requestMedic.sqf
│ │ ├── fn_respawned.sqf
│ │ ├── fn_revivePlayer.sqf
│ │ └── fn_revived.sqf
│ ├── pmenu
│ │ ├── fn_cellphone.sqf
│ │ ├── fn_giveItem.sqf
│ │ ├── fn_giveMoney.sqf
│ │ ├── fn_keyDrop.sqf
│ │ ├── fn_keyGive.sqf
│ │ ├── fn_keyMenu.sqf
│ │ ├── fn_p_openMenu.sqf
│ │ ├── fn_p_updateMenu.sqf
│ │ ├── fn_pardon.sqf
│ │ ├── fn_removeItem.sqf
│ │ ├── fn_s_onChar.sqf
│ │ ├── fn_s_onCheckedChange.sqf
│ │ ├── fn_s_onSliderChange.sqf
│ │ ├── fn_settingsMenu.sqf
│ │ ├── fn_updateViewDistance.sqf
│ │ ├── fn_useItem.sqf
│ │ ├── fn_wantedAddP.sqf
│ │ ├── fn_wantedInfo.sqf
│ │ ├── fn_wantedList.sqf
│ │ └── fn_wantedMenu.sqf
│ ├── session
│ │ ├── fn_dataQuery.sqf
│ │ ├── fn_insertPlayerInfo.sqf
│ │ ├── fn_requestReceived.sqf
│ │ ├── fn_syncData.sqf
│ │ ├── fn_updatePartial.sqf
│ │ └── fn_updateRequest.sqf
│ ├── shops
│ │ ├── fn_3dPreviewDisplay.sqf
│ │ ├── fn_3dPreviewExit.sqf
│ │ ├── fn_3dPreviewInit.sqf
│ │ ├── fn_atmMenu.sqf
│ │ ├── fn_buyClothes.sqf
│ │ ├── fn_changeClothes.sqf
│ │ ├── fn_chopShopMenu.sqf
│ │ ├── fn_chopShopSelection.sqf
│ │ ├── fn_chopShopSell.sqf
│ │ ├── fn_chopShopSold.sqf
│ │ ├── fn_clothingFilter.sqf
│ │ ├── fn_clothingMenu.sqf
│ │ ├── fn_fuelLBChange.sqf
│ │ ├── fn_fuelStatOpen.sqf
│ │ ├── fn_levelCheck.sqf
│ │ ├── fn_vehicleShopBuy.sqf
│ │ ├── fn_vehicleShopLBChange.sqf
│ │ ├── fn_vehicleShopMenu.sqf
│ │ ├── fn_virt_buy.sqf
│ │ ├── fn_virt_menu.sqf
│ │ ├── fn_virt_sell.sqf
│ │ ├── fn_virt_update.sqf
│ │ ├── fn_weaponShopAccs.sqf
│ │ ├── fn_weaponShopBuySell.sqf
│ │ ├── fn_weaponShopFilter.sqf
│ │ ├── fn_weaponShopMags.sqf
│ │ ├── fn_weaponShopMenu.sqf
│ │ └── fn_weaponShopSelection.sqf
│ └── vehicle
│ │ ├── fn_addVehicle2Chain.sqf
│ │ ├── fn_colorVehicle.sqf
│ │ ├── fn_deviceMine.sqf
│ │ ├── fn_fuelRefuelCar.sqf
│ │ ├── fn_fuelStore.sqf
│ │ ├── fn_fuelSupply.sqf
│ │ ├── fn_lockVehicle.sqf
│ │ ├── fn_openInventory.sqf
│ │ ├── fn_vInteractionMenu.sqf
│ │ ├── fn_vehInventory.sqf
│ │ ├── fn_vehStoreItem.sqf
│ │ ├── fn_vehTakeItem.sqf
│ │ ├── fn_vehicleColor3DRefresh.sqf
│ │ ├── fn_vehicleOwners.sqf
│ │ └── fn_vehicleWeight.sqf
├── description.ext
├── dialog
│ ├── FuelStat.hpp
│ ├── MasterHandler.hpp
│ ├── admin_menu.hpp
│ ├── bank.hpp
│ ├── cell_phone.hpp
│ ├── chop_shop.hpp
│ ├── clothing.hpp
│ ├── common.hpp
│ ├── compensate.hpp
│ ├── deathScreen.hpp
│ ├── federalReserve.hpp
│ ├── function
│ │ ├── fn_bankDeposit.sqf
│ │ ├── fn_bankTransfer.sqf
│ │ ├── fn_bankWithdraw.sqf
│ │ ├── fn_displayHandler.sqf
│ │ ├── fn_gangBankResponse.sqf
│ │ ├── fn_garageLBChange.sqf
│ │ ├── fn_impoundMenu.sqf
│ │ ├── fn_progressBar.sqf
│ │ ├── fn_safeFix.sqf
│ │ ├── fn_safeInventory.sqf
│ │ ├── fn_safeOpen.sqf
│ │ ├── fn_safeStore.sqf
│ │ ├── fn_safeTake.sqf
│ │ ├── fn_sellGarage.sqf
│ │ ├── fn_setMapPosition.sqf
│ │ ├── fn_spawnConfirm.sqf
│ │ ├── fn_spawnMenu.sqf
│ │ ├── fn_spawnPointCfg.sqf
│ │ ├── fn_spawnPointSelected.sqf
│ │ ├── fn_unimpound.sqf
│ │ ├── fn_useGangBank.sqf
│ │ ├── fn_vehicleGarage.sqf
│ │ └── fn_wireTransfer.sqf
│ ├── gang.hpp
│ ├── hud_nameTags.hpp
│ ├── hud_stats.hpp
│ ├── impound.hpp
│ ├── key_chain.hpp
│ ├── newsStation.hpp
│ ├── pInteraction.hpp
│ ├── player_inv.hpp
│ ├── player_sys.sqf
│ ├── progress.hpp
│ ├── settings.hpp
│ ├── shop_items.hpp
│ ├── shops.hpp
│ ├── spawnSelection.hpp
│ ├── ticket.hpp
│ ├── trunk.hpp
│ ├── veh_shop.hpp
│ ├── vehicleShop.hpp
│ ├── vehicleShop3D.hpp
│ └── wanted_list.hpp
├── disclaimer.txt
├── icons
│ ├── ico_apple.paa
│ ├── ico_bank.paa
│ ├── ico_blastingCharge.paa
│ ├── ico_boltCutter.paa
│ ├── ico_cannabis.paa
│ ├── ico_catsharkRaw.paa
│ ├── ico_cement.paa
│ ├── ico_chickenDrumstick.paa
│ ├── ico_chickenDrumstickRaw.paa
│ ├── ico_cocaineProcessed.paa
│ ├── ico_cocaineUnprocessed.paa
│ ├── ico_coffee.paa
│ ├── ico_cookedFish.paa
│ ├── ico_copper.paa
│ ├── ico_copperore.paa
│ ├── ico_defibrillator.paa
│ ├── ico_defusekit.paa
│ ├── ico_diamondCut.paa
│ ├── ico_diamondUncut.paa
│ ├── ico_donuts.paa
│ ├── ico_fuel.paa
│ ├── ico_fuelempty.paa
│ ├── ico_glass.paa
│ ├── ico_goldbar.paa
│ ├── ico_heroinProcessed.paa
│ ├── ico_heroinUnprocessed.paa
│ ├── ico_iron.paa
│ ├── ico_ironore.paa
│ ├── ico_lambChop.paa
│ ├── ico_lambChopRaw.paa
│ ├── ico_lockpick.paa
│ ├── ico_mackerelRaw.paa
│ ├── ico_mail.paa
│ ├── ico_map.paa
│ ├── ico_marijuana.paa
│ ├── ico_matches.paa
│ ├── ico_messageAdmin.paa
│ ├── ico_messageNew.paa
│ ├── ico_messagePolice.paa
│ ├── ico_money.paa
│ ├── ico_mulletRaw.paa
│ ├── ico_muttonLeg.paa
│ ├── ico_muttonLegRaw.paa
│ ├── ico_oilProcessed.paa
│ ├── ico_oilUnprocessed.paa
│ ├── ico_ornateRaw.paa
│ ├── ico_peach.paa
│ ├── ico_pickaxe.paa
│ ├── ico_rabbit.paa
│ ├── ico_rabbitRaw.paa
│ ├── ico_redgull.paa
│ ├── ico_rock.paa
│ ├── ico_salemaRaw.paa
│ ├── ico_saltProcessed.paa
│ ├── ico_saltUnprocessed.paa
│ ├── ico_sand.paa
│ ├── ico_settings.paa
│ ├── ico_speech.paa
│ ├── ico_spikestrip.paa
│ ├── ico_storageBig.paa
│ ├── ico_storageSmall.paa
│ ├── ico_tbacon.paa
│ ├── ico_tunaRaw.paa
│ ├── ico_turtleRaw.paa
│ ├── ico_turtleSoup.paa
│ ├── ico_waterBottle.paa
│ ├── ico_wholeChicken.paa
│ └── ico_wholeChickenRaw.paa
├── initPlayerLocal.sqf
├── initServer.sqf
├── script_macros.hpp
├── sounds
│ ├── carLock.ogg
│ ├── carUnlock.ogg
│ ├── flashbang.ogg
│ ├── harvest.ogg
│ ├── medicSiren.ogg
│ ├── mining.ogg
│ ├── sirenLong.ogg
│ └── tazer.ogg
├── stringtable.xml
└── textures
│ ├── AYULoadingImage.png
│ ├── armalife.jpg
│ ├── cop_uniform.jpg
│ └── medic_uniform.jpg
├── BEFilters
├── README.md
├── addbackpackcargo.txt
├── addmagazinecargo.txt
├── addweaponcargo.txt
├── attachto.txt
├── createvehicle.txt
├── deletevehicle.txt
├── mpeventhandler.txt
├── publicvariable.txt
├── publicvariableval.txt
├── remotecontrol.txt
├── remoteexec.txt
├── scripts.txt
├── selectplayer.txt
├── setdamage.txt
├── setpos.txt
├── setvariable.txt
├── setvariableval.txt
├── teamswitch.txt
├── waypointcondition.txt
└── waypointstatement.txt
├── LICENSE.md
├── MAINTAINERS
├── README.md
├── SQMs
├── missionAltis.sqm
└── missionTanoa.sqm
├── _config.yml
├── altislife.sql
├── docs
├── _config.yml
└── index.html
├── life_hc
├── FSM
│ └── cleanup.fsm
├── MySQL
│ ├── Gangs
│ │ ├── fn_insertGang.sqf
│ │ ├── fn_queryPlayerGang.sqf
│ │ ├── fn_removeGang.sqf
│ │ └── fn_updateGang.sqf
│ ├── General
│ │ ├── fn_asyncCall.sqf
│ │ ├── fn_bool.sqf
│ │ ├── fn_cleanup.sqf
│ │ ├── fn_huntingZone.sqf
│ │ ├── fn_insertRequest.sqf
│ │ ├── fn_insertVehicle.sqf
│ │ ├── fn_mresArray.sqf
│ │ ├── fn_mresString.sqf
│ │ ├── fn_mresToArray.sqf
│ │ ├── fn_numberSafe.sqf
│ │ ├── fn_queryRequest.sqf
│ │ ├── fn_receivekeyofServer.sqf
│ │ ├── fn_updatePartial.sqf
│ │ └── fn_updateRequest.sqf
│ ├── Housing
│ │ ├── fn_addContainer.sqf
│ │ ├── fn_addHouse.sqf
│ │ ├── fn_deleteDBContainer.sqf
│ │ ├── fn_fetchPlayerHouses.sqf
│ │ ├── fn_houseGarage.sqf
│ │ ├── fn_sellHouse.sqf
│ │ ├── fn_sellHouseContainer.sqf
│ │ ├── fn_updateHouseContainers.sqf
│ │ └── fn_updateHouseTrunk.sqf
│ ├── Items
│ │ └── fn_spikeStrip.sqf
│ ├── Jail
│ │ └── fn_jailSys.sqf
│ ├── PlayTime
│ │ ├── fn_getPlayTime.sqf
│ │ └── fn_setPlayTime.sqf
│ ├── Vehicles
│ │ ├── fn_chopShopSell.sqf
│ │ ├── fn_getVehicles.sqf
│ │ ├── fn_keyManagement.sqf
│ │ ├── fn_spawnVehicle.sqf
│ │ ├── fn_vehicleCreate.sqf
│ │ ├── fn_vehicleDelete.sqf
│ │ ├── fn_vehicleStore.sqf
│ │ └── fn_vehicleUpdate.sqf
│ └── WantedSystem
│ │ ├── fn_wantedAdd.sqf
│ │ ├── fn_wantedBounty.sqf
│ │ ├── fn_wantedCrimes.sqf
│ │ ├── fn_wantedFetch.sqf
│ │ ├── fn_wantedPerson.sqf
│ │ ├── fn_wantedProfUpdate.sqf
│ │ └── fn_wantedRemove.sqf
├── PboPrefix.txt
├── config.cpp
├── hc_macros.hpp
└── initHC.sqf
├── life_server
├── FSM
│ ├── cleanup.fsm
│ └── timeModule.fsm
├── Functions
│ ├── Actions
│ │ └── fn_pickupAction.sqf
│ ├── Gangs
│ │ ├── fn_insertGang.sqf
│ │ ├── fn_queryPlayerGang.sqf
│ │ ├── fn_removeGang.sqf
│ │ └── fn_updateGang.sqf
│ ├── Housing
│ │ ├── fn_addContainer.sqf
│ │ ├── fn_addHouse.sqf
│ │ ├── fn_deleteDBContainer.sqf
│ │ ├── fn_fetchPlayerHouses.sqf
│ │ ├── fn_houseCleanup.sqf
│ │ ├── fn_houseGarage.sqf
│ │ ├── fn_initHouses.sqf
│ │ ├── fn_sellHouse.sqf
│ │ ├── fn_sellHouseContainer.sqf
│ │ ├── fn_updateHouseContainers.sqf
│ │ └── fn_updateHouseTrunk.sqf
│ ├── Jail
│ │ └── fn_jailSys.sqf
│ ├── MySQL
│ │ ├── fn_asyncCall.sqf
│ │ ├── fn_bool.sqf
│ │ ├── fn_insertRequest.sqf
│ │ ├── fn_insertVehicle.sqf
│ │ ├── fn_mresArray.sqf
│ │ ├── fn_mresString.sqf
│ │ ├── fn_mresToArray.sqf
│ │ ├── fn_numberSafe.sqf
│ │ ├── fn_queryRequest.sqf
│ │ ├── fn_updatePartial.sqf
│ │ └── fn_updateRequest.sqf
│ ├── PlayTime
│ │ ├── fn_getPlayTime.sqf
│ │ └── fn_setPlayTime.sqf
│ ├── Systems
│ │ ├── fn_chopShopSell.sqf
│ │ ├── fn_cleanup.sqf
│ │ ├── fn_cleanupRequest.sqf
│ │ ├── fn_clientDisconnect.sqf
│ │ ├── fn_entityRespawned.sqf
│ │ ├── fn_federalUpdate.sqf
│ │ ├── fn_getID.sqf
│ │ ├── fn_getVehicles.sqf
│ │ ├── fn_handleBlastingCharge.sqf
│ │ ├── fn_huntingZone.sqf
│ │ ├── fn_keyManagement.sqf
│ │ ├── fn_manageSC.sqf
│ │ ├── fn_recupKeyForHC.sqf
│ │ ├── fn_spawnVehicle.sqf
│ │ ├── fn_spikeStrip.sqf
│ │ ├── fn_terrainSort.sqf
│ │ ├── fn_transferOwnership.sqf
│ │ ├── fn_vehicleCreate.sqf
│ │ ├── fn_vehicleDelete.sqf
│ │ ├── fn_vehicleStore.sqf
│ │ ├── fn_vehicleUpdate.sqf
│ │ └── fn_whoDoneIt.sqf
│ └── WantedSystem
│ │ ├── fn_wantedAdd.sqf
│ │ ├── fn_wantedBounty.sqf
│ │ ├── fn_wantedCrimes.sqf
│ │ ├── fn_wantedFetch.sqf
│ │ ├── fn_wantedPerson.sqf
│ │ ├── fn_wantedProfUpdate.sqf
│ │ └── fn_wantedRemove.sqf
├── PboPrefix.txt
├── config.cpp
├── fix_headgear.sqf
├── functions.sqf
├── init.sqf
├── initHC.sqf
└── script_macros.hpp
└── tools
├── LICENSE
├── config_style_checker.py
└── sqf_validator.py
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | # Some editors do not have native support for EditorConfig and require a plugin.
3 | # For a list of those editors and a plugin for them, see http://editorconfig.org/#download
4 |
5 | # Top-most EditorConfig file
6 | root = true
7 |
8 | # Every file
9 | [*]
10 | # Soft tabs
11 | indent_style = space
12 | # 1 indent is 4 spaces
13 | indent_size = 4
14 | # Windows-style newlines
15 | end_of_line = crlf
16 | # Set default character encoding
17 | charset = utf-8
18 | # Remove any whitespace characters preceding newline characters
19 | trim_trailing_whitespace = true
20 | # A newline ending every file
21 | insert_final_newline = true
22 |
23 | # Markdown files
24 | [*.md]
25 | # Do not remove any whitespace characters preceding newline characters
26 | trim_trailing_whitespace = false
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
5 |
6 | ### Expected behaviour
7 |
8 |
9 | ### Actual behaviour
10 |
11 |
12 | ### Steps to reproduce the behaviour
13 | 1.
14 |
15 | ### [RPT](https://community.bistudio.com/wiki/Crash_Files#Arma_3) and/or extDB3 logs (if applicable)
16 |
20 |
21 | ----
22 |
23 | Mission version:
24 |
25 | Launcher version:
26 |
27 | Game version:
28 |
29 | Branch:
30 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Resolves #.
6 |
7 | #### Changes proposed in this pull request:
8 | -
9 |
10 | - [ ] I have tested my changes and corrected any errors found
11 |
--------------------------------------------------------------------------------
/.github/workflows/validate.yml:
--------------------------------------------------------------------------------
1 | name: Validation
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'master'
7 | - 'v5.X.X'
8 | pull_request:
9 | branches:
10 | - 'master'
11 | - 'v5.X.X'
12 |
13 | jobs:
14 | validate:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 | - uses: actions/setup-python@v2
20 | with:
21 | python-version: '3.6.x'
22 | - name: Validate SQF
23 | run: python ./tools/sqf_validator.py
24 | - name: Validate Configs
25 | run: python ./tools/config_style_checker.py
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #
2 | # NOTE! Don't add files that are generated in specific
3 | # subdirectories here. Add them in the ".gitignore" file
4 | # in that subdirectory instead.
5 | #
6 | # NOTE! Please use 'git ls-files -i --exclude-standard'
7 | # command after changing this file, to see if there are
8 | # any tracked files which get ignored after the change.
9 | #
10 | # Normal rules
11 | #
12 | .*
13 | *~
14 | *.zip
15 | *.rar
16 | *.bak
17 |
18 | #
19 | # Windows Files
20 | #
21 | *.dll
22 | *.bat
23 | *.exe
24 | Thumbs.db
25 |
26 | #
27 | # Linux Files
28 | #
29 | *.so
30 | *.sh
31 | .fuse_hidden*
32 | .Trash-*
33 |
34 | #
35 | # OSX Files
36 | #
37 | .DS_Store
38 | .AppleDouble
39 | .LSOverride
40 |
41 | #
42 | # Bohemia Packed Files
43 | #
44 | *.pbo
45 | *.xbo
46 | *.ebo
47 | *.ifa
48 |
49 | #
50 | # IntelliJ IDEA Files
51 | #
52 | .idea/
53 | *.iml
54 |
55 | #
56 | # git files that we don't want to ignore even it they are dot-files
57 | #
58 | !.gitignore
59 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/SpyGlass/endoftheline.sqf:
--------------------------------------------------------------------------------
1 | #include "Hi, it appears that your client crashed. Do not worry we will get back with you in six years."
2 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/SpyGlass/fn_cookieJar.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_cookieJar.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Reports to the RPT of a confirmed cheater for external programs
7 | to parse,log or ban automatically.
8 | */
9 | private ["_pName", "_pUID", "_pReason"];
10 | _pName = [_this, 0, "", [""]] call BIS_fnc_param;
11 | _pUID = [_this, 1, "", [""]] call BIS_fnc_param;
12 | _pReason = [_this, 2, "", [""]] call BIS_fnc_param;
13 |
14 | if (_pName isEqualTo "" || _pUID isEqualTo "" || _pReason isEqualTo "") exitWith {}; //Bad params passed..
15 |
16 | diag_log format [localize "STR_SpyDetect_cookieJar", _pName, _pUID, _pReason]; //Outputs to RPT for external programs to parse, log, and react to.
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/SpyGlass/fn_notifyAdmins.sqf:
--------------------------------------------------------------------------------
1 | #include "..\script_macros.hpp"
2 | /*
3 | File: fn_notifyAdmins.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Checks if player is admin and notifies them that of the
8 | flagged person.
9 | */
10 |
11 |
12 |
13 | if (isNil "life_adminlevel") exitWith {};//Should fix undefined "Life_adminLevel"
14 | if (isServer && {!hasInterface}) exitWith {};
15 | if (FETCH_CONST(life_adminlevel) < 1) exitWith {};
16 |
17 | hint parseText format [localize "STR_SpyDetect_CheaterFlagged", (_this select 0), (_this select 1)];
18 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/SpyGlass/fn_observe.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_observe.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | This is the observation part of SPY-GLASS, it reports to the RPT log
7 | of unusual activity by the player.
8 | */
9 | private ["_pName", "_pUID", "_pReason"];
10 | _pName = [_this, 0, "", [""]] call BIS_fnc_param;
11 | _pUID = [_this, 1, "", [""]] call BIS_fnc_param;
12 | _pReason = [_this, 2, "", [""]] call BIS_fnc_param;
13 |
14 | if (_pName isEqualTo "" || _pUID isEqualTo "" || _pReason isEqualTo "") exitWith {}; //Bad params passed..
15 |
16 | diag_log format [localize "STR_SpyDetect_Observes", _pName, _pUID, _pReason]; //Outputs to RPT for external programs to parse, log, and react to.
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_buyLicense.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_buyLicense.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Called when purchasing a license. May need to be revised.
8 | */
9 | private ["_type","_varName","_displayName","_sideFlag","_price"];
10 | _type = _this select 3;
11 |
12 | if (!isClass (missionConfigFile >> "Licenses" >> _type)) exitWith {}; //Bad entry?
13 | _displayName = M_CONFIG(getText,"Licenses",_type,"displayName");
14 | _price = M_CONFIG(getNumber,"Licenses",_type,"price");
15 | _sideFlag = M_CONFIG(getText,"Licenses",_type,"side");
16 | _varName = LICENSE_VARNAME(_type,_sideFlag);
17 |
18 | if (CASH < _price) exitWith {hint format [localize "STR_NOTF_NE_1",[_price] call life_fnc_numberText,localize _displayName];};
19 | CASH = CASH - _price;
20 |
21 | [0] call SOCK_fnc_updatePartial;
22 |
23 | titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];
24 | missionNamespace setVariable [_varName,true];
25 |
26 | [2] call SOCK_fnc_updatePartial;
27 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_dpFinish.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_dpFinish.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Finishes the DP Mission and calculates the money earned based
8 | on distance between A->B
9 | */
10 | private ["_dp","_dis","_price"];
11 | _dp = [_this,0,objNull,[objNull]] call BIS_fnc_param;
12 | life_delivery_in_progress = false;
13 | life_dp_point = nil;
14 | _dis = round((getPos life_dp_start) distance (getPos _dp));
15 | _price = round(1.7 * _dis);
16 |
17 | ["DeliverySucceeded",[format [(localize "STR_NOTF_Earned_1"),[_price] call life_fnc_numberText]]] call bis_fnc_showNotification;
18 | life_cur_task setTaskState "Succeeded";
19 | player removeSimpleTask life_cur_task;
20 | CASH = CASH + _price;
21 | [0] call SOCK_fnc_updatePartial;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_escortAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_escortAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description: Attaches the desired person(_unit) to the player(player) and "escorts them".
7 | */
8 | private ["_unit"];
9 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 |
11 | if (!isNull(player getVariable ["escortingPlayer",objNull])) exitWith {};
12 | if (isNil "_unit" || isNull _unit || !isPlayer _unit) exitWith {};
13 | if (!(side _unit in [civilian,independent])) exitWith {};
14 | if (player distance _unit > 3) exitWith {};
15 |
16 | _unit attachTo [player,[0.1,1.1,0]];
17 | player setVariable ["escortingPlayer",_unit];
18 | player setVariable ["isEscorting",true];
19 | _unit setVariable ["transporting",false,true];
20 | _unit setVariable ["Escorting",true,true];
21 | player reveal _unit;
22 |
23 | [_unit] spawn {
24 | _unit = _this select 0;
25 | waitUntil {(!(_unit getVariable ["Escorting",false]))};
26 | player setVariable ["escortingPlayer",nil];
27 | player setVariable ["isEscorting",false];
28 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_packupSpikes.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_packupSpikes.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Packs up a deployed spike strip.
7 | */
8 | private ["_spikes"];
9 | _spikes = nearestObjects[getPos player,["Land_Razorwire_F"],8] select 0;
10 | if (isNil "_spikes") exitWith {};
11 |
12 | if ([true,"spikeStrip",1] call life_fnc_handleInv) then {
13 | titleText[localize "STR_NOTF_SpikeStrip","PLAIN"];
14 | player removeAction life_action_spikeStripPickup;
15 | life_action_spikeStripPickup = nil;
16 | deleteVehicle _spikes;
17 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_postBail.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_postBail.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Called when the player attempts to post bail.
8 | Needs to be revised.
9 | */
10 | private ["_unit"];
11 | _unit = param [1,objNull,[objNull]];
12 | if (life_bail_paid) exitWith {};
13 | if (isNil "life_bail_amount") then {life_bail_amount = 3500;};
14 | if (!life_canpay_bail) exitWith {hint localize "STR_NOTF_Bail_Post"};
15 | if (BANK < life_bail_amount) exitWith {hint format [localize "STR_NOTF_Bail_NotEnough",life_bail_amount];};
16 |
17 | BANK = BANK - life_bail_amount;
18 | life_bail_paid = true;
19 | [1] call SOCK_fnc_updatePartial;
20 | [0,"STR_NOTF_Bail_Bailed",true,[profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_pulloutAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_pulloutAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Pulls civilians out of a car if it's stopped.
8 | */
9 | private ["_crew"];
10 | _crew = crew cursorObject;
11 |
12 | {
13 | if !(side _x isEqualTo west) then {
14 | _x setVariable ["transporting",false,true]; _x setVariable ["Escorting",false,true];
15 | [_x] remoteExecCall ["life_fnc_pulloutVeh",_x];
16 | };
17 | } forEach _crew;
18 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_putInCar.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_putInCar.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Finds the nearest vehicle and loads the target into the vehicle.
8 | */
9 | private ["_unit"];
10 | _unit = param [0,objNull,[objNull]];
11 | if (isNull _unit || !isPlayer _unit) exitWith {};
12 |
13 | _nearestVehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0;
14 | if (isNil "_nearestVehicle") exitWith {hint localize "STR_NOTF_VehicleNear"};
15 |
16 | detach _unit;
17 | [_nearestVehicle] remoteExecCall ["life_fnc_moveIn",_unit];
18 | _unit setVariable ["Escorting",false,true];
19 | _unit setVariable ["transporting",true,true];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_restrainAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_restrainAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Restrains the target.
8 | */
9 | private ["_unit"];
10 | _unit = cursorObject;
11 | if (isNull _unit) exitWith {}; //Not valid
12 | if (player distance _unit > 3) exitWith {};
13 | if (_unit getVariable "restrained") exitWith {};
14 | if (side _unit isEqualTo west) exitWith {};
15 | if (player isEqualTo _unit) exitWith {};
16 | if (!isPlayer _unit) exitWith {};
17 | //Broadcast!
18 |
19 | _unit setVariable ["playerSurrender",false,true];
20 | _unit setVariable ["restrained",true,true];
21 | [player] remoteExec ["life_fnc_restrain",_unit];
22 | [0,"STR_NOTF_Restrained",true,[_unit getVariable ["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_robAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_robAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the robbing process?
8 | */
9 | private ["_target"];
10 | _target = cursorObject;
11 |
12 | //Error checks
13 | if (isNull _target) exitWith {};
14 | if (!isPlayer _target) exitWith {};
15 |
16 | if (_target getVariable ["robbed",false]) exitWith {};
17 | [player] remoteExecCall ["life_fnc_robPerson",_target];
18 | _target setVariable ["robbed",true,true];
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_searchAction.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_searchAction.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Starts the searching process.
7 | */
8 | params [
9 | ["_unit",objNull,[objNull]]
10 | ];
11 | if (isNull _unit) exitWith {};
12 | hint localize "STR_NOTF_Searching";
13 | sleep 2;
14 | if (player distance _unit > 5 || !alive player || !alive _unit) exitWith {hint localize "STR_NOTF_CannotSearchPerson"};
15 | [player] remoteExec ["life_fnc_searchClient",_unit];
16 | life_action_inUse = true;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_searchVehAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_searchVehAction.sqf
4 | Author:
5 |
6 | Description:
7 |
8 | */
9 | private ["_vehicle","_data"];
10 | _vehicle = cursorObject;
11 | if ((_vehicle isKindOf "Car") || !(_vehicle isKindOf "Air") || !(_vehicle isKindOf "Ship")) then {
12 | _owners = _vehicle getVariable "vehicle_info_owners";
13 | if (isNil "_owners") exitWith {hint localize "STR_NOTF_VehCheat"; deleteVehicle _vehicle;};
14 |
15 | life_action_inUse = true;
16 | hint localize "STR_NOTF_Searching";
17 |
18 | sleep 3;
19 | life_action_inUse = false;
20 |
21 | if (player distance _vehicle > 10 || !alive player || !alive _vehicle) exitWith {hint localize "STR_NOTF_SearchVehFail";};
22 | //_inventory = [(_vehicle getVariable "vehicle_info_inv")] call fnc_veh_inv;
23 | //if (isNil {_inventory}) then {_inventory = "Nothing in storage."};
24 | _owners = [_owners] call life_fnc_vehicleOwners;
25 |
26 | if (_owners == "any
") then {
27 | _owners = "No owners, impound it
";
28 | };
29 | hint parseText format [localize "STR_NOTF_SearchVeh",_owners];
30 | };
31 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_seizePlayerAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_seizePlayerAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the seize process..
8 | Based off Tonic's fn_searchAction.sqf
9 | */
10 | params [
11 | ["_unit",objNull,[objNull]]
12 | ];
13 | if (isNull _unit) exitWith {};
14 | sleep 2;
15 | if (player distance _unit > 5 || !alive player || !alive _unit) exitWith {hint localize "STR_NOTF_CannotSeizePerson"};
16 | [player] remoteExec ["life_fnc_seizeClient",_unit];
17 | life_action_inUse = false;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_stopEscorting.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_stopEscorting.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Detaches player(_unit) from the Escorter(player) and sets them back down.
8 | */
9 |
10 | private _unit = player getVariable ["escortingPlayer",objNull];
11 | if (isNull _unit) then {_unit = cursorTarget;}; //Emergency fallback.
12 | if (isNull _unit) exitWith {}; //Target not found even after using cursorTarget.
13 | if (!(_unit getVariable ["Escorting",false])) exitWith {}; //He's not being Escorted.
14 | detach _unit;
15 | _unit setVariable ["Escorting",false,true];
16 | player setVariable ["isEscorting",false];
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_surrender.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_surrender.sqf
4 | Author:
5 |
6 | Description: Causes player to put their hands on their head.
7 | */
8 | if ( player getVariable ["restrained",false] ) exitWith {};
9 | if ( player getVariable ["Escorting",false] ) exitWith {};
10 | if ( vehicle player != player ) exitWith {};
11 | if ( speed player > 1 ) exitWith {};
12 |
13 | if (player getVariable ["playerSurrender",false]) then {
14 | player setVariable ["playerSurrender",false,true];
15 | } else {
16 | player setVariable ["playerSurrender",true,true];
17 | };
18 |
19 | while {player getVariable ["playerSurrender",false]} do {
20 | player playMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
21 | if (!alive player || !(isNull objectParent player)) then { player setVariable ["playerSurrender",false,true]; };
22 | };
23 |
24 | player playMoveNow "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
25 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_ticketAction.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_ticketAction.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Starts the ticketing process.
7 | */
8 | params [
9 | ["_unit",objNull,[objNull]]
10 | ];
11 | disableSerialization;
12 | if (!(createDialog "life_ticket_give")) exitWith {hint localize "STR_Cop_TicketFail"};
13 | if (isNull _unit || !isPlayer _unit) exitWith {};
14 | ctrlSetText[2651,format [localize "STR_Cop_Ticket",_unit getVariable ["realname",name _unit]]];
15 | life_ticket_unit = _unit;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/actions/fn_unrestrain.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_unrestrain.sqf
4 | Author:
5 |
6 | Description:
7 |
8 | */
9 | private ["_unit"];
10 | _unit = param [0,objNull,[objNull]];
11 | if (isNull _unit || !(_unit getVariable ["restrained",false])) exitWith {}; //Error check?
12 |
13 | _unit setVariable ["restrained",false,true];
14 | _unit setVariable ["Escorting",false,true];
15 | _unit setVariable ["transporting",false,true];
16 | detach _unit;
17 |
18 | [0,"STR_NOTF_Unrestrain",true,[_unit getVariable ["realname",name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminCompensate.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminCompensate.sqf
4 | Author: ColinM9991
5 |
6 | Description:
7 | Figure it out.
8 | */
9 | private ["_value","_action"];
10 | if (FETCH_CONST(life_adminlevel) < 2) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
11 | _value = parseNumber(ctrlText 9922);
12 | if (_value < 0) exitWith {};
13 | if (_value > 999999) exitWith {hint localize "STR_ANOTF_Fail"};
14 |
15 | _action = [
16 | format [localize "STR_ANOTF_CompWarn",[_value] call life_fnc_numberText],
17 | localize "STR_Admin_Compensate",
18 | localize "STR_Global_Yes",
19 | localize "STR_Global_No"
20 | ] call BIS_fnc_guiMessage;
21 |
22 | if (_action) then {
23 | CASH = CASH + _value;
24 | hint format [localize "STR_ANOTF_Success",[_value] call life_fnc_numberText];
25 | closeDialog 0;
26 | } else {
27 | hint localize "STR_NOTF_ActionCancel";
28 | closeDialog 0;
29 | };
30 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminDebugCon.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminDebugCon.sqf
4 | Author: ColinM9991
5 |
6 | Description:
7 | Opens the Debug Console.
8 | */
9 | if (FETCH_CONST(life_adminlevel) < 5) exitWith {closeDialog 0; hint localize "STR_NOTF_adminDebugCon";};
10 | life_admin_debug = true;
11 |
12 | createDialog "RscDisplayDebugPublic";
13 | [0,format [localize "STR_NOTF_adminHasOpenedDebug",profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
14 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminFreeze.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminFreeze.sqf
4 | Author: ColinM9991
5 |
6 | Description: Freezes selected player
7 | */
8 | if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
9 |
10 | private _unit = lbData[2902,lbCurSel (2902)];
11 | _unit = call compile format ["%1", _unit];
12 | if (isNil "_unit") exitWith {};
13 | if (isNull _unit) exitWith {};
14 | if (_unit == player) exitWith {hint localize "STR_ANOTF_Error";};
15 |
16 | [player] remoteExec ["life_fnc_freezePlayer",_unit];
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminGetID.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_adminGetID.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Fetches the selected ID of the player.
7 | Used by in-game admins to issue bans/kicks.
8 | https://community.bistudio.com/wiki/Multiplayer_Server_Commands
9 | */
10 | private _unit = lbData[2902,lbCurSel (2902)];
11 | _unit = call compile format ["%1", _unit];
12 | if (isNil "_unit") exitWith {};
13 | if (isNull _unit) exitWith {};
14 |
15 | [_unit,player] remoteExecCall ["TON_fnc_getID",2];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminGodMode.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminGodMode.sqf
4 | Author: Tobias 'Xetoxyc' Sittenauer
5 |
6 | Description: Enables God mode for Admin
7 | */
8 |
9 | if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
10 |
11 | closeDialog 0;
12 |
13 | if (life_god) then {
14 | life_god = false;
15 | titleText [localize "STR_ANOTF_godModeOff","PLAIN"]; titleFadeOut 2;
16 | player allowDamage true;
17 | } else {
18 | life_god = true;
19 | titleText [localize "STR_ANOTF_godModeOn","PLAIN"]; titleFadeOut 2;
20 | player allowDamage false;
21 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminID.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_adminID.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Output information received to admin menu.
7 | */
8 | private ["_display","_ret","_text"];
9 | disableSerialization;
10 | _ret = _this select 0;
11 | _display = findDisplay 2900;
12 | _text = _display displayCtrl 2903;
13 |
14 | _text ctrlSetStructuredText parseText format ["ID: %1",_ret];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminQuery.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminQuery.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the query on a player.
8 | */
9 | private ["_text","_info","_prim","_sec","_vest","_uni","_bp","_attach","_tmp"];
10 | disableSerialization;
11 | if (!isNil "admin_query_ip") exitWith {hint localize "STR_ANOTF_Query_2"};
12 | _text = CONTROL(2900,2903);
13 | _info = lbData[2902,lbCurSel (2902)];
14 | _info = call compile format ["%1", _info];
15 |
16 | if (isNil "_info") exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
17 | if (isNull _info) exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
18 | [player] remoteExec ["TON_fnc_player_query",_info];
19 | _text ctrlSetText localize "STR_ANOTF_Query";
20 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminSpectate.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminSpectate.sqf
4 | Author: ColinM9991
5 |
6 | Description:
7 | Spectate the chosen player.
8 | */
9 | if (FETCH_CONST(life_adminlevel) < 3) exitWith {closeDialog 0;};
10 |
11 | private _unit = lbData[2902,lbCurSel (2902)];
12 | _unit = call compile format ["%1", _unit];
13 | if (isNil "_unit") exitWith {};
14 | if (isNull _unit) exitWith {};
15 | if (_unit == player) exitWith {hint localize "STR_ANOTF_Error";};
16 |
17 | closeDialog 0;
18 |
19 | _unit switchCamera "INTERNAL";
20 | hint format [localize "STR_NOTF_nowSpectating",_unit getVariable ["realname",name _unit]];
21 | AM_Exit = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 68) then {(findDisplay 46) displayRemoveEventHandler ['KeyDown',AM_Exit]; player switchCamera 'INTERNAL'; hint localize 'STR_NOTF_stoppedSpectating';}; false"];
22 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminTeleport.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminTeleport.sqf
4 | Author: ColinM9991
5 | Credits: To original script author(s)
6 | Description:
7 | Teleport to chosen position.
8 | */
9 | if (FETCH_CONST(life_adminlevel) < 3) exitWith {closeDialog 0;};
10 |
11 | closeDialog 0;
12 |
13 | openMap [true, false];
14 | onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call life_fnc_teleport";
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/admin/fn_adminTpHere.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_adminTpHere.sqf
4 | Author: ColinM9991
5 |
6 | Description:
7 | Teleport selected player to you.
8 | */
9 | if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0;};
10 |
11 | private _target = lbData[2902,lbCurSel (2902)];
12 | _target = call compile format ["%1", _target];
13 | if (isNil "_target" || isNull _target) exitWith {};
14 | if (_target == player) exitWith {hint localize "STR_ANOTF_Error";};
15 |
16 | if (!(vehicle _target isEqualTo _target)) exitWith {hint localize "STR_Admin_CannotTpHere"};
17 | _target setPos (getPos player);
18 | hint format [localize "STR_NOTF_haveTPedToYou",_target getVariable ["realname",name _target]];
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_demoChargeTimer.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_demoChargeTimer.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the "Demo" timer for the police.
8 | */
9 | private ["_uiDisp","_time","_timer"];
10 | disableSerialization;
11 | "lifeTimer" cutRsc ["life_timer","PLAIN"];
12 | _uiDisp = uiNamespace getVariable "life_timer";
13 | _timer = _uiDisp displayCtrl 38301;
14 | _time = time + (5 * 60);
15 |
16 | for "_i" from 0 to 1 step 0 do {
17 | if (isNull _uiDisp) then {
18 | "lifeTimer" cutRsc ["life_timer","PLAIN"];
19 | _uiDisp = uiNamespace getVariable "life_timer";
20 | _timer = _uiDisp displayCtrl 38301;
21 | };
22 | if (round(_time - time) < 1) exitWith {};
23 | if (!(fed_bank getVariable ["chargeplaced",false])) exitWith {};
24 | _timer ctrlSetText format ["%1",[(_time - time),"MM:SS.MS"] call BIS_fnc_secondsToString];
25 | sleep 0.08;
26 | };
27 | "lifeTimer" cutText["","PLAIN"];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_freezePlayer.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_freezePlayer.sqf
4 | Author: ColinM9991
5 |
6 | Description:
7 | Freezes selected player.
8 | */
9 | private ["_admin"];
10 | _admin = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 |
12 | if (life_frozen) then {
13 | hint localize "STR_NOTF_Unfrozen";
14 | [1,format [localize "STR_ANOTF_Unfrozen",profileName]] remoteExecCall ["life_fnc_broadcast",_admin];
15 | disableUserInput false;
16 | life_frozen = false;
17 | } else {
18 | hint localize "STR_NOTF_Frozen";
19 | [1,format [localize "STR_ANOTF_Frozen",profileName]] remoteExecCall ["life_fnc_broadcast",_admin];
20 | disableUserInput true;
21 | life_frozen = true;
22 | };
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_knockedOut.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_knockedOut.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts and monitors the knocked out state.
8 | */
9 | private "_obj";
10 | params [
11 | ["_target",objNull,[objNull]],
12 | ["_who","",[""]]
13 | ];
14 |
15 | if (isNull _target) exitWith {};
16 | if !(_target isEqualTo player) exitWith {};
17 | if (_who isEqualTo "") exitWith {};
18 |
19 | titleText[format [localize "STR_Civ_KnockedOut",_who],"PLAIN"];
20 | player playMoveNow "Incapacitated";
21 | disableUserInput true;
22 |
23 | _obj = "Land_ClutterCutter_small_F" createVehicle ASLTOATL(visiblePositionASL player);
24 | _obj setPosATL ASLTOATL(visiblePositionASL player);
25 |
26 | life_isknocked = true;
27 | player attachTo [_obj,[0,0,0]];
28 | sleep 15;
29 | player playMoveNow "AmovPpneMstpSrasWrflDnon";
30 | disableUserInput false;
31 | detach player;
32 | deleteVehicle _obj;
33 | life_isknocked = false;
34 | player setVariable ["robbed",false,true];
35 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_knockoutAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_knockoutAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Knocks out the target.
8 | */
9 | private "_target";
10 | _target = param [0,objNull,[objNull]];
11 |
12 | //Error checks
13 | if (isNull _target) exitWith {};
14 | if (!isPlayer _target) exitWith {};
15 | if (player distance _target > 4) exitWith {};
16 | life_knockout = true;
17 | [player,"AwopPercMstpSgthWrflDnon_End2"] remoteExecCall ["life_fnc_animSync",RCLIENT];
18 | sleep 0.08;
19 | [_target,profileName] remoteExec ["life_fnc_knockedOut",_target];
20 |
21 | sleep 3;
22 | life_knockout = false;
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_robPerson.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_robPerson.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Robs a person.
8 | */
9 | params [
10 | ["_robber",objNull,[objNull]]
11 | ];
12 | if (isNull _robber) exitWith {}; //No one to return it to?
13 |
14 | if (CASH > 0) then {
15 | [CASH,player,_robber] remoteExecCall ["life_fnc_robReceive",_robber];
16 |
17 | if (life_HC_isActive) then {
18 | [getPlayerUID _robber,_robber getVariable ["realname",name _robber],"211"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life];
19 | } else {
20 | [getPlayerUID _robber,_robber getVariable ["realname",name _robber],"211"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
21 | };
22 |
23 | [1,"STR_NOTF_Robbed",true,[_robber getVariable ["realname",name _robber],profileName,[CASH] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
24 | CASH = 0;
25 | [0] call SOCK_fnc_updatePartial;
26 | } else {
27 | [2,"STR_NOTF_RobFail",true,[profileName]] remoteExecCall ["life_fnc_broadcast",_robber];
28 | };
29 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/civilian/fn_robReceive.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_robReceive.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 |
8 | */
9 | params [
10 | ["_cash",0,[0]],
11 | ["_victim",objNull,[objNull]],
12 | ["_robber",objNull,[objNull]]
13 | ];
14 |
15 | if (_robber == _victim) exitWith {};
16 | if (_cash isEqualTo 0) exitWith {titleText[localize "STR_Civ_RobFail","PLAIN"]};
17 |
18 | CASH = CASH + _cash;
19 | [0] call SOCK_fnc_updatePartial;
20 | titleText[format [localize "STR_Civ_Robbed",[_cash] call life_fnc_numberText],"PLAIN"];
21 |
22 | if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then {
23 | if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
24 | money_log = format [localize "STR_DL_ML_Robbed_BEF",[_cash] call life_fnc_numberText,_victim,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
25 | } else {
26 | money_log = format [localize "STR_DL_ML_Robbed",profileName,(getPlayerUID player),[_cash] call life_fnc_numberText,_victim,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
27 | };
28 | publicVariableServer "money_log";
29 | };
30 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/clientValidator.sqf:
--------------------------------------------------------------------------------
1 | #include "..\script_macros.hpp"
2 |
3 | /*
4 | File: clientValidator.sqf
5 | Author:
6 |
7 | Description:
8 | Loops through a list of variables and checks whether
9 | or not they are defined, if they are defined then trigger
10 | spyglass and kick the client to the lobby.
11 | */
12 |
13 | private _vars = [
14 | "life_revive_fee", "life_gangPrice", "life_gangUpgradeBase", "life_enableFatigue", "life_paycheck_period", "life_vShop_rentalOnly", "life_weapon_shop_array",
15 | "life_garage_prices", "life_garage_sell", "life_houseLimit", "life_gangUpgradeMultipler", "life_impound_car", "life_impound_boat", "life_impound_air"
16 | ];
17 |
18 | {
19 | if (!isNil {(missionNamespace getVariable _x)}) exitWith {
20 | [profileName, getPlayerUID player, format ["VariableSetBeforeInitialized_%1", _x]] remoteExecCall ["SPY_fnc_cookieJar", RSERV];
21 | [profileName, format [localize "STR_SpyDetect_VariableSetBeforeClientInitialized", _x]] remoteExecCall ["SPY_fnc_notifyAdmins", RCLIENT];
22 | sleep 0.5;
23 | failMission "SpyGlass";
24 | };
25 | } forEach _vars;
26 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/config/fn_houseConfig.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_houseConfig.sqf
3 | Author: BoGuu
4 |
5 | Description:
6 | Fetch data from Config_Housing/Garages
7 | */
8 |
9 | private _house = param [0,"",[""]];
10 |
11 | if (_house isEqualTo "") exitWith {[]};
12 |
13 | private _houseConfig = missionConfigFile >> "Housing" >> worldName >> _house;
14 | private _garageConfig = missionConfigFile >> "Garages" >> worldName >> _house;
15 |
16 | private _config = [_garageConfig,_houseConfig] select {isClass _x};
17 |
18 | if (_config isEqualTo []) exitWith {[]};
19 |
20 | _config = _config select 0;
21 | private _price = getNumber(_config >> "price");
22 | private _numberCrates = if (_houseConfig isEqualTo _config) then {getNumber(_houseConfig >> "numberCrates")} else {0};
23 |
24 | //Return
25 | [_price,_numberCrates]
26 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/config/fn_itemWeight.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_itemWeight.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Gets the items weight and returns it.
8 | */
9 | private ["_item"];
10 | _item = [_this,0,"",[""]] call BIS_fnc_param;
11 | if (_item isEqualTo "") exitWith {};
12 |
13 | M_CONFIG(getNumber,"VirtualItems",_item,"weight");
14 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/config/fn_vehicleWeightCfg.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_vehicleWeightCfg.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Master configuration for vehicle weight.
8 | */
9 | private ["_className","_classNameLife","_weight"];
10 | _className = [_this,0,"",[""]] call BIS_fnc_param;
11 | _classNameLife = _className;
12 | if (!isClass (missionConfigFile >> "LifeCfgVehicles" >> _classNameLife)) then {
13 | _classNameLife = "Default"; //Use Default class if it doesn't exist
14 | diag_log format ["%1: LifeCfgVehicles class doesn't exist",_className];
15 | };
16 | _weight = M_CONFIG(getNumber,"LifeCfgVehicles",_classNameLife,"vItemSpace");
17 |
18 | if (isNil "_weight") then {_weight = -1;};
19 | _weight;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_bountyReceive.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_bountyReceive.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Notifies the player he has received a bounty and gives him the cash.
8 | */
9 | private ["_val","_total"];
10 | _val = [_this,0,"",["",0]] call BIS_fnc_param;
11 | _total = [_this,1,"",["",0]] call BIS_fnc_param;
12 |
13 | if (_val == _total) then {
14 | titleText[format [localize "STR_Cop_BountyRecieve",[_val] call life_fnc_numberText],"PLAIN"];
15 | } else {
16 | titleText[format [localize "STR_Cop_BountyKill",[_val] call life_fnc_numberText,[_total] call life_fnc_numberText],"PLAIN"];
17 | };
18 |
19 | BANK = BANK + _val;
20 | [1] call SOCK_fnc_updatePartial;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_copSiren.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_copSiren.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the cop siren sound for other players.
8 | */
9 | private ["_vehicle"];
10 | _vehicle = param [0,objNull,[objNull]];
11 |
12 | if (isNull _vehicle) exitWith {};
13 | if (isNil {_vehicle getVariable "siren"}) exitWith {};
14 |
15 | for "_i" from 0 to 1 step 0 do {
16 | if (!(_vehicle getVariable "siren")) exitWith {};
17 | if (count crew _vehicle isEqualTo 0) then {_vehicle setVariable ["siren",false,true]};
18 | if (!alive _vehicle) exitWith {};
19 | if (isNull _vehicle) exitWith {};
20 | _vehicle say3D ["sirenLong",500,1]; //Class name specified in description.ext, max distance & pitch
21 | sleep 4.870;//Exactly matches the length of the audio file.
22 | if (!(_vehicle getVariable "siren")) exitWith {};
23 | };
24 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_licenseCheck.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_licenseCheck.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Returns the licenses to the cop.
8 | */
9 | private ["_cop","_licenses","_licensesConfigs"];
10 | _cop = param [0,objNull,[objNull]];
11 | if (isNull _cop) exitWith {}; //Bad entry
12 |
13 | _licenses = "";
14 |
15 | //Config entries for licenses that are civilian
16 | _licensesConfigs = "getText(_x >> 'side') isEqualTo 'civ'" configClasses (missionConfigFile >> "Licenses");
17 |
18 | {
19 | if (LICENSE_VALUE(configName _x,"civ")) then {
20 | _licenses = _licenses + localize getText(_x >> "displayName") + "
";
21 | };
22 | } forEach _licensesConfigs;
23 |
24 | if (_licenses isEqualTo "") then {_licenses = (localize "STR_Cop_NoLicensesFound");};
25 | [profileName,_licenses] remoteExecCall ["life_fnc_licensesRead",_cop];
26 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_licensesRead.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_licensesRead.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Outprints the licenses.
7 | */
8 | params [
9 | ["_civ","",[""]],
10 | ["_licenses",(localize "STR_Cop_NoLicenses"),[""]]
11 | ];
12 |
13 | hint parseText format ["%1
" +(localize "STR_Cop_Licenses")+ "
%2",_civ,_licenses];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_questionDealer.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_questionDealer.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Questions the drug dealer and sets the sellers wanted.
8 | */
9 | private ["_sellers","_crimes","_names"];
10 | _sellers = (_this select 0) getVariable ["sellers",[]];
11 | if (count _sellers isEqualTo 0) exitWith {hint localize "STR_Cop_DealerQuestion"}; //No data.
12 | life_action_inUse = true;
13 | _crimes = LIFE_SETTINGS(getArray,"crimes");
14 |
15 | _names = "";
16 | {
17 | _val = 0;
18 | if ((_x select 2) > 150000) then {
19 | _val = round((_x select 2) / 16);
20 | } else {
21 | _val = ["483",_crimes] call TON_fnc_index;
22 | _val = ((_crimes select _val) select 1);
23 | if (_val isEqualType "") then {
24 | _val = parseNumber _val;
25 | };
26 | };
27 | [(_x select 0),(_x select 1),"483",_val] remoteExecCall ["life_fnc_wantedAdd",RSERV];
28 | _names = _names + format ["%1
",(_x select 1)];
29 | } forEach _sellers;
30 |
31 | hint parseText format [(localize "STR_Cop_DealerMSG")+ "
%1",_names];
32 | (_this select 0) setVariable ["sellers",[],true];
33 | life_action_inUse = false;
34 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_radar.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_radar.sqf
3 | Author: Silly Aussie kid named Jaydon
4 |
5 | Description:
6 | Looks like weird but radar?
7 | */
8 | if !(playerSide isEqualTo west) exitWith {};
9 | private ["_speed","_vehicle"];
10 | _vehicle = cursorObject;
11 | _speed = round speed _vehicle;
12 |
13 | if ((_vehicle isKindOf "Car") && (currentWeapon player) isEqualTo "hgun_P07_snds_F") then {
14 | switch (true) do {
15 | case (_speed > 33 && _speed <= 80): {
16 | hint parseText format ["" +(localize "STR_Cop_Radar")+ "
" +(localize "STR_Cop_VehSpeed"),round _speed];
17 | };
18 |
19 | case (_speed > 80): {
20 | hint parseText format ["" +(localize "STR_Cop_Radar")+ "
" +(localize "STR_Cop_VehSpeed"),round _speed];
21 | };
22 | };
23 | };
24 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_searchClient.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_searchClient.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Searches the player and he returns information back to the player.
8 | */
9 | private ["_inv","_val","_var","_robber"];
10 | params [
11 | ["_cop",objNull,[objNull]]
12 | ];
13 | if (isNull _cop) exitWith {};
14 |
15 | _inv = [];
16 | _robber = false;
17 |
18 | //Illegal items
19 | {
20 | _var = configName(_x);
21 | _val = ITEM_VALUE(_var);
22 | if (_val > 0) then {
23 | _inv pushBack [_var,_val];
24 | [false,_var,_val] call life_fnc_handleInv;
25 | };
26 | } forEach ("getNumber(_x >> 'illegal') isEqualTo 1" configClasses (missionConfigFile >> "VirtualItems"));
27 |
28 | if (!life_use_atm) then {
29 | CASH = 0;
30 | _robber = true;
31 | };
32 |
33 | [player,_inv,_robber] remoteExec ["life_fnc_copSearch",_cop];
34 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_spikeStripEffect.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_spikeStripEffect.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Doesn't work without the server-side effect but shifted part of it clientside
7 | so code can easily be changed. Ultimately it just pops the tires.
8 | */
9 | private ["_vehicle"];
10 | _vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 | if (isNull _vehicle) exitWith {}; //Bad vehicle type
12 |
13 | _vehicle setHitPointDamage["HitLFWheel",1];
14 | _vehicle setHitPointDamage["HitRFWheel",1];
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_ticketGive.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_ticketGive.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Gives a ticket to the targeted player.
8 | */
9 | if (isNil "life_ticket_unit") exitWith {hint localize "STR_Cop_TicketNil"};
10 | if (isNull life_ticket_unit) exitWith {hint localize "STR_Cop_TicketExist"};
11 |
12 | private _val = ctrlText 2652;
13 |
14 | if (!([_val] call TON_fnc_isnumber)) exitWith {hint localize "STR_Cop_TicketNum"};
15 | if ((parseNumber _val) > 200000) exitWith {hint localize "STR_Cop_TicketOver100"};
16 |
17 | [0,"STR_Cop_TicketGive",true,[profileName,[(parseNumber _val)] call life_fnc_numberText,life_ticket_unit getVariable ["realname",name life_ticket_unit]]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
18 | [player,(parseNumber _val)] remoteExec ["life_fnc_ticketPrompt",life_ticket_unit];
19 | closeDialog 0;
20 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_ticketPaid.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_ticketPaid.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Verifies that the ticket was paid.
8 | */
9 | params [
10 | ["_value",5,[0]],
11 | ["_unit",objNull,[objNull]],
12 | ["_cop",objNull,[objNull]]
13 | ];
14 | if (isNull _unit || {!(_unit isEqualTo life_ticket_unit)}) exitWith {}; //NO
15 | if (isNull _cop || {!(_cop isEqualTo player)}) exitWith {}; //Double NO
16 |
17 | BANK = BANK + _value;
18 | [1] call SOCK_fnc_updatePartial;
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_ticketPrompt.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_ticketPrompt
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Prompts the player that he is being ticketed.
8 | */
9 | private ["_cop","_val"];
10 | if (!isNull (findDisplay 2600)) exitWith {}; //Already at the ticket menu, block for abuse?
11 | _cop = _this select 0;
12 | if (isNull _cop) exitWith {};
13 | _val = _this select 1;
14 |
15 | createDialog "life_ticket_pay";
16 | disableSerialization;
17 | waitUntil {!isNull (findDisplay 2600)};
18 |
19 | life_ticket_paid = false;
20 | life_ticket_val = _val;
21 | life_ticket_cop = _cop;
22 | CONTROL(2600,2601) ctrlSetStructuredText parseText format ["" +(localize "STR_Cop_Ticket_GUI_Given"),_cop getVariable ["realname",name _cop],_val];
23 |
24 | [] spawn {
25 | disableSerialization;
26 | waitUntil {life_ticket_paid || (isNull (findDisplay 2600))};
27 | if (isNull (findDisplay 2600) && !life_ticket_paid) then {
28 | [0,"STR_Cop_Ticket_Refuse",true,[profileName]] remoteExecCall ["life_fnc_broadcast",west];
29 | [1,"STR_Cop_Ticket_Refuse",true,[profileName]] remoteExecCall ["life_fnc_broadcast",life_ticket_cop];
30 | };
31 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/cop/fn_wantedGrab.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_wantedGrab.sqf
4 | Author: ColinM
5 |
6 | Description:
7 | Prepare the array to query the crimes.
8 | */
9 | private ["_display","_tab","_criminal"];
10 | disableSerialization;
11 | _display = findDisplay 2400;
12 | _tab = _display displayCtrl 2402;
13 | _criminal = lbData[2401,(lbCurSel 2401)];
14 | _criminal = call compile format ["%1", _criminal];
15 | if (isNil "_criminal") exitWith {};
16 |
17 | if (life_HC_isActive) then {
18 | [player,_criminal] remoteExec ["HC_fnc_wantedCrimes",HC_Life];
19 | } else {
20 | [player,_criminal] remoteExec ["life_fnc_wantedCrimes",RSERV];
21 | };
22 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/fn_initCop.sqf:
--------------------------------------------------------------------------------
1 | #include "..\script_macros.hpp"
2 | /*
3 | File: fn_initCop.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Cop Initialization file.
8 | */
9 | waitUntil {!(isNull (findDisplay 46))};
10 |
11 | if (life_blacklisted) exitWith {
12 | ["Blacklisted",false,true] call BIS_fnc_endMission;
13 | sleep 30;
14 | };
15 |
16 | if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
17 | if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
18 | ["NotWhitelisted",false,true] call BIS_fnc_endMission;
19 | sleep 35;
20 | };
21 | };
22 |
23 |
24 | player setVariable ["rank",(FETCH_CONST(life_coplevel)),true];
25 | [] call life_fnc_spawnMenu;
26 | waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
27 | waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
28 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/fn_initMedic.sqf:
--------------------------------------------------------------------------------
1 | #include "..\script_macros.hpp"
2 | /*
3 | File: fn_initMedic.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Initializes the medic..
8 | */
9 | waitUntil {!(isNull (findDisplay 46))};
10 |
11 | if ((FETCH_CONST(life_medicLevel)) < 1 && (FETCH_CONST(life_adminlevel) isEqualTo 0)) exitWith {
12 | ["Notwhitelisted",false,true] call BIS_fnc_endMission;
13 | sleep 35;
14 | };
15 |
16 | [] call life_fnc_spawnMenu;
17 | waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
18 | waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/fn_setupActions.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_setupActions.sqf
3 | Author:
4 |
5 | Description:
6 | Master addAction file handler for all client-based actions.
7 | */
8 |
9 | life_actions = [];
10 |
11 | switch (playerSide) do {
12 |
13 | //Civilian
14 | case civilian: {
15 | //Drop fishing net
16 | life_actions pushBack (player addAction[localize "STR_pAct_DropFishingNet",life_fnc_dropFishingNet,"",0,false,false,"",'
17 | (surfaceisWater (getPos vehicle player)) && (vehicle player isKindOf "Ship") && life_carryWeight < life_maxWeight && speed (vehicle player) < 2 && speed (vehicle player) > -1 && !life_net_dropped ']);
18 |
19 | //Rob person
20 | life_actions pushBack (player addAction[localize "STR_pAct_RobPerson",life_fnc_robAction,"",0,false,false,"",'
21 | !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated" && !(cursorObject getVariable ["robbed",false]) ']);
22 | };
23 |
24 | //Cops
25 | case west: { };
26 |
27 | //EMS
28 | case independent: { };
29 |
30 | };
31 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/fn_setupEVH.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_setupEVH.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Master eventhandler file
7 | */
8 | player addEventHandler ["Killed", {_this call life_fnc_onPlayerKilled}];
9 | player addEventHandler ["HandleDamage", {_this call life_fnc_handleDamage}];
10 | player addEventHandler ["Respawn", {_this call life_fnc_onPlayerRespawn}];
11 | player addEventHandler ["Take", {_this call life_fnc_onTakeItem}];
12 | player addEventHandler ["Fired", {_this call life_fnc_onFired}];
13 | player addEventHandler ["InventoryClosed", {_this call life_fnc_inventoryClosed}];
14 | player addEventHandler ["InventoryOpened", {_this call life_fnc_inventoryOpened}];
15 | player addEventHandler ["HandleRating", {0}];
16 |
17 | addMissionEventHandler ["Map", {_this call life_fnc_checkMap}];
18 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_animSync.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_animSync.sqf
3 | Author:
4 |
5 | Description:
6 |
7 | */
8 | private ["_unit","_anim"];
9 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | _anim = [_this,1,"",[""]] call BIS_fnc_param;
11 | _cancelOwner = [_this,2,false,[true]] call BIS_fnc_param;
12 | if (isNull _unit || {(local _unit && _cancelOwner)}) exitWith {};
13 | _unit switchMove _anim;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_calWeightDiff.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_calWeightDiff.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Calculates weight differences in the _cWeight (current Weight) against the _mWeight (Max Weight)
8 | Multiple purpose system for this life mission.
9 | */
10 | if !(
11 | params [
12 | ["_item","",[""]],
13 | ["_value",-1,[0]],
14 | ["_cWeight",-1,[0]],
15 | ["_mWeight",-1,[0]]
16 | ]
17 | ) exitWith {-1};
18 |
19 | private _iWeight = [_item] call life_fnc_itemWeight;
20 | if (_iWeight isEqualTo 0) exitWith {_value};
21 |
22 | (floor ((_mWeight - _cWeight) / _iWeight)) min _value;
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_checkMap.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_checkMap.sqf
3 | Author: DomT602
4 | Description:
5 | Checks if the map is being opened or closed, then puts markers according to side.
6 | */
7 |
8 | params [
9 | ["_mapOpen",false,[false]]
10 | ];
11 |
12 | if (_mapOpen) then {
13 | switch playerSide do {
14 | case west: {[] spawn life_fnc_copMarkers};
15 | case independent: {[] spawn life_fnc_medicMarkers};
16 | case civilian: {[] spawn life_fnc_civMarkers};
17 | };
18 |
19 | if (life_markers && {!(life_markers_active)}) then {
20 | [true] spawn life_fnc_adminMarkers;
21 | };
22 |
23 | } else {
24 | life_markers_active = false;
25 | };
26 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_giveDiff.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_giveDiff.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | ??A?SD?ADS?A
8 | */
9 | private ["_unit","_item","_val","_from","_bool"];
10 | _unit = _this select 0;
11 | if !(_unit isEqualTo player) exitWith {};
12 | _item = _this select 1;
13 | _val = _this select 2;
14 | _from = _this select 3;
15 | _bool = if (count _this > 4) then {true} else {false};
16 | _type = M_CONFIG(getText,"VirtualItems",_item,"displayName");
17 |
18 | if (_bool) then {
19 | if ([true,_item,(parseNumber _val)] call life_fnc_handleInv) then {
20 | hint format [localize "STR_MISC_TooMuch",_from getVariable ["realname",name _from],_val,(localize _type)];
21 | };
22 | } else {
23 | if ([true,_item,(parseNumber _val)] call life_fnc_handleInv) then {
24 | hint format [localize "STR_MISC_TooMuch_2",_from getVariable ["realname",name _from],_val,(localize _type)];
25 | };
26 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_hideObj.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_hideObj.sqf
3 |
4 | Author: Daniel Stuart and NiiRoZz
5 |
6 | Description:
7 | Hides an object for all the players
8 |
9 | Usage :
10 | _id = The owner of player
11 | [_object] remoteExecCall ["life_fnc_hideObj",-_id];
12 | */
13 | params [
14 | ["_object",objNull,[objNull]]
15 | ];
16 | if (isNull _object) exitWith {};
17 |
18 | _object hideObject true;
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_hudSetup.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_hudSetup.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Setups the hud for the player?
8 | */
9 | disableSerialization;
10 |
11 | cutRsc ["playerHUD", "PLAIN", 2, false];
12 | [] call life_fnc_hudUpdate;
13 |
14 | [] spawn
15 | {
16 | private ["_dam"];
17 | for "_i" from 0 to 1 step 0 do {
18 | _dam = damage player;
19 | waitUntil {!((damage player) isEqualTo _dam)};
20 | [] call life_fnc_hudUpdate;
21 | };
22 | };
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_hudUpdate.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_hudUpdate.sqf
4 | Author: Daniel Stuart
5 |
6 | Description:
7 | Updates the HUD when it needs to.
8 | */
9 | disableSerialization;
10 |
11 | if (isNull LIFEdisplay) then {[] call life_fnc_hudSetup;};
12 | LIFEctrl(2200) progressSetPosition (life_hunger / 100);
13 | LIFEctrl(2201) progressSetPosition (1 - (damage player));
14 | LIFEctrl(2202) progressSetPosition (life_thirst / 100);
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_isDamaged.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | * File: fn_isDamaged.sqf
3 | * Author: BoGuu
4 | *
5 | * Description:
6 | * Returns true if the target is damaged, else returns false.
7 | */
8 | params [
9 | ["_target",objNull,[objNull]]
10 | ];
11 |
12 | private _damage = selectMax (getAllHitPointsDamage _target select 2);
13 |
14 | (_damage > 0.01);
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_isUIDActive.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_isUIDActive.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Sees if the UID passed to it is in the server.
8 |
9 | Returns:
10 | True if there was a match, false if not in server.
11 | */
12 | private ["_uid","_ret"];
13 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
14 | if (_uid isEqualTo "") exitWith {false}; //Bad UID
15 | _ret = false;
16 | {
17 | if (isPlayer _x && {getPlayerUID _x isEqualTo _uid}) exitWith {_ret = true;};
18 | } forEach playableUnits;
19 |
20 | _ret;
21 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_moveIn.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: moveIn.sqf
3 | Author: Bryan "Tonic" Boardwine
4 | Description:
5 | Set a variable on the player so that he can't get out of a vehicle
6 | */
7 |
8 | life_disable_getIn = false;
9 | player moveInCargo (_this select 0);
10 | life_disable_getOut = true;
11 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_nearATM.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_nearATM.sqf
3 | Author: Bryan "Tonic" Boardwine
4 | Modified : NiiRoZz : for use with new command cursorObject
5 |
6 | Description:
7 | Checks if the player is near an ATM object on the map.
8 |
9 | RETURNS:
10 | 0: BOOL (True for yes, false for no)
11 | */
12 |
13 | private _obj = cursorObject;
14 | private _return = false;
15 |
16 | if ((str(_obj) find "atm_") != -1 && {player distance _obj < 2.3}) then { _return = true; };
17 |
18 | _return;
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_nearUnits.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_nearUnits.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Checks for units near (human units)
7 |
8 | Returns:
9 | true - Units are near
10 | false - No units near
11 | */
12 | private ["_faction","_position","_radius","_ret"];
13 | _faction = [_this,0,sideUnknown,[sideUnknown]] call BIS_fnc_param;
14 | _position = [_this,1,(getPos player),[[]]] call BIS_fnc_param;
15 | _radius = [_this,2,30,[0]] call BIS_fnc_param;
16 | _ret = false;
17 |
18 | //Error check
19 | if (_faction isEqualTo sideUnknown) exitWith {_ret};
20 |
21 | _ret = {!(_x isEqualTo player) && side _x isEqualTo _faction && alive _x && _position distance _x < _radius} count playableUnits > 0;
22 | _ret;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_nearestDoor.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_nearestDoor.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Fetches the nearest door of the building the player is looking
7 | at.
8 | */
9 | private ["_house","_door","_numOfDoors"];
10 | _house = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 | if (isNull _house) exitWith {0};
12 | if (!(_house isKindOf "House_F")) exitWith {0};
13 |
14 | _door = 0;
15 | _doors = getNumber(configFile >> "CfgVehicles" >> (typeOf _house) >> "numberOfDoors");
16 | for "_i" from 1 to _doors do {
17 | _selectionPos = _house selectionPosition format ["Door_%1_trigger",_i];
18 | _worldSpace = _house modelToWorld _selectionPos;
19 | if (player distance _worldSpace < 2.4) exitWith {_door = _i};
20 | };
21 |
22 | _door;
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_numberText.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_numberText.sqf
3 | Author: Karel Moricky
4 |
5 | Description:
6 | Convert a number into string (avoiding scientific notation)
7 |
8 | Parameter(s):
9 | _this: NUMBER
10 |
11 | Returns:
12 | STRING
13 | */
14 | private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
15 |
16 | _number = [_this,0,0,[0]] call bis_fnc_param;
17 | _mod = [_this,1,3,[0]] call bis_fnc_param;
18 |
19 | _digits = _number call bis_fnc_numberDigits;
20 | _digitsCount = count _digits - 1;
21 |
22 | _modBase = _digitsCount % _mod;
23 | _numberText = "";
24 | {
25 | _numberText = _numberText + str _x;
26 | if ((_foreachindex - _modBase) % (_mod) isEqualTo 0 && !(_foreachindex isEqualTo _digitsCount)) then {_numberText = _numberText + ",";};
27 | } forEach _digits;
28 | _numberText
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_onFired.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_onFired.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Handles various different ammo types being fired.
8 | */
9 | private ["_ammoType","_projectile"];
10 | _ammoType = _this select 4;
11 | _projectile = _this select 6;
12 |
13 | if (_ammoType isEqualTo "GrenadeHand_stone") then {
14 | _projectile spawn {
15 | private "_position";
16 | while {!isNull _this} do {
17 | _position = ASLtoATL (visiblePositionASL _this);
18 | sleep 0.1;
19 | };
20 | [_position] remoteExec ["life_fnc_flashbang",RCLIENT];
21 | };
22 | };
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_pullOutVeh.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_pullOutVeh.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 |
7 | */
8 | if (playerSide isEqualTo west || (isNull objectParent player)) exitWith {};
9 | if (player getVariable "restrained") then {
10 | detach player;
11 | player setVariable ["Escorting",false,true];
12 | player setVariable ["transporting",false,true];
13 | life_disable_getOut = false;
14 | player action ["Eject", vehicle player];
15 | titleText[localize "STR_NOTF_PulledOut","PLAIN"];
16 | titleFadeOut 4;
17 | life_disable_getIn = true;
18 | } else {
19 | player action ["Eject", vehicle player];
20 | titleText[localize "STR_NOTF_PulledOut","PLAIN"];
21 | titleFadeOut 4;
22 | };
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_receiveMoney.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_receiveMoney.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Receives money
8 | */
9 |
10 | params [
11 | ["_unit",objNull,[objNull]],
12 | ["_val","",[""]],
13 | ["_from",objNull,[objNull]]
14 | ];
15 |
16 | if (isNull _unit || isNull _from || _val isEqualTo "") exitWith {};
17 | if !(player isEqualTo _unit) exitWith {};
18 | if (!([_val] call TON_fnc_isnumber)) exitWith {};
19 | if (_unit == _from) exitWith {}; //Bad boy, trying to exploit his way to riches.
20 |
21 | hint format [localize "STR_NOTF_GivenMoney",_from getVariable ["realname",name _from],[(parseNumber (_val))] call life_fnc_numberText];
22 | CASH = CASH + parseNumber(_val);
23 | [0] call SOCK_fnc_updatePartial;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_revealObjects.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_revealObjects.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Reveals nearest objects within 15 automatically to help with picking
7 | up various static objects on the ground such as money, water, etc.
8 |
9 | Can be taxing on low-end systems or AMD CPU users.
10 | */
11 | if (!life_settings_revealObjects) exitWith {};
12 |
13 | private _objects = nearestObjects[visiblePositionASL player, ["Land_CargoBox_V1_F","Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Money_F","Land_Suitcase_F","CAManBase"], 15];
14 | {
15 | player reveal _x;
16 | (group player) reveal _x;
17 | } forEach _objects;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_simDisable.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_simDisable.sqf
3 | Author:
4 |
5 | Description:
6 |
7 | */
8 | private ["_obj","_bool"];
9 | _obj = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | _bool = [_this,1,false,[false]] call BIS_fnc_param;
11 | if (isNull _obj) exitWith {};
12 |
13 | _obj enableSimulation _bool;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_stripDownPlayer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_stripDownPlayer.sqf
3 | Author: Tobias 'Xetoxyc' Sittenauer
4 |
5 | Description: Strip the player down
6 | */
7 | removeAllWeapons player;
8 | {player removeMagazine _x;} forEach (magazines player);
9 | removeUniform player;
10 | removeVest player;
11 | removeBackpack player;
12 | removeGoggles player;
13 | removeHeadGear player;
14 |
15 | {
16 | player unassignItem _x;
17 | player removeItem _x;
18 | } forEach (assignedItems player);
19 |
20 | if (hmd player != "") then {
21 | player unlinkItem (hmd player);
22 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/fn_teleport.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_teleport.sqf
3 | Author: ColinM9991
4 | Credits: To original script author(s)
5 | Description:
6 | Teleport to chosen position.
7 | */
8 | private ["_pos"];
9 | _pos = [_this select 0, _this select 1, _this select 2];
10 | (vehicle player) setPos [_pos select 0, _pos select 1, 0];
11 | onMapSingleClick "";
12 | openMap [false, false];
13 | hint localize "STR_NOTF_Teleport";
14 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/network/fn_corpse.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_corpse.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Hides dead bodies.
7 | */
8 | private ["_corpse"];
9 | _corpse = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _corpse) exitWith {};
11 | if (alive _corpse) exitWith {}; //Stop script kiddies.
12 |
13 | deleteVehicle _corpse;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/network/fn_jumpFnc.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_jumpFnc.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Makes the target jump.
7 | */
8 | private ["_unit","_vel","_dir","_v1","_v2","_anim","_oldpos"];
9 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | _oldpos = getPosATL _unit;
11 |
12 | if (isNull _unit) exitWith {}; //Bad data
13 |
14 | if (animationState _unit == "AovrPercMrunSrasWrflDf") exitWith {};
15 |
16 | if (local _unit) then {
17 | _v1 = 3.82;
18 | _v2 = .4;
19 | _dir = direction player;
20 | _vel = velocity _unit;
21 | _unit setVelocity[(_vel select 0)+(sin _dir*_v2),(_vel select 1)+(cos _dir*_v2),(_vel select 2)+_v1];
22 | };
23 |
24 | _anim = animationState _unit;
25 | _unit switchMove "AovrPercMrunSrasWrflDf";
26 |
27 | if (local _unit) then {
28 | waitUntil {
29 | if ((getPos _unit select 2) > 4) then {
30 | _unit setposATL _oldpos;
31 | _unit setVelocity [0, 0, 0];
32 | };
33 | animationState _unit != "AovrPercMrunSrasWrflDf"
34 | };
35 | _unit switchMove _anim;
36 | };
37 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/network/fn_say3D.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_say3D.sqf
3 | Author: Bryan "Tonic" Boardwine
4 | Modified by: blackfisch
5 |
6 | Description:
7 | Pass your sounds that you want everyone nearby to hear through here.
8 |
9 | Example: [_veh,"unlock",50,1] remoteExec ["life_fnc_say3D",0];
10 | */
11 | params [
12 | ["_object",objNull,[objNull]],
13 | ["_sound","",[""]],
14 | ["_distance",100,[0]],
15 | ["_pitch",1,[0]]
16 | ];
17 |
18 | if (isNull _object || {_sound isEqualTo ""}) exitWith {};
19 | if (_distance < 0) then {_distance = 100};
20 | _object say3D [_sound,_distance,_pitch];
21 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/network/fn_setFuel.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_setFuel.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description: Used to set fuel levels in vehicles. (Ex. Service Chopper)
6 | */
7 | (_this select 0) setFuel (_this select 1);
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/functions/network/fn_soundDevice.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_soundDevice.sqf
3 | Author:
4 |
5 | Description:
6 | Plays a device sound for mining (Mainly Tempest device).
7 | */
8 | if (isNull _this) exitWith {};
9 | if (player distance _this > 2500) exitWith {}; //Don't run it... They're to far out..
10 |
11 | for "_i" from 0 to 1 step 0 do {
12 | if (isNull _this || !alive _this) exitWith {};
13 | if (isNil {_this getVariable "mining"}) exitWith {};
14 | _this say3D ["Device_disassembled_loop",150,1];
15 | sleep 28.6;
16 | };
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/gangs/fn_gangCreated.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_gangCreated.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Tells the player that the gang is created and throws him into it.
8 | */
9 | private "_group";
10 | life_action_gangInUse = nil;
11 |
12 | if (BANK < (LIFE_SETTINGS(getNumber,"gang_price"))) exitWith {
13 | hint format [localize "STR_GNOTF_NotEnoughMoney",[((LIFE_SETTINGS(getNumber,"gang_price"))-BANK)] call life_fnc_numberText];
14 | {group player setVariable [_x,nil,true];} forEach ["gang_id","gang_owner","gang_name","gang_members","gang_maxmembers","gang_bank"];
15 | };
16 |
17 | BANK = BANK - LIFE_SETTINGS(getNumber,"gang_price");
18 | [1] call SOCK_fnc_updatePartial;
19 |
20 | hint format [localize "STR_GNOTF_CreateSuccess",(group player) getVariable "gang_name",[(LIFE_SETTINGS(getNumber,"gang_price"))] call life_fnc_numberText];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/gangs/fn_gangDisband.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_gangDisband.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Prompts the user about disbanding the gang and if the user accepts the gang will be
8 | disbanded and removed from the database.
9 | */
10 | private "_action";
11 | _action = [
12 | localize "STR_GNOTF_DisbandWarn",
13 | localize "STR_Gang_Disband_Gang",
14 | localize "STR_Global_Yes",
15 | localize "STR_Global_No"
16 | ] call BIS_fnc_guiMessage;
17 |
18 | if (_action) then {
19 | hint localize "STR_GNOTF_DisbandGangPro";
20 |
21 | if (life_HC_isActive) then {
22 | [group player] remoteExec ["HC_fnc_removeGang",HC_Life];
23 | } else {
24 | [group player] remoteExec ["TON_fnc_removeGang",RSERV];
25 | };
26 |
27 | } else {
28 | hint localize "STR_GNOTF_DisbandGangCanc";
29 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/gangs/fn_gangDisbanded.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_gangDisbanded.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Notifies members that the gang has been disbanded.
7 | */
8 | private "_group";
9 | _group = param [0,grpNull,[grpNull]];
10 | if (isNull _group) exitWith {}; //Fail horn please.
11 | if (!isNull (findDisplay 2620)) then {closeDialog 2620};
12 |
13 | hint localize "STR_GNOTF_DisbandWarn_2";
14 | [player] joinSilent (createGroup civilian);
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/gangs/fn_gangKick.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_gangKick.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Kicks a player from your gang.
8 | */
9 | private ["_unit","_unitID","_members"];
10 | disableSerialization;
11 |
12 | if ((lbCurSel 2621) isEqualTo -1) exitWith {hint localize "STR_GNOTF_SelectKick"};
13 | _unit = call compile format ["%1",CONTROL_DATA(2621)];
14 |
15 | if (isNull _unit) exitWith {}; //Bad unit?
16 | if (_unit == player) exitWith {hint localize "STR_GNOTF_KickSelf"};
17 |
18 | _unitID = getPlayerUID _unit;
19 | _members = group player getVariable "gang_members";
20 | if (isNil "_members") exitWith {};
21 | if (!(_members isEqualType [])) exitWith {};
22 |
23 | _members = _members - [_unitID];
24 | group player setVariable ["gang_members",_members,true];
25 |
26 | [_unit,group player] remoteExec ["TON_fnc_clientGangKick",_unit]; //Boot that bitch!
27 |
28 | if (life_HC_isActive) then {
29 | [4,group player] remoteExec ["HC_fnc_updateGang",HC_Life]; //Update the database.
30 | } else {
31 | [4,group player] remoteExec ["TON_fnc_updateGang",RSERV]; //Update the database.
32 | };
33 |
34 | [] call life_fnc_gangMenu;
35 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/gangs/fn_gangLeave.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_gangLeave.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | 32 hours later...
8 | */
9 | private ["_unitID ","_members"];
10 | if (getPlayerUID player isEqualTo (group player getVariable "gang_owner")) exitWith {hint localize "STR_GNOTF_LeaderLeave"};
11 |
12 | _unitID = getPlayerUID player;
13 | _members = group player getVariable "gang_members";
14 | if (isNil "_members") exitWith {};
15 | if (!(_members isEqualType [])) exitWith {};
16 |
17 | _members = _members - [_unitID];
18 | group player setVariable ["gang_members",_members,true];
19 |
20 | [player,group player] remoteExec ["TON_fnc_clientGangLeft",player];
21 |
22 | if (life_HC_isActive) then {
23 | [4,group player] remoteExec ["HC_fnc_updateGang",HC_Life]; //Update the database.
24 | } else {
25 | [4,group player] remoteExec ["TON_fnc_updateGang",RSERV]; //Update the database.
26 | };
27 |
28 | closeDialog 0;
29 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_copHouseOwner.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_copHouseOwner.sqf
3 | Author:
4 |
5 | Description:
6 | Displays the house owner
7 | */
8 | private ["_house"];
9 | _house = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _house || !(_house isKindOf "House_F")) exitWith {};
11 | if (isNil {(_house getVariable "house_owner")}) exitWith {hint localize "STR_House_Raid_NoOwner"};
12 | hint parseText format ["" +(localize "STR_House_Raid_Owner")+ "
%1",(_house getVariable "house_owner") select 1];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_garageRefund.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_garageRefund.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | I don't know?
8 | */
9 | _price = _this select 0;
10 | _unit = _this select 1;
11 | if !(_unit isEqualTo player) exitWith {};
12 | BANK = BANK + _price;
13 | [1] call SOCK_fnc_updatePartial;
14 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_initHouses.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_initHouses.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Initializes the players houses, mainly throwing down markers.
7 | */
8 | if (life_houses isEqualTo []) exitWith {}; //Nothing to do.
9 |
10 | {
11 | _position = call compile format ["%1",_x select 0];
12 | _house = nearestObject [_position, "House"];
13 | _house setVariable ["uid",round(random 99999),true];
14 | _houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
15 |
16 | _marker = createMarkerLocal [format ["house_%1",(_house getVariable "uid")],_position];
17 | _marker setMarkerTextLocal _houseName;
18 | _marker setMarkerColorLocal "ColorBlue";
19 | _marker setMarkerTypeLocal "loc_Lighthouse";
20 |
21 | } forEach life_houses;
22 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_lightHouseAction.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_lightHouseAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Lights up the house.
8 | */
9 | private "_house";
10 | _house = param [0,objNull,[objNull]];
11 | if (isNull _house) exitWith {};
12 | if (!(_house isKindOf "House_F")) exitWith {};
13 |
14 | if (isNull (_house getVariable ["lightSource",objNull])) then {
15 | [_house,true] remoteExecCall ["life_fnc_lightHouse",RCLIENT];
16 | } else {
17 | [_house,false] remoteExecCall ["life_fnc_lightHouse",RCLIENT];
18 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_lockHouse.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_lockHouse.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Unlocks / locks the house.
8 | */
9 | private ["_house"];
10 | _house = param [0,objNull,[objNull]];
11 | if (isNull _house || !(_house isKindOf "House_F")) exitWith {};
12 |
13 | _state = _house getVariable ["locked",true];
14 | if (_state) then {
15 | _house setVariable ["locked",false,true];
16 | titleText[localize "STR_House_StorageUnlock","PLAIN"];
17 | } else {
18 | _house setVariable ["locked",true,true];
19 | titleText[localize "STR_House_StorageLock","PLAIN"];
20 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/housing/fn_lockupHouse.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_lockupHouse.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Locks up the entire house and closes all doors.
8 | */
9 | private ["_house"];
10 | _house = param [0,objNull,[objNull]];
11 | if (isNull _house || !(_house isKindOf "House_F")) exitWith {};
12 |
13 | _numberOfDoors = FETCH_CONFIG2(getNumber,"CfgVehicles",(typeOf _house), "numberOfDoors");
14 |
15 | if (_numberOfDoors isEqualTo -1 || _numberOfDoors isEqualTo 0) exitWith {}; //MEH
16 |
17 | titleText [localize "STR_House_LockingUp","PLAIN"];
18 | sleep 3;
19 |
20 | for "_i" from 1 to _numberOfDoors do {
21 | _house animateSource [format ["Door_%1_source", _i], 0];
22 | _house setVariable [format ["bis_disabled_Door_%1",_i],1,true];
23 | };
24 |
25 | _house setVariable ["locked",true,true];
26 | titleText[localize "STR_House_LockedUp","PLAIN"];
27 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/items/fn_placestorage.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File : fn_placestorage.sqf
4 | Author: NiiRoZz
5 |
6 | Description:
7 | PLace container were player select with preview
8 |
9 | */
10 | private ["_container","_isFloating"];
11 |
12 | if (!life_container_active) exitWith {};
13 | if (life_container_activeObj isEqualTo objNull) exitWith {};
14 | if (!((typeOf life_container_activeObj) in ["B_supplyCrate_F","Box_IND_Grenades_F"])) exitWith {};
15 |
16 | _container = life_container_activeObj;
17 | _isFloating = if (((getPos _container) select 2) < 0.1) then {false} else {true};
18 | detach _container;
19 | [_container,true] remoteExecCall ["life_fnc_simDisable",RANY];
20 | _container setPosATL [getPosATL _container select 0, getPosATL _container select 1, (getPosATL _container select 2) + 0.7];
21 | _container allowDamage false;
22 | _container enableRopeAttach false;
23 |
24 | if ((typeOf _container) == "B_supplyCrate_F") then {
25 | [false,"storagebig",1] call life_fnc_handleInv;
26 | } else {
27 | [false,"storagesmall",1] call life_fnc_handleInv;
28 | };
29 |
30 | [_container, _isFloating] call life_fnc_placeContainer;
31 | life_container_active = false;
32 | life_container_activeObj = objNull;
33 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/items/fn_storageBox.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File : fn_storageBox.sqf
4 | Author: NiiRoZz
5 |
6 | Description:
7 | Create Storage and attachto player;
8 | */
9 | private ["_object","_attachPos"];
10 | params [
11 | ["_size",false,[false]]
12 | ];
13 | if (!(nearestObject [player, "House"] in life_vehicles)) exitWith {hint localize "STR_ISTR_Box_NotinHouse";};
14 |
15 | life_container_active = true;
16 | closeDialog 0;
17 |
18 | if (_size) then {
19 | _object = "B_supplyCrate_F" createVehicle [0,0,0];
20 | } else {
21 | _object = "Box_IND_Grenades_F" createVehicle [0,0,0];
22 | };
23 |
24 | life_container_activeObj = _object;
25 | _attachPos = [0.16, 3, ((boundingBoxReal _object) select 1) select 2];
26 | [_object] remoteExecCall ["life_fnc_simDisable",RANY];
27 | _object attachTo[player, _attachPos];
28 |
29 | clearWeaponCargoGlobal _object;
30 | clearMagazineCargoGlobal _object;
31 | clearItemCargoGlobal _object;
32 | clearBackpackCargoGlobal _object;
33 |
34 | titleText [localize "STR_NOTF_PlaceContainer", "PLAIN"];
35 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_deathScreen.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_deathScreen.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Handles stuff being displayed on the death screen while
7 | it is currently active.
8 | */
9 | private ["_medicsOnline","_medicsNear"];
10 | disableSerialization;
11 |
12 | _medicsOnline = ((findDisplay 7300) displayCtrl 7304);
13 | _medicsNear = ((findDisplay 7300) displayCtrl 7305);
14 |
15 | waitUntil {
16 | _nearby = if (([independent,getPosATL player,120] call life_fnc_nearUnits)) then {"Yes"} else {"No"};
17 | _medicsOnline ctrlSetText format [localize "STR_Medic_Online",independent countSide playableUnits];
18 | _medicsNear ctrlSetText format [localize "STR_Medic_Near",_nearby];
19 | sleep 1;
20 | (isNull (findDisplay 7300))
21 | };
22 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_medicRequest.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_medicRequest.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Notifies the medics that someone has requested emergency and prompts them
7 | if they want to take the request or not.
8 | */
9 | params [
10 | ["_caller",objNull,[objNull]],
11 | ["_callerName","Unknown Player",[""]]
12 | ];
13 |
14 | if (isNull _caller) exitWith {}; //Bad data
15 |
16 | ["MedicalRequestEmerg",[format [localize "STR_Medic_Request",_callerName]]] call BIS_fnc_showNotification;
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_medicSiren.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_medicSiren.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the medic siren sound for other players.
8 | */
9 | private ["_vehicle"];
10 | _vehicle = param [0,objNull,[objNull]];
11 |
12 | if (isNull _vehicle) exitWith {};
13 | if (isNil {_vehicle getVariable "siren"}) exitWith {};
14 |
15 | for "_i" from 0 to 1 step 0 do {
16 | if (!(_vehicle getVariable "siren")) exitWith {};
17 | if (count crew _vehicle isEqualTo 0) then {_vehicle setVariable ["siren",false,true]};
18 | if (!alive _vehicle) exitWith {};
19 | if (isNull _vehicle) exitWith {};
20 | _vehicle say3D ["medicSiren",500,1]; //Class name specified in description.ext, max distance & pitch
21 | sleep 4.275;//Exactly matches the length of the audio file.
22 | if (!(_vehicle getVariable "siren")) exitWith {};
23 | };
24 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_medicSirenLights.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_sirenLights.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Lets play a game! Can you guess what it does? I have faith in you, if you can't
8 | then you have failed me and therefor I lose all faith in humanity.. No pressure.
9 | */
10 | params [
11 | ["_vehicle",objNull,[objNull]]
12 | ];
13 | if (isNull _vehicle) exitWith {}; //Bad entry!
14 | if !(typeOf _vehicle in ["C_Offroad_01_F"]) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
15 |
16 | private _trueorfalse = _vehicle getVariable ["lights",false];
17 |
18 | if (_trueorfalse) then {
19 | _vehicle setVariable ["lights",false,true];
20 | if !(isNil {(_vehicle getVariable "lightsJIP")}) then {
21 | private _jip = _vehicle getVariable "lightsJIP";
22 | _vehicle setVariable ["lightsJIP",nil,true];
23 | remoteExec ["",_jip]; //remove from JIP queue
24 | };
25 | } else {
26 | _vehicle setVariable ["lights",true,true];
27 | private _jip = [_vehicle,0.22] remoteExec ["life_fnc_medicLights",RCLIENT,true];
28 | _vehicle setVariable ["lightsJIP",_jip,true];
29 | };
30 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_onPlayerRespawn.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_onPlayerRespawn.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Does something but I won't know till I write it...
8 | */
9 | private ["_unit","_corpse","_containers"];
10 | _unit = _this select 0;
11 | _corpse = _this select 1;
12 | life_corpse = _corpse;
13 |
14 | //Set some vars on our new body.
15 | _unit setVariable ["restrained",false,true];
16 | _unit setVariable ["Escorting",false,true];
17 | _unit setVariable ["transporting",false,true];
18 | _unit setVariable ["playerSurrender",false,true];
19 | _unit setVariable ["steam64id",getPlayerUID player,true]; //Reset the UID.
20 | _unit setVariable ["realname",profileName,true]; //Reset the players name.
21 |
22 | player playMoveNow "AmovPpneMstpSrasWrflDnon";
23 |
24 | [] call life_fnc_setupActions;
25 | [_unit,life_settings_enableSidechannel,playerSide] remoteExecCall ["TON_fnc_manageSC",RSERV];
26 | if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;};
27 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/medical/fn_requestMedic.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_requestMedic.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | N/A
8 | */
9 | private "_medicsOnline";
10 | _medicsOnline = {!(_x isEqualTo player) && {side _x isEqualTo independent} && {alive _x}} count playableUnits > 0; //Check if medics (indep) are in the room.
11 |
12 | life_corpse setVariable ["Revive",false,true]; //Set the corpse to a revivable state.
13 | if (_medicsOnline) then {
14 | //There is medics let's send them the request.
15 | [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",independent];
16 | } else {
17 | //No medics were online, send it to the police.
18 | [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",west];
19 | };
20 |
21 | //Create a thread to monitor duration since last request (prevent spammage).
22 | [] spawn {
23 | ((findDisplay 7300) displayCtrl 7303) ctrlEnable false;
24 | sleep (2 * 60);
25 | ((findDisplay 7300) displayCtrl 7303) ctrlEnable true;
26 | };
27 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_cellphone.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_cellphone.sqf
4 | Author: Alan
5 |
6 | Description:
7 | Opens the cellphone menu?
8 | */
9 | private ["_display","_units","_type"];
10 |
11 | disableSerialization;
12 | waitUntil {!isNull findDisplay 3000};
13 | _display = findDisplay 3000;
14 | _units = _display displayCtrl 3004;
15 |
16 | ctrlSetText [3003, ""];
17 | lbClear _units;
18 |
19 | if (FETCH_CONST(life_adminlevel) < 1) then {
20 | ctrlShow[3020,false];
21 | ctrlShow[3021,false];
22 | };
23 | {
24 | if (alive _x && !(_x isEqualTo player)) then {
25 | _type = switch (side _x) do {
26 | case west: {"Cop"};
27 | case civilian: {"Civ"};
28 | case independent: {"Med"};
29 | };
30 | _units lbAdd format ["%1 (%2)",_x getVariable ["realname",name _x],_type];
31 | _units lbSetData [(lbSize _units)-1,str(_x)];
32 | };
33 | } forEach playableUnits;
34 |
35 | lbSetCurSel [3004,0];
36 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_p_openMenu.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_p_openMenu.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Opens the players virtual inventory menu
8 | */
9 | if (!alive player || dialog) exitWith {}; //Prevent them from opening this for exploits while dead.
10 | createDialog "playerSettings";
11 | disableSerialization;
12 |
13 | switch (playerSide) do {
14 | case west: {
15 | ctrlShow[2011,false];
16 | };
17 |
18 | case civilian: {
19 | ctrlShow[2012,false];
20 | };
21 |
22 | case independent: {
23 | ctrlShow[2012,false];
24 | ctrlShow[2011,false];
25 | };
26 | };
27 |
28 | if (FETCH_CONST(life_adminlevel) < 1) then {
29 | ctrlShow[2021,false];
30 | };
31 |
32 | [] call life_fnc_p_updateMenu;
33 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_pardon.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_pardon.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Pardons the selected player.
8 | */
9 | private ["_display","_list"];
10 | disableSerialization;
11 | if !(playerSide isEqualTo west) exitWith {};
12 |
13 | _display = findDisplay 2400;
14 | _list = _display displayCtrl 2402;
15 | _data = lbData[2401,(lbCurSel 2401)];
16 | _data = call compile format ["%1", _data];
17 | if (isNil "_data") exitWith {};
18 | if (!(_data isEqualType [])) exitWith {};
19 | if (_data isEqualTo []) exitWith {};
20 |
21 | if (life_HC_isActive) then {
22 | [(_data select 0)] remoteExecCall ["HC_fnc_wantedRemove",HC_Life];
23 | } else {
24 | [(_data select 0)] remoteExecCall ["life_fnc_wantedRemove",RSERV];
25 | };
26 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_removeItem.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_removeItem.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Removes the selected item & amount to remove from the players
8 | virtual inventory.
9 | */
10 | private ["_data","_value","_obj"];
11 | disableSerialization;
12 | _data = lbData[2005,(lbCurSel 2005)];
13 | _value = ctrlText 2010;
14 |
15 | if (_data isEqualTo "") exitWith {hint localize "STR_NOTF_didNotSelectToRemove";};
16 | if (!([_value] call TON_fnc_isnumber)) exitWith {hint localize "STR_NOTF_notNumberFormat";};
17 | if (parseNumber(_value) <= 0) exitWith {hint localize "STR_NOTF_enterAmountRemove";};
18 | if (ITEM_ILLEGAL(_data) isEqualTo 1 && ([west,visiblePosition player,100] call life_fnc_nearUnits)) exitWith {titleText[localize "STR_NOTF_illegalItemCannotDispose","PLAIN"]};
19 | if !(isNull objectParent player) exitWith {titleText[localize "STR_NOTF_cannotRemoveInVeh","PLAIN"]};
20 | if (!([false,_data,(parseNumber _value)] call life_fnc_handleInv)) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
21 |
22 | hint format [localize "STR_NOTF_removedFromInventory",(parseNumber _value),(localize ITEM_NAME(_data))];
23 |
24 | [] call life_fnc_p_updateMenu;
25 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_updateViewDistance.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_updateViewDistance.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Updates the view distance dependant on whether the player is on foot, a car or an aircraft.
7 | */
8 | switch (true) do
9 | {
10 | case ((vehicle player) isKindOf "CAManBase"): {setViewDistance life_settings_viewDistanceFoot};
11 | case ((vehicle player) isKindOf "LandVehicle"): {setViewDistance life_settings_viewDistanceCar};
12 | case ((vehicle player) isKindOf "Ship"): {setViewDistance life_settings_viewDistanceCar};
13 | case ((vehicle player) isKindOf "Air"): {setViewDistance life_settings_viewDistanceAir};
14 | };
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_wantedAddP.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_wantedAddP.sqf
4 | Author:
5 |
6 | Description:
7 |
8 | */
9 | if !(playerSide isEqualTo west) exitWith {hint localize "STR_Cop_wantedList_notCop";};
10 | if ((lbCurSel 2406) isEqualTo -1) exitWith {hint localize "STR_Cop_wantedList_noPlayerSelected";};
11 | if ((lbCurSel 2407) isEqualTo -1) exitWith {hint localize "STR_Cop_wantedList_noCrimeSelected";};
12 | private _unit = lbData [2406,lbCurSel 2406];
13 | _unit = call compile format ["%1",_unit];
14 | private _amount = lbData [2407,lbCurSel 2407];
15 | if (isNil "_unit") exitWith {};
16 | if (isNull _unit) exitWith {};
17 |
18 | [1,"STR_Wanted_AddP",true,[_unit getVariable ["realname",name _unit],_amount,getPlayerUID _unit]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
19 |
20 | if (life_HC_isActive) then {
21 | [getPlayerUID _unit,_unit getVariable ["realname",name _unit],_amount] remoteExecCall ["HC_fnc_wantedAdd",HC_Life];
22 | } else {
23 | [getPlayerUID _unit,_unit getVariable ["realname",name _unit],_amount] remoteExecCall ["life_fnc_wantedAdd",RSERV];
24 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_wantedInfo.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedInfo.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Pulls back information about the wanted criminal.
7 | */
8 | disableSerialization;
9 |
10 | private _data = param [0,[],[[]]];
11 | private _display = findDisplay 2400;
12 | private _list = _display displayCtrl 2402;
13 | private _mylist = [];
14 |
15 | if (isNil "_data") exitWith {hint localize "STR_Cop_wantedList_FailedToFetch";};
16 | if !(_data isEqualType []) exitWith {hint localize "STR_Cop_wantedList_FailedToFetch";};
17 | if (_data isEqualTo []) exitWith {hint localize "STR_Cop_wantedList_FailedToFetch";};
18 |
19 | lbClear _list;
20 |
21 | private _crimes = _data select 0;
22 |
23 | {
24 | _crime = _x;
25 | if !(_crime in _mylist) then {
26 | _mylist pushBack _crime;
27 | _list lbAdd format [localize "STR_Wanted_Count",{_x == _crime} count _crimes,localize _crime];
28 | };
29 | } forEach _crimes;
30 |
31 | ctrlSetText[2403,format [localize "STR_Wanted_Bounty",[(_data select 1)] call life_fnc_numberText]];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/pmenu/fn_wantedList.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright © 2013 Bryan "Tonic" Boardwine, All rights reserved
3 | See http://armafiles.info/life/list.txt for servers that are permitted to use this code.
4 | File: fn_wantedList.sqf
5 | Author: Bryan "Tonic" Boardwine"
6 |
7 | Description:
8 | Displays wanted list information sent from the server.
9 | */
10 | disableSerialization;
11 |
12 | private _info = param [0,[],[[]]];
13 | private _display = findDisplay 2400;
14 | private _list = _display displayCtrl 2401;
15 |
16 | {
17 | private _entry = _x;
18 | _list lbAdd format ["%1", _entry select 1];
19 | _list lbSetData [(lbSize _list)-1,str(_entry)];
20 | } forEach _info;
21 |
22 | ctrlSetText[2404,"Connection Established"];
23 |
24 | if (((lbSize _list)-1) isEqualTo -1) then {
25 | _list lbAdd "No criminals";
26 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/session/fn_dataQuery.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_dataQuery.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Starts the 'authentication' process and sends a request out to
8 | the server to check for player information.
9 | */
10 | private ["_uid","_side","_sender"];
11 | if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
12 | _sender = player;
13 | _uid = getPlayerUID _sender;
14 | _side = playerSide;
15 | cutText[format [localize "STR_Session_Query",_uid],"BLACK FADED"];
16 | 0 cutFadeOut 999999999;
17 |
18 | if (life_HC_isActive) then {
19 | [_uid,_side,_sender] remoteExec ["HC_fnc_queryRequest",HC_Life];
20 | } else {
21 | [_uid,_side,_sender] remoteExec ["DB_fnc_queryRequest",RSERV];
22 | };
23 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/session/fn_insertPlayerInfo.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_insertPlayerInfo.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Upon first join inital player data is sent to the server and added to the database.
8 | Setup data gets sent to life_server\Functions\MySQL\fn_insertRequest.sqf
9 | */
10 | if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
11 | cutText[localize "STR_Session_QueryFail","BLACK FADED"];
12 | 0 cutFadeOut 9999999;
13 | private ["_bank"];
14 |
15 | switch (playerSide) do {
16 | case west: {
17 | _bank = LIFE_SETTINGS(getNumber,"bank_cop");
18 | };
19 | case civilian: {
20 | _bank = LIFE_SETTINGS(getNumber,"bank_civ");
21 | };
22 | case independent: {
23 | _bank = LIFE_SETTINGS(getNumber,"bank_med");
24 | };
25 | };
26 |
27 | if (life_HC_isActive) then {
28 | [getPlayerUID player,profileName,CASH,_bank,player] remoteExecCall ["HC_fnc_insertRequest",HC_Life];
29 | } else {
30 | [getPlayerUID player,profileName,CASH,_bank,player] remoteExecCall ["DB_fnc_insertRequest",RSERV];
31 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/session/fn_syncData.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_syncData.sqf
4 | Author: Bryan "Tonic" Boardwine"
5 |
6 | Description:
7 | Used for player manual sync to the server.
8 | */
9 | _fnc_scriptName = "Player Synchronization";
10 | if (isNil "life_session_time") then {life_session_time = false;};
11 | if (life_session_time) exitWith {hint localize "STR_Session_SyncdAlready";};
12 |
13 | [] call SOCK_fnc_updateRequest;
14 | hint localize "STR_Session_SyncData";
15 | [] spawn {
16 | life_session_time = true;
17 | sleep (5 * 60);
18 | life_session_time = false;
19 | };
20 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_buyClothes.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_buyClothes.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Buys the current set of clothes and closes out of the shop interface.
8 | */
9 | private ["_price"];
10 | if ((lbCurSel 3101) isEqualTo -1) exitWith {titleText[localize "STR_Shop_NoClothes","PLAIN"];};
11 |
12 | _price = 0;
13 | {
14 | if (!(_x isEqualTo -1)) then {
15 | _price = _price + _x;
16 | };
17 | } forEach life_clothing_purchase;
18 |
19 | if (_price > CASH) exitWith {titleText[localize "STR_Shop_NotEnoughClothes","PLAIN"];};
20 | CASH = CASH - _price;
21 | [0] call SOCK_fnc_updatePartial;
22 |
23 | life_clothesPurchased = true;
24 | [] call life_fnc_playerSkins;
25 | closeDialog 0;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_chopShopSelection.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_chopShopSelection.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Displays the pricing for the currently selected vehicle.
7 | */
8 | params [
9 | ["_control",controlNull,[controlNull]],
10 | ["_selection",-1,[0]]
11 | ];
12 |
13 | //Error checks
14 | if (isNull _control || _selection isEqualTo -1) exitWith {};
15 |
16 | private _price = _control lbValue _selection;
17 |
18 | private _priceTag = ((findDisplay 39400) displayCtrl 39401);
19 | _priceTag ctrlSetStructuredText parseText format ["" +(localize "STR_GNOTF_Price")+ "$%1",[(_price)] call life_fnc_numberText];
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_chopShopSold.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_chopShopSold.sqf
4 | Author: Casperento
5 |
6 | Description:
7 | Finish chopshop sell process properly
8 | */
9 | params [
10 | ["_price",-1,[-1]],
11 | ["_displayName","",[""]]
12 | ];
13 |
14 | life_action_inUse = false;
15 |
16 | if (_price > 0) then {
17 | CASH = CASH + _price;
18 | [0] call SOCK_fnc_updatePartial;
19 | titleText [format[(localize "STR_NOTF_ChopSoldCar"),_displayName,[_price] call life_fnc_numberText],"PLAIN",1];
20 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_levelCheck.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_levelCheck.sqf
3 | Author: BoGuu
4 |
5 | Description:
6 | xx
7 | */
8 |
9 | if !(params [["_itemConfig", [], [[],""]]]) exitWith {};
10 |
11 | scopeName "main";
12 |
13 | private _return = false;
14 |
15 | if (_itemConfig isEqualTo []) exitWith {diag_log localize "STR_NOTF_emptyArray_levelCheck"; _return};
16 |
17 | if (_itemConfig isEqualType []) then {
18 | private _lastElement = _itemConfig select (count _itemConfig - 1);
19 | if (_lastElement isEqualType "") then {
20 | _itemConfig = _lastElement;
21 | } else {
22 | true breakOut "main";
23 | };
24 | };
25 |
26 | if (_itemConfig isEqualTo "") exitWith {true};
27 |
28 | private _evaluation = call compile _itemConfig;
29 |
30 | if (_evaluation isEqualType true) then {
31 | if (_evaluation) then {
32 | _return = true;
33 | };
34 | } else {
35 | _return = true;
36 | };
37 |
38 | _return;
39 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_virt_menu.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_virt_menu.sqf
4 | Author: Bryan "Tonic" Boardwine
5 | Description:
6 | Initialize the virtual shop menu.
7 | */
8 |
9 | params [
10 | ["_shopNPC", objNull, [objNull]],
11 | "",
12 | "",
13 | ["_shopType", "", [""]]
14 | ];
15 |
16 | if (isNull _shopNPC || {_shopType isEqualTo ""}) exitWith {};
17 |
18 | private _shopSide = M_CONFIG(getText,"VirtualShops",_shopType,"side");
19 |
20 | life_shop_type = _shopType;
21 | life_shop_npc = _shopNPC;
22 |
23 | private _exit = false;
24 |
25 | if !(_shopSide isEqualTo "") then {
26 | private _flag = switch (playerSide) do {case west: {"cop"}; case independent: {"med"}; default {"civ"};};
27 | if !(_flag isEqualTo _shopSide) then {_exit = true;};
28 | };
29 |
30 | if (_exit) exitWith {};
31 |
32 | private _conditions = M_CONFIG(getText,"VirtualShops",_shopType,"conditions");
33 |
34 | if !([_conditions] call life_fnc_levelCheck) exitWith {hint localize "STR_Shop_Veh_NotAllowed";};
35 |
36 | createDialog "shops_menu";
37 |
38 | [] call life_fnc_virt_update;
39 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_weaponShopAccs.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_weaponShopAccs.sqf
4 | Author: Daniel Stuart
5 |
6 | Description:
7 | Set Weapon Shop in accessories mode
8 | */
9 | disableSerialization;
10 |
11 | if ((uiNamespace getVariable ["Weapon_Accessories", 0]) isEqualTo 0) then {
12 | private _weapon = lbData [38403, lbCurSel (38403)];
13 | private _compatibleItems = _weapon call BIS_fnc_compatibleItems; //Fetch all compatible Items for the weapons.
14 | uiNamespace setVariable ["Accessories_Array", _compatibleItems];
15 | uiNamespace setVariable ["Weapon_Accessories", 1];
16 | } else {
17 | uiNamespace setVariable ["Weapon_Accessories", 0];
18 | };
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/shops/fn_weaponShopMags.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_weaponShopMags.sqf
4 | Author: Daniel Stuart
5 |
6 | Description:
7 | Set Weapon Shop in magazine mode
8 | */
9 | disableSerialization;
10 |
11 | if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 0) then {
12 | private _weapon = lbData[38403,lbCurSel (38403)];
13 | private _magArray = FETCH_CONFIG2(getArray,"CfgWeapons",_weapon,"magazines");
14 | {
15 | if (_x in FETCH_CONFIG2(getArray,"CfgWeapons",_weapon,"muzzles")) then {
16 | _magArray append FETCH_CONFIG(getArray,"CfgWeapons",_weapon,_x,"magazines");
17 | };
18 | } count ["EGLM", "GL_3GL_F"];
19 | uiNamespace setVariable ["Magazine_Array",_magArray];
20 | uiNamespace setVariable ["Weapon_Magazine",1];
21 | } else {
22 | uiNamespace setVariable ["Weapon_Magazine",0];
23 | };
24 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/vehicle/fn_addVehicle2Chain.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_addVehicle2Chain.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | A short function for telling the player to add a vehicle to his keychain.
7 | */
8 | private "_vehicle";
9 | _vehicle = param [0,objNull,[objNull]];
10 | if (!(_vehicle in life_vehicles)) then {
11 | life_vehicles pushBack _vehicle;
12 | };
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/vehicle/fn_lockVehicle.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_lockVehicle.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Locks the vehicle (used through the network when the person calling it isn't local).
7 | */
8 | params [
9 | ["_vehicle",objNull,[objNull]],
10 | ["_state",2,[0,false]]
11 | ];
12 |
13 | if (isNull _vehicle) exitWith {};
14 |
15 | _vehicle lock _state;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/vehicle/fn_vehicleColor3DRefresh.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleColor3DRefresh.sqf
3 | Author:
4 | Modified: NiiRoZz
5 |
6 | Description:
7 | Called when a new selection is made in the rsc box and paint the vehicle with the color selected.
8 | */
9 | disableSerialization;
10 | _display = findDisplay 2300;
11 | _colorIndex = lbValue[2304, (lbCurSel 2304)];
12 | if (isNull life_3dPreview_object) exitWith {};
13 |
14 | [life_3dPreview_object, _colorIndex] call life_fnc_colorVehicle;
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/vehicle/fn_vehicleOwners.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleOwners.sqf
3 | Author:
4 |
5 | Description:
6 | Pulled from old system, will be revised for new system.
7 | */
8 | private ["_return","_format"];
9 | _return = "";
10 |
11 | {
12 | _format = format ["%1
",_x select 1];
13 | _return = _return + _format;
14 | } forEach (_this select 0);
15 |
16 | _return;
17 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/core/vehicle/fn_vehicleWeight.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleWeight.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Calculates Vehicle Weight.
7 | */
8 | private ["_vehicle","_weight","_used"];
9 | _vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _vehicle) exitWith {};
11 |
12 | _weight = -1;
13 | _used = (_vehicle getVariable "Trunk") select 1;
14 | _weight = [(typeOf _vehicle)] call life_fnc_vehicleWeightCfg;
15 |
16 | if (isNil "_used") then {_used = 0};
17 | [_weight,_used];
18 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/MasterHandler.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | Master UI Resource File
3 | */
4 | #include "common.hpp"
5 | #include "shop_items.hpp"
6 | #include "player_inv.hpp"
7 | #include "gang.hpp"
8 | #include "key_chain.hpp"
9 | #include "impound.hpp"
10 | #include "bank.hpp"
11 | #include "veh_shop.hpp"
12 | #include "shops.hpp"
13 | #include "hud_stats.hpp"
14 | #include "admin_menu.hpp"
15 | #include "cell_phone.hpp"
16 | #include "wanted_list.hpp"
17 | #include "ticket.hpp"
18 | #include "clothing.hpp"
19 | #include "trunk.hpp"
20 | #include "spawnSelection.hpp"
21 | #include "chop_shop.hpp"
22 | #include "pInteraction.hpp"
23 | #include "deathScreen.hpp"
24 | #include "vehicleShop.hpp"
25 | #include "vehicleShop3D.hpp"
26 | #include "settings.hpp"
27 | #include "federalReserve.hpp"
28 | #include "compensate.hpp"
29 | #include "FuelStat.hpp"
30 | #include "newsStation.hpp"
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_displayHandler.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_displayHandler.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Master display handler
7 | */
8 | private ["_control","_code","_shift","_ctrlKey","_alt","_handled"];
9 | _handled = false;
10 |
11 | //Esc Key Handler
12 | if ((_this select 1) isEqualTo 1) then {_handled = true;};
13 |
14 | _handled;
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_gangBankResponse.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_gankBankResponse.sqf
4 | Author: DomT602
5 | Description:
6 | Receives response from the server.
7 | */
8 | params [
9 | ["_value",-1,[0]]
10 | ];
11 | if (remoteExecutedOwner != ([2,HC_Life] select life_HC_isActive)) exitWith {};
12 | if (_value isEqualTo -1) exitWith {};
13 |
14 | hint format [localize "STR_ATM_WithdrawSuccessG",[_value] call life_fnc_numberText];
15 | CASH = CASH + _value;
16 | [] call life_fnc_atmMenu;
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_impoundMenu.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_impoundMenu.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Not actually a impound menu, may act as confusion to some but that is what I wanted.
8 | The purpose of this menu is it is now called a 'Garage' where vehicles are stored (persistent ones).
9 | */
10 | private ["_vehicles","_control"];
11 | disableSerialization;
12 | _vehicles = param [0,[],[[]]];
13 |
14 | ctrlShow[2803,false];
15 | ctrlShow[2830,false];
16 | waitUntil {!isNull (findDisplay 2800)};
17 |
18 | if (count _vehicles isEqualTo 0) exitWith {
19 | ctrlSetText[2811,localize "STR_Garage_NoVehicles"];
20 | };
21 |
22 | _control = CONTROL(2800,2802);
23 | lbClear _control;
24 |
25 | {
26 | _vehicleInfo = [(_x select 2)] call life_fnc_fetchVehInfo;
27 | _control lbAdd (_vehicleInfo select 3);
28 | _tmp = [(_x select 2),(_x select 8)];
29 | _tmp = str(_tmp);
30 | _control lbSetData [(lbSize _control)-1,_tmp];
31 | _control lbSetPicture [(lbSize _control)-1,(_vehicleInfo select 2)];
32 | _control lbSetValue [(lbSize _control)-1,(_x select 0)];
33 | } forEach _vehicles;
34 |
35 | ctrlShow[2810,false];
36 | ctrlShow[2811,false];
37 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_progressBar.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_progressBar.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Initializes the progress bar.
7 | */
8 | disableSerialization;
9 | private ["_ui","_progress"];
10 | "progressBar" cutRsc ["life_progress","PLAIN"];
11 | _ui = uiNameSpace getVariable "life_progress";
12 | _progress = _ui displayCtrl 38201;
13 |
14 | _progress progressSetPosition 0.5;
15 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_safeInventory.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_safeInventory.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Fills up the safes inventory.
8 | */
9 | private ["_safe","_tInv","_pInv","_safeInfo","_str","_shrt","_icon"];
10 | _safe = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 | if (isNull _safe) exitWith {closeDialog 0;};
12 | disableSerialization;
13 |
14 | _tInv = (findDisplay 3500) displayCtrl 3502;
15 | lbClear _tInv;
16 |
17 | _safeInfo = _safe getVariable ["safe",-1];
18 | if (_safeInfo < 1) exitWith {closeDialog 0; hint localize "STR_Civ_VaultEmpty";};
19 |
20 | _str = M_CONFIG(getText,"VirtualItems","goldbar","displayName");
21 | _shrt = M_CONFIG(getText,"VirtualItems","goldbar","variable");
22 | _tInv lbAdd format ["[%1] - %2",_safeInfo,(localize _str)];
23 | _tInv lbSetData [(lbSize _tInv)-1,_shrt];
24 | _icon = M_CONFIG(getText,"VirtualItems","goldbar","icon");
25 | if (!(_icon isEqualTo "")) then {
26 | _tInv lbSetPicture [(lbSize _tInv)-1,_icon];
27 | };
28 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_safeOpen.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_safeOpen.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Opens the safe inventory menu.
8 | */
9 | if (dialog) exitWith {}; //A dialog is already open.
10 | life_safeObj = param [0,objNull,[objNull]];
11 | if (isNull life_safeObj) exitWith {};
12 | if !(playerSide isEqualTo civilian) exitWith {};
13 | if ((life_safeObj getVariable ["safe",-1]) < 1) exitWith {hint localize "STR_Civ_VaultEmpty";};
14 | if (life_safeObj getVariable ["inUse",false]) exitWith {hint localize "STR_Civ_VaultInUse"};
15 | if (west countSide playableUnits < (LIFE_SETTINGS(getNumber,"minimum_cops"))) exitWith {
16 | hint format [localize "STR_Civ_NotEnoughCops",(LIFE_SETTINGS(getNumber,"minimum_cops"))];
17 | };
18 | if (!createDialog "Federal_Safe") exitWith {localize "STR_MISC_DialogError"};
19 |
20 | disableSerialization;
21 | ctrlSetText[3501,(localize "STR_Civ_SafeInv")];
22 | [life_safeObj] call life_fnc_safeInventory;
23 | life_safeObj setVariable ["inUse",true,true];
24 |
25 | [life_safeObj] spawn {
26 | waitUntil {isNull (findDisplay 3500)};
27 | (_this select 0) setVariable ["inUse",false,true];
28 | };
29 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_safeStore.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_safeStore.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Gateway copy of fn_vehStoreItem but designed for the safe.
8 | */
9 | private ["_ctrl","_num"];
10 | disableSerialization;
11 | _ctrl = CONTROL_DATA(3503);
12 | _num = ctrlText 3506;
13 |
14 | //Error checks
15 | if (!([_num] call TON_fnc_isnumber)) exitWith {hint localize "STR_MISC_WrongNumFormat";};
16 | _num = parseNumber(_num);
17 | if (_num < 1) exitWith {hint localize "STR_Cop_VaultUnder1";};
18 | if (!(_ctrl isEqualTo "goldBar")) exitWith {hint localize "STR_Cop_OnlyGold"};
19 | if (_num > life_inv_goldbar) exitWith {hint format [localize "STR_Cop_NotEnoughGold",_num];};
20 |
21 | //Store it.
22 | if (!([false,_ctrl,_num] call life_fnc_handleInv)) exitWith {hint localize "STR_Cop_CantRemove";};
23 | _safeInfo = life_safeObj getVariable ["safe",0];
24 | life_safeObj getVariable ["safe",_safeInfo + _num,true];
25 |
26 | [life_safeObj] call life_fnc_safeInventory;
27 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_setMapPosition.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_setMapPosition.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Sets the given control / maps focus position
7 | */
8 | disableSerialization;
9 | private ["_control","_time","_zoom","_position"];
10 | _control = [_this,0,controlNull,[controlNull]] call BIS_fnc_param;
11 | _time = [_this,1,1,[0]] call BIS_fnc_param;
12 | _zoom = [_this,2,0.1,[0]] call BIS_fnc_param;
13 | _position = [_this,3,[],[[]]] call BIS_fnc_param;
14 |
15 | if (isNull _control || _position isEqualTo []) exitWith {};
16 |
17 | _control ctrlMapAnimAdd[_time,_zoom,_position];
18 | ctrlMapAnimCommit _control;
19 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_spawnPointSelected.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_spawnPointSelected.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Sorts out the spawn point selected and does a map zoom.
7 | */
8 | disableSerialization;
9 | private ["_control","_selection","_spCfg","_sp"];
10 | _control = [_this,0,controlNull,[controlNull]] call BIS_fnc_param;
11 | _selection = [_this,1,0,[0]] call BIS_fnc_param;
12 |
13 | _spCfg = [playerSide] call life_fnc_spawnPointCfg;
14 | _sp = _spCfg select _selection;
15 | [((findDisplay 38500) displayCtrl 38502),1,0.1,getMarkerPos (_sp select 0)] call life_fnc_setMapPosition;
16 | life_spawn_point = _sp;
17 |
18 | ctrlSetText[38501,format ["%2: %1",_sp select 1,localize "STR_Spawn_CSP"]];
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/function/fn_wireTransfer.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 | File: fn_wireTransfer.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Initiates the wire-transfer
8 | */
9 | params [
10 | ["_value",0,[0]],
11 | ["_from","",[""]]
12 | ];
13 |
14 | if (_value isEqualTo 0 || _from isEqualTo "" || _from isEqualTo profileName) exitWith {}; //No
15 | BANK = BANK + _value;
16 | [1] call SOCK_fnc_updatePartial;
17 | hint format [localize "STR_ATM_WireTransfer",_from,[_value] call life_fnc_numberText];
--------------------------------------------------------------------------------
/Altis_Life.Altis/dialog/player_sys.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: player_sys.sqf
3 | Author:
4 |
5 | Description:
6 |
7 | */
8 | #define playersys_DIALOG 2001
9 | #define money_text 2002
10 | #define water_text 2003
11 | #define food_text 2004
12 | #define item_list 2005
13 | #define player_list 2006
14 | #define money_value 2007
15 | #define rogue_text 2008
16 | #define carry_weight 2009
17 | #define item_edit 2010
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_apple.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_apple.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_bank.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_bank.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_blastingCharge.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_blastingCharge.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_boltCutter.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_boltCutter.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_cannabis.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_cannabis.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_catsharkRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_catsharkRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_cement.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_cement.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_chickenDrumstick.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_chickenDrumstick.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_chickenDrumstickRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_chickenDrumstickRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_cocaineProcessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_cocaineProcessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_cocaineUnprocessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_cocaineUnprocessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_coffee.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_coffee.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_cookedFish.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_cookedFish.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_copper.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_copper.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_copperore.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_copperore.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_defibrillator.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_defibrillator.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_defusekit.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_defusekit.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_diamondCut.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_diamondCut.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_diamondUncut.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_diamondUncut.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_donuts.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_donuts.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_fuel.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_fuel.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_fuelempty.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_fuelempty.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_glass.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_glass.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_goldbar.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_goldbar.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_heroinProcessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_heroinProcessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_heroinUnprocessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_heroinUnprocessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_iron.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_iron.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_ironore.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_ironore.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_lambChop.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_lambChop.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_lambChopRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_lambChopRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_lockpick.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_lockpick.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_mackerelRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_mackerelRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_mail.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_mail.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_map.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_map.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_marijuana.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_marijuana.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_matches.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_matches.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_messageAdmin.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_messageAdmin.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_messageNew.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_messageNew.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_messagePolice.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_messagePolice.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_money.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_money.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_mulletRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_mulletRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_muttonLeg.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_muttonLeg.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_muttonLegRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_muttonLegRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_oilProcessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_oilProcessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_oilUnprocessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_oilUnprocessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_ornateRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_ornateRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_peach.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_peach.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_pickaxe.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_pickaxe.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_rabbit.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_rabbit.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_rabbitRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_rabbitRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_redgull.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_redgull.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_rock.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_rock.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_salemaRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_salemaRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_saltProcessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_saltProcessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_saltUnprocessed.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_saltUnprocessed.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_sand.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_sand.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_settings.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_settings.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_speech.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_speech.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_spikestrip.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_spikestrip.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_storageBig.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_storageBig.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_storageSmall.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_storageSmall.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_tbacon.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_tbacon.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_tunaRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_tunaRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_turtleRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_turtleRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_turtleSoup.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_turtleSoup.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_waterBottle.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_waterBottle.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_wholeChicken.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_wholeChicken.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/icons/ico_wholeChickenRaw.paa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/icons/ico_wholeChickenRaw.paa
--------------------------------------------------------------------------------
/Altis_Life.Altis/initPlayerLocal.sqf:
--------------------------------------------------------------------------------
1 | #include "script_macros.hpp"
2 | /*
3 | File: initPlayerLocal.sqf
4 | Author:
5 |
6 | Description:
7 | Starts the initialization of the player.
8 | */
9 | if (!hasInterface && !isServer) exitWith {
10 | [] call compile preprocessFileLineNumbers "\life_hc\initHC.sqf";
11 | };
12 |
13 | CONST(BIS_fnc_endMission,BIS_fnc_endMission);
14 | if (LIFE_SETTINGS(getNumber,"spyGlass_toggle") isEqualTo 1) then {[] execVM "SpyGlass\fn_initSpy.sqf";};
15 |
16 | [] execVM "core\init.sqf";
17 | [] execVM "briefing.sqf";
18 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/initServer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: initServer.sqf
3 | Author:
4 |
5 | Description:
6 | Starts the initialization of the server.
7 | */
8 |
9 | [] call compile preprocessFileLineNumbers "\life_server\init.sqf";
10 |
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/carLock.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/carLock.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/carUnlock.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/carUnlock.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/flashbang.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/flashbang.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/harvest.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/harvest.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/medicSiren.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/medicSiren.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/mining.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/mining.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/sirenLong.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/sirenLong.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/sounds/tazer.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/sounds/tazer.ogg
--------------------------------------------------------------------------------
/Altis_Life.Altis/textures/AYULoadingImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/textures/AYULoadingImage.png
--------------------------------------------------------------------------------
/Altis_Life.Altis/textures/armalife.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/textures/armalife.jpg
--------------------------------------------------------------------------------
/Altis_Life.Altis/textures/cop_uniform.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/textures/cop_uniform.jpg
--------------------------------------------------------------------------------
/Altis_Life.Altis/textures/medic_uniform.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AsYetUntitled/Framework/fb77bda7eef635e01a794d7c1f876e914e6b8a8d/Altis_Life.Altis/textures/medic_uniform.jpg
--------------------------------------------------------------------------------
/BEFilters/addbackpackcargo.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !B_(OutdoorPack|AssaultPack|TacticalPack|Kitbag|FieldPack|Bergen|Carryall)_(blk|khk|dgtl|rgr|sgg|cbr|oli|mcamo|ocamo|oucamo|tna|ghex) !B_Parachute
4 | 5 B_AssaultPack_blk_DiverExp
5 | 5 B_AssaultPack_mcamo_AT
6 | 5 B_AssaultPack_mcamo_AA
7 | 5 B_AssaultPack_mcamo_AAR
8 | 5 B_AssaultPack_mcamo_Ammo
9 | 5 B_AssaultPack_rgr_LAT
10 | 5 B_AssaultPack_rgr_Medic
11 | 5 B_AssaultPack_rgr_Repair
12 | 5 B_AssaultPack_rgr_ReconMedic
13 | 5 B_AssaultPack_rgr_ReconExp
14 | 5 B_AssaultPack_rgr_ReconLAT
15 | 5 B_Kitbag_rgr_Exp
16 | 5 B_Kitbag_mcamo_Eng
17 | 5 B_FieldPack_ocamo_Medic
18 | 5 B_FieldPack_ocamo_AA
19 | 5 B_FieldPack_ocamo_AAR
20 | 5 B_FieldPack_ocamo_ReconMedic
21 | 5 B_FieldPack_ocamo_ReconExp
22 | 5 B_Carryall_ocamo_Exp
23 | 5 B_Carryall_mcamo_AAA
24 | 5 B_Carryall_mcamo_AAT
25 | 5 B_Carryall_ocamo_AAA
26 | 5 B_Carryall_ocamo_Eng
27 | 5 B_Carryall_cbr_AAT
28 | 5 B_Carryall_oucamo_AAT
29 | 5 B_Carryall_oucamo_AAA
30 | 5 B_Carryall_oucamo_Exp
31 | 5 B_Carryall_oucamo_Eng
32 | 5 B_B_Parachute_02_F
33 |
--------------------------------------------------------------------------------
/BEFilters/addmagazinecargo.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !=[69]Rnd_45ACP_(Cylinder|Mag) !=[13][60]Rnd_9x21_Mag !=[123][60]Rnd_65x39_caseless_(green|mag) !=[123]0Rnd_[57][56][62]x[45][45]_(Mag|Stanag|UW_Mag) !=Chemlight_(blue|green|red|yellow) !=HandGrenade_Stone !=30Rnd_545x39_Mag_F
4 |
--------------------------------------------------------------------------------
/BEFilters/addweaponcargo.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !=hgun_(ACPC2|Rook40|PDW2000|Pistol_heavy_02)_F !=hgun_P07_(snds_)?F !=arifle_(TRG20|Katiba|SDAR|MX[C]?)_F !=srifle_DMR_01_F !=SMG_02_ACO_F !=hgun_P07_khk_F !=hgun_Pistol_01_F !=SMG_05_F !arifle_AK12(_GL)?_F !=arifle_AKM_F !arifle_SPAR_01_(blk|khk|GL_blk)_F !arifle_MX(M|C)?_(GL_)?(khk)_F !srifle_DMR_07_(blk|ghex)_F !=srifle_LRR_tna_F !=srifle_GM6_ghex_F !Item(Compass|GPS|Map|Radio|Watch) !=NVGoggles !=FirstAidKit !=Binocular !optic_(ACO_grn(_smg)?|Arco|Hamr|Holosight|MRD) !=acc_flashlight !muzzle_snds_[LH] !U_B_CombatUniform_Mcam_(tshirt|worn) !=U_B_survival_uniform !=U_B_Wetsuit !U_C_Driver_[1234] !=U_C_HunterBody_grn !U_C_Poloshirt !=U_C_Poor_2 !=U_C_WorkerCoveralls !U_I_G_ !U_IG_Guerilla[123]_[123] !=U_IG_leader !=U_NikosAgedBody !U_O_(GhillieSuit|PilotCoveralls|SpecopsUniform_ocamo) !=U_OrestesBody !=U_Rangemaster !H_Bandanna_ !=H_BandMask_blk !=H_Beret_blk_POLICE !H_Booniehat_ !H_Cap_ !H_Hat_ !H_Helmet[BO]_ !H_MilCap_ !H_RacingHelmet_[1234]_ !H_Shemag !H_StrawHat !G_[ABCDLS] !=V_Rangemaster_belt !V_TacVest_[bk] !=V_PlateCarrier2_rgr !=V_RebreatherB !=V_BandollierB_cbr !=V_HarnessO_brn
4 |
--------------------------------------------------------------------------------
/BEFilters/attachto.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !Box_IND_Grenades_F !B_supplyCrate_F !Land_(ClutterCutter_small|Razorwire)_F !B_RangeMaster_F !C_man_1 !B_Quadbike_01_F ![BOI]_Truck_0[123]_(box|covered|device|fuel|medical|transport)_F !C_Hatchback_01_(sport_)?F ![BC]_(G_)?Offroad_01_(armed_)?F !C_SUV_01_F !C_Van_01_(transport|box|fuel)_F !C_Kart_01_(Blu|Fuel|Red|Vrana)_F ![BCO]_Heli_Light_0[12]_(civil_|stripped_|unarmed_)?F !C_Rubberboat !C_Boat_Civil_01_(police_)?F !B_SDV_01_F ![BO]_MRAP_0[12]_(hmg_)?F !B_(Boat|Heli)_Transport_01_F !B_Boat_Armed_01_minigun_F !C_Offroad_02_unarmed_F !C_Plane_Civil_01_F !C_Boat_Transport_02_F !C_Scooter_Transport_01_F !O_T_LSV_02_unarmed_F !NetworkMessageCreateHelicopterRTD
4 |
--------------------------------------------------------------------------------
/BEFilters/deletevehicle.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 1 "" !Land_(Razorwire|Money|Suitcase|CanisterFuel|Can|BottlePlastic|TacticalBacon)_F !Land_Can_V3_F !Land_BottlePlastic_V1_F !Box_IND_Grenades_F !B_supplyCrate_F !(Cock|Goat|Hen|Ornate|Sheep)_random_F !(CatShark|Mackerel|Mullet|Salema|Tuna|Turtle)_F
4 | //Issue: impounding a vehicle may cause a deleteVehicle kick but no information on classname. Example log:
5 | //06.02.2016 19:14:02: playerName (10.0.0.7:2304) 12345678901234567890123456789012 - #0 4:9
6 |
--------------------------------------------------------------------------------
/BEFilters/mpeventhandler.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 1 ""
3 | 7 "" !="_this call fn_whoDoneIt"
4 |
--------------------------------------------------------------------------------
/BEFilters/publicvariable.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !=life_fnc_RequestClientId !=money_log !=advanced_log !=(cop|civ)_[\d]{1,3} !=medic_[1-6] !=life_broadcastTimer
4 |
--------------------------------------------------------------------------------
/BEFilters/publicvariableval.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 "" !=(cop|civ)_[\d]{1,3} !=medic_[1-6] !"arrested ." !"picked up [\d]{1,3} [a-z ]{1,17}" !"created a gang named: [a-z0-9_ ]{1,32} for \$[\d]" !"(bought|sold) a house for \$" !"(bought|chopped|sold) vehicle ." !"(deposited|picked up|robbed|transferred|withdrew) \$" ![\d]{1,5}\.[\d]{1,3}
3 | 5 "" !=(cop|civ)_[\d]{1,3} !=medic_[1-6] !"arrested ." !"picked up [\d]{1,3} [a-z ]{1,17}" !"created a gang named: [a-z0-9_ ]{1,32} for \$[\d]" !"(bought|sold) a house for \$" !"(bought|chopped|sold) vehicle ." !"(deposited|picked up|robbed|transferred|withdrew) \$" ![\d]{1,5}\.[\d]{1,3}
4 |
--------------------------------------------------------------------------------
/BEFilters/remotecontrol.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 7 ""
3 |
--------------------------------------------------------------------------------
/BEFilters/selectplayer.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 1 ""
3 | 5 "" !B_RangeMaster_F !C_man_1
4 |
--------------------------------------------------------------------------------
/BEFilters/setdamage.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !=0.[02][05]0000
4 |
--------------------------------------------------------------------------------
/BEFilters/setpos.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !B_Quadbike_01_F ![BOI]_Truck_0[123]_(box|covered|device|fuel|medical|transport)_F !C_Hatchback_01_(sport_)?F ![BC]_(G_)?Offroad_01_(armed_)?F !C_SUV_01_F !C_Van_01_(transport|box|fuel)_F !C_Kart_01_(Blu|Fuel|Red|Vrana)_F ![BCO]_Heli_Light_0[12]_(civil_|stripped_|unarmed_)?F !C_Rubberboat !C_Boat_Civil_01_(police_)?F !B_SDV_01_F ![BO]_MRAP_0[12]_(hmg_)?F !B_(Boat|Heli)_Transport_01_F !B_Boat_Armed_01_minigun_F !C_Offroad_02_unarmed_F !C_Plane_Civil_01_F !C_Scoooter_Transport_01_F !O_T_LSV_02_unarmed_F !B_RangeMaster_F !C_man_1
4 |
--------------------------------------------------------------------------------
/BEFilters/setvariable.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 ""
3 | 5 "" !bis_disabled_Door_[1-6] !=BIS_fnc_(selectRespawnTemplate_respawned|setVehicleMass) !=chargeplaced !container_(id|owner) !=containers !=dbInfo !=Escorting !=escortingPlayer !fuelTank(Work)? !gang_(bank|id|maxMembers|members|name|owner) !=gangOwner !=gbank_in_use_by !house_(id|owned|owner|sold) !houses_.+ !=inCapture !=inUse !=isEscorting !=item !life_(clientID|VEH_color) !=color !=lights !=lightSource !=locked !=mining !(real)?name !=NPC !=playerSurrender !=rank !=restrained !=Revive !=Reviving !=robbed !safe(_open)? !=sellers !=siren !=slots !=spikeDeployed !=steam64id !=transporting !Trunk(_in_use(_by)?)? !=uid !=vehicle_info_owners !="(true|false) [\d]:[\d]+ (C_man_1|B_RangeMaster_F)" !=#var !=saved3deninventory
4 |
--------------------------------------------------------------------------------
/BEFilters/setvariableval.txt:
--------------------------------------------------------------------------------
1 | //regex
2 | 1 "" !(true|false|any) !(cop|civ)_[\d]{1,3} !medic_[1-6] !=[\d]e\+00[67] !=[\d]\.[\d]{1,5}e\+00[67] !=[\d]{1,6} ![\d]{17} !=\[\d{1,5},\d{1,5}(.\d\d)?\] !"\[.{8}# \d{7}: (ammobox_f|supplydrop)\.p3d REMOTE" !=\[\[\],0\] !=\[\] !spikeDeployed !="C Charlie 2-3" !\[\"storage(big|small)\",[\d]{1,6}\] !\[\"(copper|iron|salt)_(unrefined|refined)\",[\d]{1,6}\] !\[\"(catshark|goat|hen|mackerel|mullet|ornate|rabbit|rooster|salema|sheep|tuna|turtle(_soup)?|(_raw))\",[\d]{1,6}\] !\[\"diamond_(cut|uncut)\",[\d]{1,6}\] !\[\"fuel(Empty|Full)\",[\d]{1,6}\] !\[\"(cocaine|heroin|oil)_(unprocessed|processed)\",[\d]{1,6}\] !\[\"(apple|blastingcharge|boltcutter|cannabis|cement|coffee|defusekit|donuts|glass|goldbar)\",[\d]{1,6}\] !\[\"(lockpick|marijuana|peach|pickaxe|redgull|rock|sand|spikeStrip|tbacon|waterBottle)\",[\d]{1,6}\] !\[\"(toolkit|defibrillator)\",[\d]{1,6}\] !\[\"money\",[\d]{1,6}\] !\[\"money\",[\d]\.[\d]{1,5}e\+[\d]{1,3}\]
3 |
--------------------------------------------------------------------------------
/BEFilters/teamswitch.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 7 ""
3 |
--------------------------------------------------------------------------------
/BEFilters/waypointcondition.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 7 ""
3 |
--------------------------------------------------------------------------------
/BEFilters/waypointstatement.txt:
--------------------------------------------------------------------------------
1 | //new
2 | 7 ""
3 |
--------------------------------------------------------------------------------
/MAINTAINERS:
--------------------------------------------------------------------------------
1 | BoGuu
2 | Jawshy
3 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-minimal
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | title: Altis Life RPG
2 | description: A website for the Altis Life RPG mission framework.
3 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | Hello!
2 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Gangs/fn_queryPlayerGang.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_queryPlayerGang.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Queries to see if the player belongs to any gang.
9 | */
10 | private ["_query","_queryResult"];
11 |
12 | _query = format ["SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE '%2%1%2'",_this,"%"];
13 |
14 | _queryResult = [_query,2] call HC_fnc_asyncCall;
15 |
16 | if !(count _queryResult isEqualTo 0) then {
17 | _tmp = [_queryResult select 5] call HC_fnc_mresToArray;
18 | if (_tmp isEqualType "") then {_tmp = call compile format ["%1",_tmp];};
19 | _queryResult set[5, _tmp];
20 | };
21 | missionNamespace setVariable [format ["gang_%1",_this],_queryResult];
22 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Gangs/fn_removeGang.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_removeGang.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Removes gang from database
8 | */
9 | private ["_group","_groupID"];
10 | _group = param [0,grpNull,[grpNull]];
11 | if (isNull _group) exitWith {};
12 |
13 | _groupID = _group getVariable ["gang_id",-1];
14 | if (_groupID isEqualTo -1) exitWith {};
15 |
16 | _group setVariable ["gang_owner",nil,true];
17 | [format ["UPDATE gangs SET active='0' WHERE id='%1'",_groupID],1] call HC_fnc_asyncCall;
18 |
19 | [_group] remoteExecCall ["life_fnc_gangDisbanded",(units _group)];
20 | waitUntil {(units _group) isEqualTo []};
21 | deleteGroup _group;
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_bool.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_bool.sqf
3 | Author: TAW_Tonic
4 |
5 | Description:
6 | Handles bool conversion for MySQL since MySQL doesn't support 'true' or 'false'
7 | instead MySQL uses Tinyint for BOOLEAN (0 = false, 1 = true)
8 | */
9 | private ["_bool","_mode"];
10 | _bool = [_this,0,0,[false,0]] call BIS_fnc_param;
11 | _mode = [_this,1,0,[0]] call BIS_fnc_param;
12 |
13 | switch (_mode) do {
14 | case 0: {
15 | if (_bool isEqualType 0) exitWith {0};
16 | if (_bool) then {1} else {0};
17 | };
18 |
19 | case 1: {
20 | if (!(_bool isEqualType 0)) exitWith {false};
21 | switch (_bool) do {
22 | case 0: {false};
23 | case 1: {true};
24 | };
25 | };
26 | };
27 |
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_insertVehicle.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_insertVehicle.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Inserts the vehicle into the database
9 | */
10 | private ["_query","_sql"];
11 | params [
12 | "_uid",
13 | "_side",
14 | "_type",
15 | "_className",
16 | ["_color",-1,[0]],
17 | ["_plate",-1,[0]]
18 | ];
19 |
20 | //Stop bad data being passed.
21 | if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo -1) exitWith {};
22 |
23 | _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""')",_side,_className,_type,_uid,_color,_plate];
24 |
25 | [_query,1] call HC_fnc_asyncCall;
26 |
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_mresArray.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresArray.sqf
3 | Author: Bryan "Tonic" Boardwine";
4 |
5 | Description:
6 | Acts as a mres (MySQL Real Escape) for arrays so they
7 | can be properly inserted into the database without causing
8 | any problems. The return method is 'hacky' but it's effective.
9 | */
10 | private ["_array"];
11 | _array = [_this,0,[],[[]]] call BIS_fnc_param;
12 | _array = str _array;
13 | _array = toArray(_array);
14 |
15 | for "_i" from 0 to (count _array)-1 do
16 | {
17 | _sel = _array select _i;
18 | if (!(_i isEqualTo 0) && !(_i isEqualTo ((count _array)-1))) then
19 | {
20 | if (_sel isEqualTo 34) then
21 | {
22 | _array set[_i,96];
23 | };
24 | };
25 | };
26 |
27 | str(toString(_array));
28 |
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_mresString.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresString.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Makes the string safe to be passed to MySQL (strips various stuff).
7 | */
8 | private ["_string","_filter"];
9 | _string = [_this,0,"",[""]] call BIS_fnc_param;
10 | _filter = "'/\`:|;,{}-""<>";
11 |
12 | _string = toArray _string; //Blow it up to an array
13 | _filter = toArray _filter; //Blow it up to an array
14 |
15 | {
16 | if (_x in _filter) then {
17 | _string deleteAt _forEachIndex;
18 | };
19 | } forEach _string;
20 |
21 | toString _string;
22 |
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_mresToArray.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresToArray.sqf
3 | Author: Bryan "Tonic" Boardwine";
4 |
5 | Description:
6 | Acts as a mres (MySQL Real Escape) for arrays so they
7 | can be properly inserted into the database without causing
8 | any problems. The return method is 'hacky' but it's effective.
9 | */
10 | private ["_array"];
11 | _array = [_this,0,"",[""]] call BIS_fnc_param;
12 | if (_array isEqualTo "") exitWith {[]};
13 | _array = toArray(_array);
14 |
15 | for "_i" from 0 to (count _array)-1 do
16 | {
17 | _sel = _array select _i;
18 | if (_sel == 96) then
19 | {
20 | _array set[_i,39];
21 | };
22 | };
23 |
24 | _array = toString(_array);
25 | _array = call compile format ["%1", _array];
26 | _array;
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_numberSafe.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_numberSafe.sqf
3 | Author: Karel Moricky
4 |
5 | Description:
6 | Convert a number into string (avoiding scientific notation)
7 |
8 | Parameter(s):
9 | _this: NUMBER
10 |
11 | Returns:
12 | STRING
13 | */
14 | private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
15 |
16 | _number = [_this,0,0,[0]] call bis_fnc_param;
17 | _mod = [_this,1,3,[0]] call bis_fnc_param;
18 |
19 | _digits = _number call bis_fnc_numberDigits;
20 | _digitsCount = count _digits - 1;
21 |
22 | _modBase = _digitsCount % _mod;
23 | _numberText = "";
24 | {
25 | _numberText = _numberText + str _x;
26 | if ((_foreachindex - _modBase) % (_mod) isEqualTo 0 && !(_foreachindex isEqualTo _digitsCount)) then {_numberText = _numberText + "";};
27 | } forEach _digits;
28 | _numberText
29 |
--------------------------------------------------------------------------------
/life_hc/MySQL/General/fn_receivekeyofServer.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_receivekeyofServer.sqf
4 | Author: NiiRoZz
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | Recup the key of player when reconnect
10 | */
11 | private ["_keyArr","_uid","_side"];
12 | _keyArr = _this select 0;
13 | life_keyreceivedvar = _keyArr;
14 | life_keyreceived = true;
15 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_addContainer.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_addContainer.sqf
4 | Author: NiiRoZz
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | Add container in Database.
10 | */
11 | private ["_containerPos","_query","_className","_dir"];
12 | params [
13 | ["_uid","",[""]],
14 | ["_container",objNull,[objNull]]
15 | ];
16 |
17 | if (isNull _container || _uid isEqualTo "") exitWith {};
18 |
19 | _containerPos = getPosATL _container;
20 | _className = typeOf _container;
21 | _dir = [vectorDir _container, vectorUp _container];
22 |
23 | _query = format ["INSERT INTO containers (pid, pos, classname, inventory, gear, owned, dir) VALUES('%1', '%2', '%3', '""[[],0]""', '""[]""', '1', '%4')",_uid,_containerPos,_className,_dir];
24 | [_query,1] call HC_fnc_asyncCall;
25 |
26 | sleep 0.3;
27 |
28 | _query = format ["SELECT id FROM containers WHERE pos='%1' AND pid='%2' AND owned='1'",_containerPos,_uid];
29 | _queryResult = [_query,2] call HC_fnc_asyncCall;
30 |
31 | _container setVariable ["container_id",(_queryResult select 0),true];
32 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_addHouse.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_addHouse.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | Blah
10 | */
11 | private ["_housePos","_query"];
12 | params [
13 | ["_uid","",[""]],
14 | ["_house",objNull,[objNull]]
15 | ];
16 | if (isNull _house || _uid isEqualTo "") exitWith {};
17 |
18 | _housePos = getPosATL _house;
19 |
20 | _query = format ["INSERT INTO houses (pid, pos, owned) VALUES('%1', '%2', '1')",_uid,_housePos];
21 | [_query,1] call HC_fnc_asyncCall;
22 |
23 | sleep 0.3;
24 |
25 | _query = format ["SELECT id FROM houses WHERE pos='%1' AND pid='%2' AND owned='1'",_housePos,_uid];
26 | _queryResult = [_query,2] call HC_fnc_asyncCall;
27 |
28 | _house setVariable ["house_id",(_queryResult select 0),true];
29 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_deleteDBContainer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_deleteDBContainer.sqf
3 | Author: NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Delete Container and remove Container in Database
9 | */
10 | private ["_house","_houseID","_ownerID","_housePos","_query","_radius","_containers"];
11 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
12 | if (isNull _container) exitWith {diag_log "container null";};
13 |
14 | _containerID = _container getVariable ["container_id",-1];
15 | if (_containerID isEqualTo -1) then {
16 | _containerPos = getPosATL _container;
17 | _ownerID = (_container getVariable "container_owner") select 0;
18 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE pid='%1' AND pos='%2' AND owned='1'",_ownerID,_containerPos];
19 | } else {
20 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE id='%1'",_containerID];
21 | };
22 | _container setVariable ["container_id",nil,true];
23 | _container setVariable ["container_owner",nil,true];
24 |
25 | [_query,1] call HC_fnc_asyncCall;
26 |
27 | ["CALL deleteOldContainers",1] call HC_fnc_asyncCall;
28 | deleteVehicle _container;
29 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_houseGarage.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_houseGarage.sqf
4 | Author: BoGuu
5 | Description:
6 | Database functionality for house garages - HC
7 | */
8 |
9 | params [
10 | ["_uid","",[""]],
11 | ["_house",objNull,[objNull]],
12 | ["_mode",-1,[0]]
13 | ];
14 |
15 | if (_uid isEqualTo "") exitWith {};
16 | if (isNull _house) exitWith {};
17 | if (_mode isEqualTo -1) exitWith {};
18 |
19 | private _housePos = getPosATL _house;
20 | private "_query";
21 |
22 | if (_mode isEqualTo 0) then {
23 | _query = format ["UPDATE houses SET garage='1' WHERE pid='%1' AND pos='%2'",_uid,_housePos];
24 | } else {
25 | _query = format ["UPDATE houses SET garage='0' WHERE pid='%1' AND pos='%2'",_uid,_housePos];
26 | };
27 |
28 | if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then {
29 | diag_log format ["Query: %1",_query];
30 | };
31 |
32 | [_query,1] call DB_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_sellHouse.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_sellHouse.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Used in selling the house, sets the owned to 0 and will cleanup with a
9 | stored procedure on restart.
10 | */
11 | private ["_house","_houseID","_ownerID","_housePos","_query","_radius","_containers"];
12 | _house = [_this,0,objNull,[objNull]] call BIS_fnc_param;
13 | if (isNull _house) exitWith {};
14 |
15 | _houseID = _house getVariable ["house_id",-1];
16 | if (_houseID isEqualTo -1) then {
17 | _housePos = getPosATL _house;
18 | _ownerID = (_house getVariable "house_owner") select 0;
19 | _query = format ["UPDATE houses SET owned='0', pos='[]' WHERE pid='%1' AND pos='%2' AND owned='1'",_ownerID,_housePos];
20 | } else {
21 | _query = format ["UPDATE houses SET owned='0', pos='[]' WHERE id='%1'",_houseID];
22 | };
23 |
24 | _house setVariable ["house_id",nil,true];
25 | _house setVariable ["house_owner",nil,true];
26 |
27 | [_query,1] call HC_fnc_asyncCall;
28 | _house setVariable ["house_sold",nil,true];
29 | ["CALL deleteOldHouses",1] call HC_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_sellHouseContainer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_sellHouseContainer.sqf
3 | Author: NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Used in selling the house, container sets the owned to 0 and will cleanup with a
9 | stored procedure on restart.
10 | */
11 | private ["_house","_houseID","_ownerID","_housePos","_query","_radius","_containers"];
12 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
13 | if (isNull _container) exitWith {};
14 |
15 | _containerID = _container getVariable ["container_id",-1];
16 | if (_containerID isEqualTo -1) then {
17 | _containerPos = getPosATL _container;
18 | _ownerID = (_container getVariable "container_owner") select 0;
19 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE pid='%1' AND pos='%2' AND owned='1'",_ownerID,_containerPos];
20 | } else {
21 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE id='%1'",_containerID];
22 | };
23 |
24 | _container setVariable ["container_id",nil,true];
25 | _container setVariable ["container_owner",nil,true];
26 | deleteVehicle _container;
27 |
28 | [_query,1] call HC_fnc_asyncCall;
29 | ["CALL deleteOldContainers",1] call HC_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_updateHouseContainers.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_updateHouseContainers.sqf
3 | Author: NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Update inventory "i" in container
9 | */
10 | private ["_containerID","_containers","_query","_vehItems","_vehMags","_vehWeapons","_vehBackpacks","_cargo"];
11 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
12 | if (isNull _container) exitWith {};
13 | _containerID = _container getVariable ["container_id",-1];
14 | if (_houseID isEqualTo -1) exitWith {};
15 |
16 | _vehItems = getItemCargo _container;
17 | _vehMags = getMagazineCargo _container;
18 | _vehWeapons = getWeaponCargo _container;
19 | _vehBackpacks = getBackpackCargo _container;
20 | _cargo = [_vehItems,_vehMags,_vehWeapons,_vehBackpacks];
21 |
22 | _cargo = [_cargo] call HC_fnc_mresArray;
23 |
24 | _query = format ["UPDATE containers SET gear='%1' WHERE id='%2'",_cargo,_containerID];
25 |
26 | [_query,1] call HC_fnc_asyncCall;
27 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Housing/fn_updateHouseTrunk.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_updateHouseTrunk.sqf
3 | Author: NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Update inventory "y" in container
9 | */
10 | private ["_house"];
11 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
12 | if (isNull _container) exitWith {};
13 |
14 | _trunkData = _container getVariable ["Trunk",[[],0]];
15 | _containerID = _container getVariable ["container_id",-1];
16 |
17 | if (_containerID isEqualTo -1) exitWith {}; //Dafuq?
18 |
19 | _trunkData = [_trunkData] call HC_fnc_mresArray;
20 | _query = format ["UPDATE containers SET inventory='%1' WHERE id='%2'",_trunkData,_containerID];
21 |
22 | [_query,1] call HC_fnc_asyncCall;
23 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Items/fn_spikeStrip.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_spikeStrip.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | This is the server-side part of it which constantly monitors the spike strip and vehicles near it.
10 | First originally tried triggers but I was never any good at those nor do I like them as they
11 | have a global effect.
12 | */
13 | private ["_nearVehicles","_spikeStrip"];
14 | _spikeStrip = [_this,0,objNull,[objNull]] call BIS_fnc_param;
15 | if (isNull _spikeStrip) exitWith {}; //Bad vehicle type passed.
16 |
17 | waitUntil {_nearVehicles = nearestObjects[getPos _spikeStrip,["Car"],5]; count _nearVehicles > 0 || isNull _spikeStrip};
18 |
19 | if (isNull _spikeStrip) exitWith {}; //It was picked up?
20 | _vehicle = _nearVehicles select 0;
21 |
22 | if (isNil "_vehicle") exitWith {deleteVehicle _spikeStrip;};
23 | [_vehicle] remoteExec ["life_fnc_spikeStripEffect",_vehicle];
24 | deleteVehicle _spikeStrip;
--------------------------------------------------------------------------------
/life_hc/MySQL/Jail/fn_jailSys.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_jailSys.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | I forget?
10 | */
11 | private ["_unit","_bad","_ret"];
12 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
13 | if (isNull _unit) exitWith {};
14 | _bad = [_this,1,false,[false]] call BIS_fnc_param;
15 |
16 | _ret = [_unit] call HC_fnc_wantedPerson;
17 | [_ret,_bad] remoteExec ["life_fnc_jailMe",_unit];
--------------------------------------------------------------------------------
/life_hc/MySQL/PlayTime/fn_getPlayTime.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_getPlayTime.sqf
3 | Author : NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description :
8 | Gets playtime for player with UID
9 |
10 | GATHERED - Loaded from DB and NOT changed
11 | JOIN - Time, the player joined - the newly gathered playtime will be calculated using difference
12 |
13 | */
14 |
15 | private ["_uid", "_time_gathered", "_time_join","_time"];
16 |
17 | _uid = _this select 0;
18 | _time_gathered = nil;
19 | _time_join = nil;
20 |
21 | {
22 | if ((_x select 0) isEqualTo _uid) exitWith {
23 | _time_gathered = _x select 1;
24 | _time_join = _x select 2;
25 | };
26 | } forEach TON_fnc_playtime_values;
27 |
28 | if (isNil "_time_gathered" || isNil "_time_join") then {
29 | _time_gathered = 0;
30 | _time_join = time;
31 | TON_fnc_playtime_values pushBack [_uid, _time_gathered, _time_join];
32 | };
33 |
34 | publicVariable "TON_fnc_playtime_values";
35 |
36 | _time = (time - _time_join); //return time
37 | _time = _time + _time_gathered;
38 | _time = round (_time/60);
39 |
40 | _time;
--------------------------------------------------------------------------------
/life_hc/MySQL/PlayTime/fn_setPlayTime.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_setPlayTime.sqf
3 | Author : NiiRoZz
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description :
8 | Sets gathered time of player
9 |
10 | GATHERED - Loaded from DB and NOT changed
11 | JOIN - Time, the player joined - the newly gathered playtime will be calculated using difference
12 |
13 | */
14 |
15 | private ["_uid", "_time_gathered"];
16 |
17 | _uid = _this select 0;
18 | _time_gathered = ((_this select 1) * 60);
19 |
20 | //create value using get
21 | [_uid] call HC_fnc_getPlayTime;
22 |
23 | //set value no 1
24 | {
25 | if ((_x select 0) isEqualTo _uid) exitWith {
26 | _x set [1, _time_gathered];
27 | _x set [2, time];
28 | };
29 | } forEach TON_fnc_playtime_values;
--------------------------------------------------------------------------------
/life_hc/MySQL/Vehicles/fn_chopShopSell.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_chopShopSell.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | This file is for Nanou's HeadlessClient.
7 |
8 | Description:
9 | Checks whether or not the vehicle is persistent or temp and sells it.
10 | */
11 | params [
12 | ["_unit",objNull,[objNull]],
13 | ["_vehicle",objNull,[objNull]],
14 | ["_price",500,[0]]
15 | ];
16 |
17 | //Error checks
18 | if (isNull _vehicle || isNull _unit) exitWith {
19 | [] remoteExecCall ["life_fnc_chopShopSold", remoteExecutedOwner];
20 | };
21 |
22 | private _displayName = FETCH_CONFIG2(getText,"CfgVehicles",typeOf _vehicle, "displayName");
23 |
24 | private _dbInfo = _vehicle getVariable ["dbInfo",[]];
25 | if (count _dbInfo > 0) then {
26 | _dbInfo params ["_uid","_plate"];
27 | private _query = format ["UPDATE vehicles SET alive='0' WHERE pid='%1' AND plate='%2'",_uid,_plate];
28 | [_query,1] call HC_fnc_asyncCall;
29 | };
30 |
31 | deleteVehicle _vehicle;
32 |
33 | [_price,_displayName] remoteExecCall ["life_fnc_chopShopSold", remoteExecutedOwner];
--------------------------------------------------------------------------------
/life_hc/MySQL/Vehicles/fn_vehicleCreate.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleCreate.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Answers the query request to create the vehicle in the database.
9 | */
10 | private ["_uid","_side","_type","_classname","_color","_plate"];
11 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
12 | _side = [_this,1,sideUnknown,[west]] call BIS_fnc_param;
13 | _vehicle = [_this,2,objNull,[objNull]] call BIS_fnc_param;
14 | _color = [_this,3,-1,[0]] call BIS_fnc_param;
15 |
16 | //Error checks
17 | if (_uid isEqualTo "" || _side isEqualTo sideUnknown || isNull _vehicle) exitWith {};
18 | if (!alive _vehicle) exitWith {};
19 | _className = typeOf _vehicle;
20 | _type = switch (true) do {
21 | case (_vehicle isKindOf "Car"): {"Car"};
22 | case (_vehicle isKindOf "Air"): {"Air"};
23 | case (_vehicle isKindOf "Ship"): {"Ship"};
24 | };
25 |
26 | _side = switch (_side) do {
27 | case west:{"cop"};
28 | case civilian: {"civ"};
29 | case independent: {"med"};
30 | default {"Error"};
31 | };
32 |
33 | _plate = round(random(1000000));
34 |
35 | [_uid,_side,_type,_classname,_color,_plate] call HC_fnc_insertVehicle;
36 |
37 | _vehicle setVariable ["dbInfo",[_uid,_plate],true];
38 |
--------------------------------------------------------------------------------
/life_hc/MySQL/Vehicles/fn_vehicleDelete.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleDelete.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | This file is for Nanou's HeadlessClient.
6 |
7 | Description:
8 | Doesn't actually delete since we don't give our DB user that type of
9 | access so instead we set it to alive=0 so it never shows again.
10 | */
11 | diag_log "Script VehicleDelete HC";
12 | private ["_vid","_sp","_pid","_query","_sql","_type","_thread"];
13 | _vid = [_this,0,-1,[0]] call BIS_fnc_param;
14 | _pid = [_this,1,"",[""]] call BIS_fnc_param;
15 | _sp = [_this,2,2500,[0]] call BIS_fnc_param;
16 | _unit = [_this,3,objNull,[objNull]] call BIS_fnc_param;
17 | _type = [_this,4,"",[""]] call BIS_fnc_param;
18 |
19 | if (_vid isEqualTo -1 || _pid isEqualTo "" || _sp isEqualTo 0 || isNull _unit || _type isEqualTo "") exitWith {};
20 |
21 | _query = format ["UPDATE vehicles SET alive='0' WHERE pid='%1' AND id='%2'",_pid,_vid];
22 |
23 | _thread = [_query,1] call HC_fnc_asyncCall;
24 |
--------------------------------------------------------------------------------
/life_hc/MySQL/WantedSystem/fn_wantedPerson.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedPerson.sqf
3 | Author: Bryan "Tonic" Boardwine"
4 | Database Persistence By: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | This file is for Nanou's HeadlessClient.
9 |
10 | Description:
11 | Fetches a specific person from the wanted array.
12 | */
13 | params [
14 | ["_unit",objNull,[objNull]]
15 | ];
16 | if (isNull _unit) exitWith {[]};
17 |
18 | private _uid = getPlayerUID _unit;
19 | private _query = format ["SELECT wantedID, wantedName, wantedBounty FROM wanted WHERE active='1' AND wantedID='%1'",_uid];
20 | private _queryResult = [_query,2] call HC_fnc_asyncCall;
21 |
22 | _queryResult;
23 |
--------------------------------------------------------------------------------
/life_hc/MySQL/WantedSystem/fn_wantedProfUpdate.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_hc\hc_macros.hpp"
2 | /*
3 | File: fn_wantedProfUpdate.sqf
4 | Author: [midgetgrimm]
5 | Persistence by: ColinM
6 |
7 | This file is for Nanou's HeadlessClient.
8 |
9 | Description:
10 | Updates name of player if they change profiles
11 | */
12 | private ["_uid","_name","_query","_tickTime","_wantedCheck","_wantedQuery"];
13 |
14 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
15 | _name = [_this,1,"",[""]] call BIS_fnc_param;
16 | //Bad data check
17 | if (_uid isEqualTo "" || _name isEqualTo "") exitWith {};
18 |
19 | _wantedCheck = format ["SELECT wantedName FROM wanted WHERE wantedID='%1'",_uid];
20 | _wantedQuery = [_wantedCheck,2] call HC_fnc_asyncCall;
21 | if (_wantedQuery isEqualTo []) exitWith {};
22 | _wantedQuery = call compile format ["%1",_wantedQuery];
23 |
24 | if !(_name isEqualTo (_wantedQuery select 0)) then {
25 | _query = format ["UPDATE wanted SET wantedName='%1' WHERE wantedID='%2'",_name,_uid];
26 | [_query,2] call HC_fnc_asyncCall;
27 | };
28 |
--------------------------------------------------------------------------------
/life_hc/MySQL/WantedSystem/fn_wantedRemove.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedRemove.sqf
3 | Author: Bryan "Tonic" Boardwine"
4 | Database Persistence By: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | This file is for Nanou's HeadlessClient.
9 |
10 | Description:
11 | Removes a person from the wanted list.
12 | */
13 | private ["_uid","_query"];
14 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
15 | if (_uid isEqualTo "") exitWith {}; //Bad data
16 |
17 | _query = format ["UPDATE wanted SET active = '0', wantedCrimes = '[]', wantedBounty = 0 WHERE wantedID='%1'",_uid];
18 | [_query,2] call HC_fnc_asyncCall;
19 |
--------------------------------------------------------------------------------
/life_hc/PboPrefix.txt:
--------------------------------------------------------------------------------
1 | life_hc
--------------------------------------------------------------------------------
/life_server/Functions/Actions/fn_pickupAction.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_pickupAction.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Validates that the cash is not a lie
8 | */
9 | params [
10 | ["_obj",objNull,[objNull]],
11 | ["_client",objNull,[objNull]],
12 | ["_cash",false,[true]]
13 | ];
14 |
15 | if (isNull _obj || {isNull _client}) exitWith {systemChat "Obj or client is null?";}; //No.
16 | if (!(_obj getVariable ["inUse",false])) exitWith {
17 | _client = owner _client;
18 | _obj setVariable ["inUse",true,true];
19 | if (_cash) then {
20 | _obj remoteExecCall ["life_fnc_pickupMoney",_client];
21 | } else {
22 | _obj remoteExecCall ["life_fnc_pickupItem",_client];
23 | };
24 | };
--------------------------------------------------------------------------------
/life_server/Functions/Gangs/fn_queryPlayerGang.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_queryPlayerGang.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Queries to see if the player belongs to any gang.
7 | */
8 | private ["_query","_queryResult"];
9 |
10 | _query = format ["SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE '%2%1%2'",_this,"%"];
11 |
12 | _queryResult = [_query,2] call DB_fnc_asyncCall;
13 |
14 | if !(count _queryResult isEqualTo 0) then {
15 | _tmp = [_queryResult select 5] call DB_fnc_mresToArray;
16 | if (_tmp isEqualType "") then {_tmp = call compile format ["%1", _tmp];};
17 | _queryResult set[5, _tmp];
18 | };
19 | missionNamespace setVariable [format ["gang_%1",_this],_queryResult];
20 |
--------------------------------------------------------------------------------
/life_server/Functions/Gangs/fn_removeGang.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_removeGang.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Removes gang from database
8 | */
9 | private ["_group","_groupID"];
10 | _group = param [0,grpNull,[grpNull]];
11 | if (isNull _group) exitWith {};
12 |
13 | _groupID = _group getVariable ["gang_id",-1];
14 | if (_groupID isEqualTo -1) exitWith {};
15 |
16 | _group setVariable ["gang_owner",nil,true];
17 | [format ["UPDATE gangs SET active='0' WHERE id='%1'",_groupID],1] call DB_fnc_asyncCall;
18 |
19 | [_group] remoteExecCall ["life_fnc_gangDisbanded",(units _group)];
20 | waitUntil {(units _group) isEqualTo []};
21 | deleteGroup _group;
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_addContainer.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_addContainer.sqf
4 | Author: NiiRoZz
5 |
6 | Description:
7 | Add container in Database.
8 | */
9 | private ["_containerPos","_query","_className","_dir"];
10 | params [
11 | ["_uid","",[""]],
12 | ["_container",objNull,[objNull]]
13 | ];
14 |
15 | if (isNull _container || _uid isEqualTo "") exitWith {};
16 |
17 | _containerPos = getPosATL _container;
18 | _className = typeOf _container;
19 | _dir = [vectorDir _container, vectorUp _container];
20 |
21 | _query = format ["INSERT INTO containers (pid, pos, classname, inventory, gear, owned, dir) VALUES('%1', '%2', '%3', '""[[],0]""', '""[]""', '1', '%4')",_uid,_containerPos,_className,_dir];
22 | if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then {
23 | diag_log format ["Query: %1",_query];
24 | };
25 |
26 | [_query,1] call DB_fnc_asyncCall;
27 |
28 | uiSleep 0.3;
29 |
30 | _query = format ["SELECT id FROM containers WHERE pos='%1' AND pid='%2' AND owned='1'",_containerPos,_uid];
31 | _queryResult = [_query,2] call DB_fnc_asyncCall;
32 | //systemChat format ["House ID assigned: %1",_queryResult select 0];
33 | _container setVariable ["container_id",(_queryResult select 0),true];
34 |
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_addHouse.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_addHouse.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Inserts the players newly bought house in the database.
8 | */
9 | private ["_housePos","_query"];
10 | params [
11 | ["_uid","",[""]],
12 | ["_house",objNull,[objNull]]
13 | ];
14 | if (isNull _house || _uid isEqualTo "") exitWith {};
15 |
16 | _housePos = getPosATL _house;
17 |
18 | _query = format ["INSERT INTO houses (pid, pos, owned) VALUES('%1', '%2', '1')",_uid,_housePos];
19 | if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then {
20 | diag_log format ["Query: %1",_query];
21 | };
22 |
23 | [_query,1] call DB_fnc_asyncCall;
24 |
25 | uiSleep 0.3;
26 |
27 | _query = format ["SELECT id FROM houses WHERE pos='%1' AND pid='%2' AND owned='1'",_housePos,_uid];
28 | _queryResult = [_query,2] call DB_fnc_asyncCall;
29 | //systemChat format ["House ID assigned: %1",_queryResult select 0];
30 | _house setVariable ["house_id",(_queryResult select 0),true];
31 |
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_deleteDBContainer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_deleteDBContainer.sqf
3 | Author: NiiRoZz
4 |
5 | Description:
6 | Delete Container and remove Container in Database
7 | */
8 | private ["_house","_houseID","_ownerID","_housePos","_query","_radius","_containers"];
9 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _container) exitWith {diag_log "container null";};
11 |
12 | _containerID = _container getVariable ["container_id",-1];
13 | if (_containerID isEqualTo -1) then {
14 | _containerPos = getPosATL _container;
15 | _ownerID = (_container getVariable "container_owner") select 0;
16 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE pid='%1' AND pos='%2' AND owned='1'",_ownerID,_containerPos];
17 | //systemChat format [":SERVER:sellHouse: container_id does not exist"];
18 | } else {
19 | //systemChat format [":SERVER:sellHouse: house_id is %1",_houseID];
20 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE id='%1'",_containerID];
21 | };
22 | _container setVariable ["container_id",nil,true];
23 | _container setVariable ["container_owner",nil,true];
24 |
25 | [_query,1] call DB_fnc_asyncCall;
26 |
27 | ["CALL deleteOldContainers",1] call DB_fnc_asyncCall;
28 | deleteVehicle _container;
29 |
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_houseCleanup.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_houseCleanup.sqf
3 | Author: NiiRoZz
4 |
5 | Description:
6 | Cleans up containers inside in house of player.
7 | */
8 | params [
9 | ["_uid","",[""]]
10 | ];
11 |
12 | private _query = format ["SELECT pos FROM containers WHERE pid='%1' AND owned='1'",_uid];
13 | private _containers = [_query,2,true] call DB_fnc_asyncCall;
14 |
15 | {
16 | _x params ["_pos"];
17 | _pos = parseSimpleArray _pos;
18 | {
19 | deleteVehicle _x;
20 | } forEach (nearestObjects[_pos,["Box_IND_Grenades_F","B_supplyCrate_F"],12]);
21 | } forEach _containers;
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_houseGarage.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_houseGarage.sqf
4 | Author: BoGuu
5 | Description:
6 | Database functionality for house garages.
7 | */
8 |
9 | params [
10 | ["_uid","",[""]],
11 | ["_house",objNull,[objNull]],
12 | ["_mode",-1,[0]]
13 | ];
14 |
15 | if (_uid isEqualTo "") exitWith {};
16 | if (isNull _house) exitWith {};
17 | if (_mode isEqualTo -1) exitWith {};
18 |
19 | private _housePos = getPosATL _house;
20 | private "_query";
21 |
22 | if (_mode isEqualTo 0) then {
23 | _query = format ["UPDATE houses SET garage='1' WHERE pid='%1' AND pos='%2'",_uid,_housePos];
24 | } else {
25 | _query = format ["UPDATE houses SET garage='0' WHERE pid='%1' AND pos='%2'",_uid,_housePos];
26 | };
27 |
28 | if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then {
29 | diag_log format ["Query: %1",_query];
30 | };
31 |
32 | [_query,1] call DB_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_sellHouseContainer.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_sellHouseContainer.sqf
3 | Author: NiiRoZz
4 |
5 | Description:
6 | Used in selling the house, container sets the owned to 0 and will cleanup with a
7 | stored procedure on restart.
8 | */
9 | private ["_house","_houseID","_ownerID","_housePos","_query","_radius","_containers"];
10 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 | if (isNull _container) exitWith {};
12 |
13 | _containerID = _container getVariable ["container_id",-1];
14 | if (_containerID isEqualTo -1) then {
15 | _containerPos = getPosATL _container;
16 | _ownerID = (_container getVariable "container_owner") select 0;
17 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE pid='%1' AND pos='%2' AND owned='1'",_ownerID,_containerPos];
18 | } else {
19 | _query = format ["UPDATE containers SET owned='0', pos='[]' WHERE id='%1'",_containerID];
20 | };
21 |
22 | _container setVariable ["container_id",nil,true];
23 | _container setVariable ["container_owner",nil,true];
24 | deleteVehicle _container;
25 |
26 | [_query,1] call DB_fnc_asyncCall;
27 | ["CALL deleteOldContainers",1] call DB_fnc_asyncCall;
28 |
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_updateHouseContainers.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_updateHouseContainers.sqf
3 | Author: NiiRoZz
4 |
5 | Description:
6 | Update inventory "i" in container
7 | */
8 | private ["_containerID","_containers","_query","_vehItems","_vehMags","_vehWeapons","_vehBackpacks","_cargo"];
9 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _container) exitWith {};
11 | _containerID = _container getVariable ["container_id",-1];
12 | if (_containerID isEqualTo -1) exitWith {};
13 |
14 | _vehItems = getItemCargo _container;
15 | _vehMags = getMagazineCargo _container;
16 | _vehWeapons = getWeaponCargo _container;
17 | _vehBackpacks = getBackpackCargo _container;
18 | _cargo = [_vehItems,_vehMags,_vehWeapons,_vehBackpacks];
19 |
20 | _cargo = [_cargo] call DB_fnc_mresArray;
21 |
22 | _query = format ["UPDATE containers SET gear='%1' WHERE id='%2'",_cargo,_containerID];
23 |
24 | [_query,1] call DB_fnc_asyncCall;
25 |
--------------------------------------------------------------------------------
/life_server/Functions/Housing/fn_updateHouseTrunk.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_updateHouseTrunk.sqf
3 | Author: NiiRoZz
4 |
5 | Description:
6 | Update inventory "y" in container
7 | */
8 | private ["_house"];
9 | _container = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | if (isNull _container) exitWith {};
11 |
12 | _trunkData = _container getVariable ["Trunk",[[],0]];
13 | _containerID = _container getVariable ["container_id",-1];
14 |
15 | if (_containerID isEqualTo -1) exitWith {}; //Dafuq?
16 |
17 | _trunkData = [_trunkData] call DB_fnc_mresArray;
18 | _query = format ["UPDATE containers SET inventory='%1' WHERE id='%2'",_trunkData,_containerID];
19 |
20 | [_query,1] call DB_fnc_asyncCall;
21 |
--------------------------------------------------------------------------------
/life_server/Functions/Jail/fn_jailSys.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_jailSys.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | I forget?
8 | */
9 | private ["_unit","_bad","_id","_ret"];
10 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
11 | if (isNull _unit) exitWith {};
12 | _bad = [_this,1,false,[false]] call BIS_fnc_param;
13 | _id = owner _unit;
14 |
15 | _ret = [_unit] call life_fnc_wantedPerson;
16 | [_ret,_bad] remoteExec ["life_fnc_jailMe",_id];
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_bool.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_bool.sqf
3 | Author: TAW_Tonic
4 |
5 | Description:
6 | Handles bool conversion for MySQL since MySQL doesn't support 'true' or 'false'
7 | instead MySQL uses Tinyint for BOOLEAN (0 = false, 1 = true)
8 | */
9 | private ["_bool","_mode"];
10 | _bool = [_this,0,0,[false,0]] call BIS_fnc_param;
11 | _mode = [_this,1,0,[0]] call BIS_fnc_param;
12 |
13 | switch (_mode) do {
14 | case 0: {
15 | if (_bool isEqualType 0) exitWith {0};
16 | if (_bool) then {1} else {0};
17 | };
18 |
19 | case 1: {
20 | if (!(_bool isEqualType 0)) exitWith {false};
21 | switch (_bool) do {
22 | case 0: {false};
23 | case 1: {true};
24 | };
25 | };
26 | };
27 |
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_insertVehicle.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_insertVehicle.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Inserts the vehicle into the database
7 | */
8 | private ["_query","_sql"];
9 | params [
10 | "_uid",
11 | "_side",
12 | "_type",
13 | "_className",
14 | ["_color",-1,[0]],
15 | ["_plate",-1,[0]]
16 | ];
17 |
18 | //Stop bad data being passed.
19 | if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo -1) exitWith {};
20 |
21 | _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""')",_side,_className,_type,_uid,_color,_plate];
22 |
23 |
24 | [_query,1] call DB_fnc_asyncCall;
25 |
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_mresArray.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresArray.sqf
3 | Author: Bryan "Tonic" Boardwine";
4 |
5 | Description:
6 | Acts as a mres (MySQL Real Escape) for arrays so they
7 | can be properly inserted into the database without causing
8 | any problems. The return method is 'hacky' but it's effective.
9 | */
10 | private ["_array"];
11 | _array = [_this,0,[],[[]]] call BIS_fnc_param;
12 | _array = str _array;
13 | _array = toArray(_array);
14 |
15 | for "_i" from 0 to (count _array)-1 do
16 | {
17 | _sel = _array select _i;
18 | if (!(_i isEqualTo 0) && !(_i isEqualTo ((count _array)-1))) then
19 | {
20 | if (_sel isEqualTo 34) then
21 | {
22 | _array set[_i,96];
23 | };
24 | };
25 | };
26 |
27 | str(toString(_array));
28 |
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_mresString.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresString.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Makes the string safe to be passed to MySQL (strips various stuff).
7 | */
8 | private ["_string","_filter"];
9 | _string = [_this,0,"",[""]] call BIS_fnc_param;
10 | _filter = "'/\`:|;,{}-""<>";
11 |
12 | _string = toArray _string; //Blow it up to an array
13 | _filter = toArray _filter; //Blow it up to an array
14 |
15 | {
16 | if (_x in _filter) then {
17 | _string deleteAt _forEachIndex;
18 | };
19 | } forEach _string;
20 |
21 | toString _string;
22 |
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_mresToArray.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_mresToArray.sqf
3 | Author: Bryan "Tonic" Boardwine";
4 |
5 | Description:
6 | Acts as a mres (MySQL Real Escape) for arrays so they
7 | can be properly inserted into the database without causing
8 | any problems. The return method is 'hacky' but it's effective.
9 | */
10 | private ["_array"];
11 | _array = [_this,0,"",[""]] call BIS_fnc_param;
12 | if (_array isEqualTo "") exitWith {[]};
13 | _array = toArray(_array);
14 |
15 | for "_i" from 0 to (count _array)-1 do
16 | {
17 | _sel = _array select _i;
18 | if (_sel == 96) then
19 | {
20 | _array set[_i,39];
21 | };
22 | };
23 |
24 | _array = toString(_array);
25 | _array = call compile format ["%1", _array];
26 | _array;
--------------------------------------------------------------------------------
/life_server/Functions/MySQL/fn_numberSafe.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_numberSafe.sqf
3 | Author: Karel Moricky
4 |
5 | Description:
6 | Convert a number into string (avoiding scientific notation)
7 |
8 | Parameter(s):
9 | _this: NUMBER
10 |
11 | Returns:
12 | STRING
13 | */
14 | private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
15 |
16 | _number = [_this,0,0,[0]] call bis_fnc_param;
17 | _mod = [_this,1,3,[0]] call bis_fnc_param;
18 |
19 | _digits = _number call bis_fnc_numberDigits;
20 | _digitsCount = count _digits - 1;
21 |
22 | _modBase = _digitsCount % _mod;
23 | _numberText = "";
24 | {
25 | _numberText = _numberText + str _x;
26 | if ((_foreachindex - _modBase) % (_mod) isEqualTo 0 && !(_foreachindex isEqualTo _digitsCount)) then {_numberText = _numberText + "";};
27 | } forEach _digits;
28 | _numberText
29 |
--------------------------------------------------------------------------------
/life_server/Functions/PlayTime/fn_getPlayTime.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_getPlayTime.sqf
3 | Author : NiiRoZz
4 |
5 | Description :
6 | Gets playtime for player with UID
7 |
8 | GATHERED - Loaded from DB and NOT changed
9 | JOIN - Time, the player joined - the newly gathered playtime will be calculated using difference
10 |
11 | */
12 |
13 | private ["_uid", "_time_gathered", "_time_join","_time"];
14 |
15 | _uid = _this select 0;
16 | _time_gathered = nil;
17 | _time_join = nil;
18 |
19 | {
20 | if ((_x select 0) isEqualTo _uid) exitWith {
21 | _time_gathered = _x select 1;
22 | _time_join = _x select 2;
23 | };
24 | } forEach TON_fnc_playtime_values;
25 |
26 | if (isNil "_time_gathered" || isNil "_time_join") then {
27 | _time_gathered = 0;
28 | _time_join = time;
29 | TON_fnc_playtime_values pushBack [_uid, _time_gathered, _time_join];
30 | };
31 |
32 | publicVariable "TON_fnc_playtime_values";
33 |
34 | _time = (time - _time_join); //return time
35 | _time = _time + _time_gathered;
36 | _time = round (_time/60);
37 |
38 | _time;
--------------------------------------------------------------------------------
/life_server/Functions/PlayTime/fn_setPlayTime.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File : fn_setPlayTime.sqf
3 | Author : NiiRoZz
4 |
5 | Description :
6 | Sets gathered time of player
7 |
8 | GATHERED - Loaded from DB and NOT changed
9 | JOIN - Time, the player joined - the newly gathered playtime will be calculated using difference
10 |
11 | */
12 |
13 | private ["_uid", "_time_gathered"];
14 |
15 | _uid = _this select 0;
16 | _time_gathered = ((_this select 1) * 60);
17 |
18 | //create value using get
19 | [_uid] call TON_fnc_getPlayTime;
20 |
21 | //set value no 1
22 | {
23 | if ((_x select 0) isEqualTo _uid) exitWith {
24 | _x set [1, _time_gathered];
25 | _x set [2, time];
26 | };
27 | } forEach TON_fnc_playtime_values;
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_chopShopSell.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_chopShopSell.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Checks whether or not the vehicle is persistent or temp and sells it.
8 | */
9 | params [
10 | ["_unit",objNull,[objNull]],
11 | ["_vehicle",objNull,[objNull]],
12 | ["_price",500,[0]]
13 | ];
14 |
15 | //Error checks
16 | if (isNull _vehicle || isNull _unit) exitWith {
17 | [] remoteExecCall ["life_fnc_chopShopSold", remoteExecutedOwner];
18 | };
19 |
20 | private _displayName = FETCH_CONFIG2(getText,"CfgVehicles",typeOf _vehicle, "displayName");
21 |
22 | private _dbInfo = _vehicle getVariable ["dbInfo",[]];
23 | if (count _dbInfo > 0) then {
24 | _dbInfo params ["_uid","_plate"];
25 | private _query = format ["UPDATE vehicles SET alive='0' WHERE pid='%1' AND plate='%2'",_uid,_plate];
26 | [_query,1] call DB_fnc_asyncCall;
27 | };
28 |
29 | deleteVehicle _vehicle;
30 |
31 | [_price,_displayName] remoteExecCall ["life_fnc_chopShopSold", remoteExecutedOwner];
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_cleanupRequest.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_cleanupRequest.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Client sends a cleanup request when they hit Abort,
7 | the server will then monitor when that client aborts and
8 | delete the weapon holders.
9 | */
10 | private ["_client","_loops"];
11 | _client = [_this,0,objNull,[objNull]] call BIS_fnc_param;
12 | if (isNull _client) exitWith {};
13 |
14 | _loops = 0;
15 | for "_i" from 0 to 1 step 0 do {
16 | if (_loops >= 25) exitWith {};
17 | if (!alive _client) exitWith {
18 | _containers = nearestObjects[(getPosATL _client),["WeaponHolderSimulated"],5];
19 | if (count _containers > 0) then {
20 | {deleteVehicle _x;} forEach _containers; //Delete the containers.
21 | };
22 | deleteVehicle _client; //Get rid of the corpse.
23 | };
24 |
25 | _loops = _loops + 1;
26 | uiSleep 1;
27 | };
28 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_entityRespawned.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_entityRespawned.sqf
3 | Author: DomT602
4 | Description:
5 | Called when a player respawns (A3 respawn)
6 | */
7 |
8 | params [
9 | ["_entity",objNull,[objNull]],
10 | ["_corpse",objNull,[objNull]]
11 | ];
12 |
13 | private _uid = getPlayerUID _entity;
14 | private _index = server_corpses findIf {(_x select 0) isEqualTo _uid};
15 |
16 | if (_index isEqualTo -1) then {
17 | server_corpses pushBack [_uid,_corpse];
18 | } else {
19 | server_corpses set [_index,[_uid,_corpse]];
20 | };
21 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_federalUpdate.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_federalUpdate.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Uhhh, adds to it?
7 | */
8 | private "_funds";
9 | for "_i" from 0 to 1 step 0 do {
10 | uiSleep (30 * 60);
11 | _funds = fed_bank getVariable ["safe",0];
12 | fed_bank setVariable ["safe",round(_funds+((count playableUnits)/2)),true];
13 | };
14 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_getID.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_getID.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | Used for the admin menu returns the player ID for in-game bans/kicks.
8 | https://community.bistudio.com/wiki/Multiplayer_Server_Commands
9 | */
10 | private ["_id","_ret"];
11 | _id = owner (_this select 0);
12 | _ret = owner (_this select 1);
13 |
14 | [_id] remoteExecCall ["life_fnc_adminID",_ret];
15 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_handleBlastingCharge.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | Author: GetSomePanda / Panda
3 | SteamID: 76561198145366418
4 | File Name: fn_handleBlastingCharge.sqf
5 | Information: Nothing really special, just handles the fed explosion over the server so if the client who place the charge logs out it still blows up.
6 | */
7 | private ["_bomb","_time"];
8 | _time = time + (5 * 60);
9 | waitUntil{(round(_time - time) < 1)};
10 | sleep 0.9;
11 | if (!(fed_bank getVariable["chargeplaced",false])) exitWith {};
12 |
13 | _bomb = "Bo_GBU12_LGB_MI10" createVehicle [getPosATL fed_bank select 0, getPosATL fed_bank select 1, (getPosATL fed_bank select 2)+0.5];
14 | fed_bank setVariable ["chargeplaced",false,true];
15 | fed_bank setVariable ["safe_open",true,true];
16 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_manageSC.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_manageSC.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | User management of whether or not they want to be on a sidechat for their side.
7 | */
8 | private ["_unit","_bool","_side"];
9 | _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
10 | _bool = [_this,1,false,[false]] call BIS_fnc_param;
11 | _side = [_this,2,civilian,[west]] call BIS_fnc_param;
12 |
13 | if (isNull _unit) exitWith {};
14 |
15 | switch (_side) do {
16 | case west: {
17 | if (_bool) then {
18 | life_radio_west radioChannelAdd [_unit];
19 | } else {
20 | life_radio_west radioChannelRemove [_unit];
21 | };
22 | };
23 |
24 | case civilian: {
25 | if (_bool) then {
26 | life_radio_civ radioChannelAdd [_unit];
27 | } else {
28 | life_radio_civ radioChannelRemove [_unit];
29 | };
30 | };
31 |
32 | case independent: {
33 | if (_bool) then {
34 | life_radio_indep radioChannelAdd [_unit];
35 | } else {
36 | life_radio_indep radioChannelRemove [_unit];
37 | };
38 | };
39 | };
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_recupKeyForHC.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_recupKeyForHC.sqf
4 | Author : NiiRoZz
5 |
6 | Description:
7 | Tells the server to recup the Key of player
8 | */
9 | private ["_uid","_side"];
10 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
11 | _side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param;
12 | if (_uid isEqualTo "") exitWith {}; //NULL
13 | _keyArr = missionNamespace getVariable [format ["%1_KEYS_%2",_uid,_side],[]];
14 | [_keyArr] remoteExecCall ["HC_fnc_receivekeyofServer",HC_Life];
15 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_spikeStrip.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_spikeStrip.sqf
4 | Author: Bryan "Tonic" Boardwine
5 |
6 | Description:
7 | This is the server-side part of it which constantly monitors the spike strip and vehicles near it.
8 | First originally tried triggers but I was never any good at those nor do I like them as they
9 | have a global effect.
10 | */
11 | private ["_nearVehicles","_spikeStrip"];
12 | _spikeStrip = [_this,0,objNull,[objNull]] call BIS_fnc_param;
13 | if (isNull _spikeStrip) exitWith {}; //Bad vehicle type passed.
14 |
15 | waitUntil {_nearVehicles = nearestObjects[getPos _spikeStrip,["Car"],5]; count _nearVehicles > 0 || isNull _spikeStrip};
16 |
17 | if (isNull _spikeStrip) exitWith {}; //It was picked up?
18 | _vehicle = _nearVehicles select 0;
19 |
20 | if (isNil "_vehicle") exitWith {deleteVehicle _spikeStrip;};
21 | [_vehicle] remoteExec ["life_fnc_spikeStripEffect",_vehicle];
22 | deleteVehicle _spikeStrip;
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_terrainSort.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_terrainSort.sqf (TO BE CHANGED)
3 | Author: BoGuu
4 |
5 | Description:
6 | Gah.
7 | */
8 |
9 |
10 | if !(params[["_dictionary",[],[[],0,""]]]) exitWith {};
11 |
12 | scopeName "main";
13 |
14 | {
15 | if (worldName == _x select 0) then {
16 | (_x select 1) breakOut "main";
17 | };
18 | } count _dictionary;
19 |
20 | switch (typeName (_dictionary select 0 select 1)) do {
21 | case "ARRAY": {[]};
22 | case "STRING": {""};
23 | case "SCALAR": {-1};
24 | };
25 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_transferOwnership.sqf:
--------------------------------------------------------------------------------
1 | #include "..\..\script_macros.hpp"
2 | /*
3 |
4 | File: fn_transferOwnership.sqf
5 | Author: BoGuu
6 |
7 | Description:
8 | Transfer agent ownership to HC upon it's connection
9 |
10 | */
11 |
12 | _which = param [0,false,[false]];
13 |
14 | if (_which) then {
15 |
16 | if (!life_HC_isActive) exitWith {diag_log "ERROR: Server is trying to give AI ownership to HC when life_HC_isActive is false";};
17 | {
18 | if (!(isPlayer _x)) then {
19 | _x setOwner HC_Life; //Move agents over to HC
20 | };
21 | } forEach animals;
22 |
23 | } else {
24 |
25 | if (life_HC_isActive) exitWith {diag_log "ERROR: Server is trying to give AI ownership to back to itself when life_HC_isActive is true";};
26 | {
27 | if (!(isPlayer _x)) then {
28 | _x setOwner RSERV; //Move agents over to Server
29 | };
30 | } forEach animals;
31 |
32 | };
33 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_vehicleCreate.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleCreate.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Answers the query request to create the vehicle in the database.
7 | */
8 | private ["_uid","_side","_type","_classname","_color","_plate"];
9 | _uid = [_this,0,"",[""]] call BIS_fnc_param;
10 | _side = [_this,1,sideUnknown,[west]] call BIS_fnc_param;
11 | _vehicle = [_this,2,objNull,[objNull]] call BIS_fnc_param;
12 | _color = [_this,3,-1,[0]] call BIS_fnc_param;
13 |
14 | //Error checks
15 | if (_uid isEqualTo "" || _side isEqualTo sideUnknown || isNull _vehicle) exitWith {};
16 | if (!alive _vehicle) exitWith {};
17 | _className = typeOf _vehicle;
18 | _type = switch (true) do {
19 | case (_vehicle isKindOf "Car"): {"Car"};
20 | case (_vehicle isKindOf "Air"): {"Air"};
21 | case (_vehicle isKindOf "Ship"): {"Ship"};
22 | };
23 |
24 | _side = switch (_side) do {
25 | case west:{"cop"};
26 | case civilian: {"civ"};
27 | case independent: {"med"};
28 | default {"Error"};
29 | };
30 |
31 | _plate = round(random(1000000));
32 | [_uid,_side,_type,_classname,_color,_plate] call DB_fnc_insertVehicle;
33 |
34 | _vehicle setVariable ["dbInfo",[_uid,_plate],true];
35 |
--------------------------------------------------------------------------------
/life_server/Functions/Systems/fn_vehicleDelete.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_vehicleDelete.sqf
3 | Author: Bryan "Tonic" Boardwine
4 |
5 | Description:
6 | Doesn't actually delete since we don't give our DB user that type of
7 | access so instead we set it to alive=0 so it never shows again.
8 | */
9 | private ["_vid","_sp","_pid","_query","_type","_thread"];
10 | _vid = [_this,0,-1,[0]] call BIS_fnc_param;
11 | _pid = [_this,1,"",[""]] call BIS_fnc_param;
12 | _sp = [_this,2,2500,[0]] call BIS_fnc_param;
13 | _unit = [_this,3,objNull,[objNull]] call BIS_fnc_param;
14 | _type = [_this,4,"",[""]] call BIS_fnc_param;
15 |
16 | if (_vid isEqualTo -1 || _pid isEqualTo "" || _sp isEqualTo 0 || isNull _unit || _type isEqualTo "") exitWith {};
17 | _unit = owner _unit;
18 |
19 | _query = format ["UPDATE vehicles SET alive='0' WHERE pid='%1' AND id='%2'",_pid,_vid];
20 |
21 | _thread = [_query,1] call DB_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_server/Functions/WantedSystem/fn_wantedBounty.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedBounty.sqf
3 | Author: Bryan "Tonic" Boardwine"
4 | Database Persistence By: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | Description:
9 | Checks if the person is on the bounty list and awards the cop for killing them.
10 | */
11 | params [
12 | ["_uid","",[""]],
13 | ["_civ",objNull,[objNull]],
14 | ["_cop",objNull,[objNull]],
15 | ["_half",false,[false]]
16 | ];
17 |
18 | if (isNull _civ || isNull _cop) exitWith {};
19 |
20 | private _query = format ["SELECT wantedID, wantedName, wantedCrimes, wantedBounty FROM wanted WHERE active='1' AND wantedID='%1'",_uid];
21 | private _queryResult = [_query,2] call DB_fnc_asyncCall;
22 |
23 | private "_amount";
24 | if !(count _queryResult isEqualTo 0) then {
25 | _amount = _queryResult param [3];
26 | if !(_amount isEqualTo 0) then {
27 | if (_half) then {
28 | [((_amount) / 2),_amount] remoteExecCall ["life_fnc_bountyReceive",(owner _cop)];
29 | } else {
30 | [_amount,_amount] remoteExecCall ["life_fnc_bountyReceive",(owner _cop)];
31 | };
32 | };
33 | };
--------------------------------------------------------------------------------
/life_server/Functions/WantedSystem/fn_wantedCrimes.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_wantedCrimes.sqf
4 | Author: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | Description:
9 | Grabs a list of crimes committed by a person.
10 | */
11 | disableSerialization;
12 |
13 | params [
14 | ["_ret",objNull,[objNull]],
15 | ["_criminal",[],[]]
16 | ];
17 |
18 | private _query = format ["SELECT wantedCrimes, wantedBounty FROM wanted WHERE active='1' AND wantedID='%1'",_criminal select 0];
19 | private _queryResult = [_query,2] call DB_fnc_asyncCall;
20 |
21 | _ret = owner _ret;
22 |
23 | private _type = [_queryResult select 0] call DB_fnc_mresToArray;
24 | if (_type isEqualType "") then {_type = call compile format ["%1", _type];};
25 |
26 | private _crimesArr = [];
27 | {
28 | private _str = format ["STR_Crime_%1", _x];
29 | _crimesArr pushBack _str;
30 | false
31 | } count _type;
32 |
33 | _queryResult set[0,_crimesArr];
34 |
35 | [_queryResult] remoteExec ["life_fnc_wantedInfo",_ret];
36 |
--------------------------------------------------------------------------------
/life_server/Functions/WantedSystem/fn_wantedPerson.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedPerson.sqf
3 | Author: Bryan "Tonic" Boardwine"
4 | Database Persistence By: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | Description:
9 | Fetches a specific person from the wanted array.
10 | */
11 | private _unit = param [0,objNull,[objNull]];
12 |
13 | if (isNull _unit) exitWith {[]};
14 |
15 | private _uid = getPlayerUID _unit;
16 | private _query = format ["SELECT wantedID, wantedName, wantedBounty FROM wanted WHERE active='1' AND wantedID='%1'",_uid];
17 | private _queryResult = [_query,2] call DB_fnc_asyncCall;
18 |
19 | if (count _queryResult isEqualTo 0) exitWith {[]};
20 | _queryResult;
21 |
--------------------------------------------------------------------------------
/life_server/Functions/WantedSystem/fn_wantedProfUpdate.sqf:
--------------------------------------------------------------------------------
1 | #include "\life_server\script_macros.hpp"
2 | /*
3 | File: fn_wantedProfUpdate.sqf
4 | Author: [midgetgrimm]
5 | Persistence by: ColinM
6 | Description:
7 | Updates name of player if they change profiles
8 | */
9 | private ["_query","_tickTime","_wantedCheck","_wantedQuery"];
10 | params [
11 | ["_uid","",[""]],
12 | ["_name","",[""]]
13 | ];
14 |
15 | //Bad data check
16 | if (_uid isEqualTo "" || {_name isEqualTo ""}) exitWith {};
17 |
18 | _wantedCheck = format ["SELECT wantedName FROM wanted WHERE wantedID='%1'",_uid];
19 | _wantedQuery = [_wantedCheck,2] call DB_fnc_asyncCall;
20 | if (count _wantedQuery isEqualTo 0) exitWith {};
21 |
22 | if !(_name isEqualTo (_wantedQuery select 0)) then {
23 | _query = format ["UPDATE wanted SET wantedName='%1' WHERE wantedID='%2'",_name,_uid];
24 | [_query,2] call DB_fnc_asyncCall;
25 | };
26 |
--------------------------------------------------------------------------------
/life_server/Functions/WantedSystem/fn_wantedRemove.sqf:
--------------------------------------------------------------------------------
1 | /*
2 | File: fn_wantedRemove.sqf
3 | Author: Bryan "Tonic" Boardwine"
4 | Database Persistence By: ColinM
5 | Assistance by: Paronity
6 | Stress Tests by: Midgetgrimm
7 |
8 | Description:
9 | Removes a person from the wanted list.
10 | */
11 | private _uid = param [0,"",[""]];
12 |
13 | if (_uid isEqualTo "") exitWith {}; //Bad data
14 |
15 | private _query = format ["UPDATE wanted SET active = '0', wantedCrimes = '[]', wantedBounty = 0 WHERE wantedID='%1'",_uid];
16 | [_query,2] call DB_fnc_asyncCall;
--------------------------------------------------------------------------------
/life_server/PboPrefix.txt:
--------------------------------------------------------------------------------
1 | life_server
--------------------------------------------------------------------------------