dennis159 0 Posted October 25, 2020 Hey, I've got a fire system script for my (modded) Altis Life roleplay server. In the standard script there is a restriction that building fires only can be triggerd if there is a minimum ammount of medics (independet units) on the server. The code for this is: _PlayerCount = independent countSide allPlayers; if (_PlayerCount >= (getNumber(MissionconfigFile >> "Fire_Config" >> "CountOfPlayer"))) then { On my Server there are the EMS and FireDepartment both on the Independet units. So, with this code the fire also can be triggered if there are no Fire Department units on duty, what souldn't be, because the EMS is not able to extinguis the fire. To solve this problem I want to change this _PlayerCount in a way, that only firefighters are counted. Firefighters got ingame a speacial license named "license_med_fw", so we have to count all online independet units weher own the firedepartmets license. Sadly i have no Idea how to do this in the script. The Scriptfile we have to edit, is in a PBO file in our Modpack (Clientside Modpack) Has anyone any idea how to fix this? Thanks in advance! your sincerly, Dennis Share this post Link to post Share on other sites
Schatten 262 Posted October 25, 2020 @dennis159, depending on where the license is stored, the solution might look like this: _PlayerCount = { ((side (group _x)) == independent) and { _x getVariable ["license_med_fw", false] } } count allPlayers; 1 Share this post Link to post Share on other sites
ZaellixA 383 Posted October 26, 2020 Schatten is quite right in their answer, but if you don't provide more information, mainly on where the "licence" is stored (inventory, as a variable, etc.) you won't be able to get a "spot-on" answer easily. Share this post Link to post Share on other sites