Jump to content
  • 0

[REQUEST] Armed Vehicles Keep Ammo on Restart


AG.Ndogg97

Question

Hey guys just wondering if anyone knew of a way to make vehicles with ammo loaded into them keep the ammo on restart. I was thinking this could be done by something checking if the vehicle does or doesn't have ammo 5 or so minutes before restart. Once it has checked if it does have ammo it would change the vehicle's item id to the one with ammo in ex. the LAV25_DZ has ammo and the LAV25_DZE doesn't, if the vehicle doesn't have ammo it would do vice versa. If anyone has an idea of how this could be done, knows of a already existing script, or any input I would really appreciate your help. Thank you guys for the help and appreciate any support.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

DZE_vehicleAmmo = 1;

 

and un uncomment this line in server_monitor.sqf

This line is located somewhere near 180-220

 

// _object setVehicleAmmo DZE_vehicleAmmo;

 

change it to

 

_object setVehicleAmmo DZE_vehicleAmmo;

 

 

But ATTENTION!!!! I don't know why they commented it out, but it should work...

 

xBowBii

setVehicleAmmo 0 has been reported as a bit buggy, there may of been issues when reloading some vehicles

 

Right on man thanks for the info. So this will make vehicles with ammo keep it on restart and vehicles without ammo not have ammo? Thanks man appreciate your help!

Not quite, it will just remove all vehicle ammo on restarts

Link to comment
Share on other sites

  • 0

Right on thanks for the heads up definatly won't be adding this cause the game is already buggy enough. Again appreciate your guys info and help if you need anything feel free to ask and Ill see what I can do to help. Cheers and thanks again!

Link to comment
Share on other sites

  • 0

This is actually probably something that could be done but would need a fairly extensive redesign on some server code, and I gave you some wrong info..

 

with DZE_vehicleAmmo = 1; it sets all vehicles to having ammo after restart, with 0 it just removes it all, I will take a look at some code properly and see if what you requested is indeed possible

Link to comment
Share on other sites

  • 0

Yea I'm aware of that I was wondering if there was a way that a vehicle with ammo before restart it will have it after restart and if it doesn't have ammo before restart it wouldn't have ammo after restart. Thanks again though for everyone's help and time. -AGN

Link to comment
Share on other sites

  • 0

I did actually spend some time investigating this, it is really only half possible, with the limited scripting commands of arma 2 we can only check the primary turret for ammo usage, so the vehicle magazines would either be full, or empty, and while this is still possible, it's a very painful process to get a detailed list of turret's & the assigned weapons, If someone is ambitious enough maybe they can attempt it,

I gave it a go and got as far as saving the primary turret magazine count and gave up for now  :unsure:

 

I would rather wait for arma 3, where we can use the magazinesDetail command arma 2 should of had  :angry:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...