Coding help with Cars, guns, ammo, food

  • Hello,

    First time poster. Just purchased my server today and am working to make life a little easier on my server.

    Here are my issues.

    1) Car Spawns-

    I have increased the number and minimums for my cars. I have gone into the spawnableitems.xml and made it so they should spawn with all the parts and only need fuel and water. Since doing this, I have found only two cars. But both have been missing parts, so they are pretty much useless for what I want them for.

    2) Food-

    Again, I have increased the spawn frequency and number for, say, peaches. That has gotten a bit better, but its still not great.

    3) Guns w/mags-

    I did a test with the glock. I increased the number of glocks and mags. I also changed the code so a made always spawns with the gun. Yet, I am still finding glocks without mags.

    Any help would be appreciated.

    I would also be willing to accept the completed files to load them into my server.

    Thanks in advance.

  • 1 - Make sure you are adding all the parts to each of the 3 cars. Ensure you are doing "1.00" and not just chance="1" />

    <attachments chance="1.00">

    <item name="CivSedanWheel" chance="1.00" />


    2 - I have had good luck in cfgrandompresets.xml, doubling the numbers set to infected and locations i.e. foodVillage, foodCity, etc. If you increase the numbers to much it has issues and can cause server perf issues.

    3- ensure you had increased the chance of the attachments. example below, in cfgspawnabletypes.xml.

    <type name="Glock19">

    <attachments chance="1.00">

    <item name="PistolSuppressor" chance="1.00" />


    <attachments chance="1.00">

    <item name="TLRLight" chance="1.00" />


    <attachments chance="1.00">

    <item name="Mag_Glock_15Rnd" chance="1.00" />



    Best of luck. and as always, best to make the changes with the server stopped, and give it a minute after saving changes before starting it back up. If you log in and things still arent as they should, try a restart.