Welcome to the Iron Front Fan Forums!
Sign up Latest Topics

  Author   Comment  

Avatar / Picture

Retired Admin/IFR
Posts: 455
Reply with quote  #1 
This little script by Larrow allows you to find out information that may be needed to remove/add magazines from various vehicle turrets and guns etc

In the init line of player
nul = [] execVM "turret_info.sqf"

Then this "turret_info.sqf"
while {alive player}do{
hinttext = "";
mags = "";
if (vehicle player == player) then {
hint "get in a vehicle to\ndisplay turret info";
myvehicle = vehicle player;
vehiclepos = assignedvehiclerole player;
turretpos = vehiclepos select 1;
weaponnames = myvehicle weaponsTurret turretpos;
hinttext = format ["Turret: %1\n",turretpos];
for "_loop" from 0 to ((count weaponnames)-1) do {
mags = getarray (configFile >> "CfgWeapons" >> (weaponnames select _loop) >> "magazines");
hinttext = hinttext + format["------------\nWeapon\n %1\n\n magazines\n",(weaponnames select _loop)];
for "_loopn" from 0 to ((count mags)-1) do {
hinttext = hinttext + format["%1\n",(mags select _loopn)];
hint hinttext;
sleep 2;

The above finds the information and gives it as hint messages, then the below is how you would use the info
vehicle addMagazineTurret [magazineName, turretPath]

Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.