Jump to content
The latest updated version of RAGE Plugin Hook, required to play LSPDFR, can be found inside the LSPDFR download. It is not currently available on the RAGE Plugin Hook website.

How do I get addon cars to spawn as backup units?


Recommended Posts

So im having a little trouble with turning my add on car into an AI car threw my Duty selection.XML, Agency.XML, and i have also tried putting it in the 3 ultimate XML files. "Custom, Default, or Special" and nothing works. it just tells me there was a problem. Can i get help with a Step by step guide on what to do? Please and Thank you

Link to comment
Share on other sites

This is pretty simple if you can understand what each value means.

For any vanilla lspdfr resource (aka agency.xml) all you have to do is find the department in which you want to put your addon vehicle into and look for the <Vehicles> variable which can be found not far below the name. All you have to do in there is make a new line and paste in the line of a vehicle above, replacing it with the name of your addon, so for example:

                    <Vehicle>POLICE</Vehicle>
                    <Vehicle>POLICE2</Vehicle>
                    <Vehicle>POLICE3</Vehicle>

                    <Vehicle>customcar</Vehicle>
customcar being the car you'd like to add into said department. You can repeat this for every addon car that you wish to add.

 

UltimateBackup is a bit different. I'm gonna do a very brief explanation, if you want more info every UB document has an overview and explanation written at the top.

- DefaultRegions corresponds to Local, State and other default units like K9, SWAT, NOOSE etc. There are only a couple predetermined locations they can spawn in, aka LS, LS County, BC, Paleto and Cayo perico.

- CustomRegions is just what the filename says, custom regions. It determines what units spawn in certain locations whenever you request default units like Local, State and so on.

- SpecialUnits is custom backup that doesn't rely on regions. This backup usually appears on the bottom of the backup list. It's mostly used for units like FIB, DOA and anything similar.

 

If you'd like to add something like LSPD cars you'd go to DefaultRegions and look for <LocalPatrol> and find <LosSantosCity> inside of that variable. Just like agency.xml the vehicles should be somewhere inside the aforementioned LS variable. This is how vehicle lines in UB usually look like:

                    <Vehicle chance="100" pax="1" pax_chance="50">POLICE</Vehicle>

Every vehicle must have a chance to spawn, which is what the "chance="100"" attribute is for. All car chances inside the region must add up to to 100. The second attribute is "pax", meaning the amount of passengers, and "pax_chance" being how likely the passengers are to spawn. If you'd like to add in an addon vehicle you'd do something like this:

                    <Vehicle chance="50" pax="1" pax_chance="50">POLICE</Vehicle>

                    <Vehicle chance="50" pax="1" pax_chance="50">customcar</Vehicle>

There's a 50% chance for either vehicle to spawn in, with a 50% chance to get 1 passenger inside of them.

lspdfr is a godsend

Link to comment
Share on other sites

@volac.

So how can i add on a car to patrol under Highway patrol? cause its says "Motor Unit" and vehicle is policeb. can i change the motor unit to patrol? or can i add it underneath motor Unit?

Cause i have my police cars working just a little confused on the highway part since it is a motorcycle

Edited by maddielovekyle
Link to comment
Share on other sites

Wrote this just for you, untested so make sure it works:

Spoiler

<Loadout>
            <Name>Patrol unit</Name>
            <Vehicles>
                <Vehicle>yourcars</Vehicle>
            </Vehicles>
            <Peds>
                <Ped chance="80" inventory="patrol">s_m_y_hwaycop_01</Ped>
                <Ped chance="20" inventory="patrol_stun">s_m_y_hwaycop_01</Ped>
            </Peds>
            <NumPeds min="1" max="2" />
            <Flags>
                <Flag>RespondsAsBackup</Flag>
                <Flag>SpawnsAmbiently</Flag>
            </Flags>
        </Loadout>

 

Either replace the <Loadout> to </Loadout> section with this if you don't want bike cops or put this text below the  </Loadout> line of your motor unit

lspdfr is a godsend

Link to comment
Share on other sites

You should only reply here to ask for more information from maddielovekyle or to answer the person's issue.

Reply to this thread only to offer help or assistance to maddielovekyle.
If you want support, create your own thread in the appropriate forum. Non-relevant replies, derailing posts, "me too", disinformation and other support requests will be removed without warning.

Guest
You can no longer reply to this support topic as it was started over a year ago. Please make a new thread.


×
×
  • Create New...