Jump to content
zackthompson

How can I make a normal car be recognised by LSPDFR as a cop car?

Recommended Posts

I was just wondering how to make normal cars be recognised as a cop car to use on patrols. Basically the end goal is to make a deluxo police car.

Share this post


Link to post
Share on other sites
1 hour ago, zackthompson said:

I was just wondering how to make normal cars be recognised as a cop car to use on patrols. Basically the end goal is to make a deluxo police car.

 

Are you a vehicle developer trying to make a car a police vehicle, or are you asking if you can spawn any old civilian car and patrol with it?  If it's the latter, you can't.

Share this post


Link to post
Share on other sites
20 minutes ago, Giordano said:

 

Are you a vehicle developer trying to make a car a police vehicle, or are you asking if you can spawn any old civilian car and patrol with it?  If it's the latter, you can't.

Well I am trying to become a vehicle developer. So far I've got the taillights of the deluxo flashing so npcs move out of the way but I can't perform traffic stops. Basically it doesn't interact with LSPDFR
 

Share this post


Link to post
Share on other sites
47 minutes ago, zackthompson said:

Well I am trying to become a vehicle developer. So far I've got the taillights of the deluxo flashing so npcs move out of the way but I can't perform traffic stops. Basically it doesn't interact with LSPDFR
 

 

Have you added the car to a police slot, such as police, police2, etc?

Share this post


Link to post
Share on other sites
11 hours ago, Giordano said:

 

Have you added the car to a police slot, such as police, police2, etc?

How would I do that? P.s thank you for helping xD

Share this post


Link to post
Share on other sites
6 hours ago, zackthompson said:

How would I do that? P.s thank you for helping xD

 

Ok, hold on, what slot is the car in now? XD Is it in the slot it was originally in and you just tried making it law enforcement?

Share this post


Link to post
Share on other sites
13 minutes ago, Giordano said:

 

Ok, hold on, what slot is the car in now? XD Is it in the slot it was originally in and you just tried making it law enforcement?

Yes its in its original slot and i then tried to make it law enforcement

 

Share this post


Link to post
Share on other sites
Posted (edited)

As far as I understand, police vehicle recognition is based on vehicle flags. Vehicle flags are stored in the vehicles.meta file, this post won't explain the specifics and assumes you can do this on your own. The following flags should enable police functions for LSPDFR (and by extension, the IsPoliceVehicle method in RAGEPluginHook):

 

FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE

 

Edited by liverlande

Share this post


Link to post
Share on other sites
5 minutes ago, liverlande said:

As far as I understand, police vehicle recognition is based on vehicle flags. Vehicle flags are stored in the vehicles.meta file, this post won't explain the specifics and assumes you can do this on your own. The following flags should enable police functions for LSPDFR (and by extension, the IsPoliceVehicle method in RAGEPluginHook):

 


FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE

 

 

That is true, but if the vehicle does not have lights on it, which is what I was getting at, I don't believe it'll work.

31 minutes ago, zackthompson said:

Yes its in its original slot and i then tried to make it law enforcement

 

 

Take the vehicle files and put them in a law enforcement slot such as police, police2, etc.  If you try and make a default slot law enforcement, you're going to have civilians driving around in cop cars.

Share this post


Link to post
Share on other sites
2 minutes ago, liverlande said:

As far as I understand, police vehicle recognition is based on vehicle flags. Vehicle flags are stored in the vehicles.meta file, this post won't explain the specifics and assumes you can do this on your own. The following flags should enable police functions for LSPDFR (and by extension, the IsPoliceVehicle method in RAGEPluginHook):

 


FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE

 

Hi, I gave that a try and it didn't seem to work : (

what is the ispolicevehicle method?

6 minutes ago, Giordano said:

 

That is true, but if the vehicle does not have lights on it, which is what I was getting at, I don't believe it'll work.

 

Take the vehicle files and put them in a law enforcement slot such as police, police2, etc.  If you try and make a default slot law enforcement, you're going to have civilians driving around in cop cars.

What vehicle files should I put in the law enforcement slot?

 

Share this post


Link to post
Share on other sites
22 hours ago, Giordano said:

 

That is true, but if the vehicle does not have lights on it, which is what I was getting at, I don't believe it'll work.

 

Take the vehicle files and put them in a law enforcement slot such as police, police2, etc.  If you try and make a default slot law enforcement, you're going to have civilians driving around in cop cars.

Also how do I do that?

 

Share this post


Link to post
Share on other sites
2 hours ago, zackthompson said:

Also how do I do that?

 

 

Do what, take the files and put them somewhere else?  Go to where the car files are at that you're wanting.  Drag and drop them onto your desktop.

 

Now navigate to the very newest patchday that has a vehicles.rpf.

 

Rename the car files on your desktop to "police".

 

Click "edit mode" in open iv

 

drag and drop the renamed files into open iv.

 

click "edit mode" again and you're done.

Share this post


Link to post
Share on other sites
5 minutes ago, Giordano said:

 

Do what, take the files and put them somewhere else?  Go to where the car files are at that you're wanting.  Drag and drop them onto your desktop.

 

Now navigate to the very newest patchday that has a vehicles.rpf.

 

Rename the car files on your desktop to "police".

 

Click "edit mode" in open iv

 

drag and drop the renamed files into open iv.

 

click "edit mode" again and you're done.

Ahhh okay what car files will I need?

Share this post


Link to post
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

×