Kevin-
Member
So I took the basis off this thread: http://opendayz.net/threads/release-bi-planes-with-m240s-on-1-7-7-1.12829/
I was tired of only starting with 100 bullets in the helicopters so I decided to attempt to just replace the vehicle class to the uh1h and mi17s anyways, my code is this...
But the issue is that it will only work for one gunner seat? So I don't really know how to specify the classname for like the crew chief seat or gunner seat.
Also it seems to be only working on helicopters that have spawned through the database, this is probably because the code that I have added was in the server_monitor.sqf... So for example lets say that I want a UH-1H that is spawned via the server.pbo, would I have to be something like...
If this would work, then would there be a better more efficient way of saying that all vehicles, will have more ammo? Anyways just some ideas and hopefully this discussion will help other players and myself in the process
I was tired of only starting with 100 bullets in the helicopters so I decided to attempt to just replace the vehicle class to the uh1h and mi17s anyways, my code is this...
Code:
if (_object isKindOf "UH1H_DZ") then {
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
};
But the issue is that it will only work for one gunner seat? So I don't really know how to specify the classname for like the crew chief seat or gunner seat.
Also it seems to be only working on helicopters that have spawned through the database, this is probably because the code that I have added was in the server_monitor.sqf... So for example lets say that I want a UH-1H that is spawned via the server.pbo, would I have to be something like...
Code:
_vehicle_99 = objNull;
if (true) then
{
_this = createVehicle ["UH1H_DZ", [worldspace here], [], 0, "CAN_COLLIDE"];
_vehicle_99 = _this;
_this setDir -50.835873;
_this setPos [worldspace here];
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
};
If this would work, then would there be a better more efficient way of saying that all vehicles, will have more ammo? Anyways just some ideas and hopefully this discussion will help other players and myself in the process