Jump to content
Fiskey111

API Fellow Cops

Recommended Posts

Hi Guys,

So I'm trying to make my first callout but I'm having issues getting a fellow police officer to spawn at the crime scene.  I've tried using Cop.Cop from LSPDFR but I can't get it to work, specifically the Vector3.  Any ideas on what I'm doing wrong?

Thanks!

Callouts3.thumb.jpg.727fff04ef138aa36aed

Edited by fiskey111
Got the weapons, can't get friendly cop to spawn

Share this post


Link to post
Share on other sites

Please do not use the Cop class as it will be removed in the next update. You can spawn a ped using new Ped. As for the position, no need for Vector3.Add, simply pass the position as a Vector3.

Fiskey111 and Slushy like this

Share this post


Link to post
Share on other sites
4 hours ago, LMS said:

Please do not use the Cop class as it will be removed in the next update. You can spawn a ped using new Ped. As for the position, no need for Vector3.Add, simply pass the position as a Vector3.

Hey LMS, I'm wondering if there's any way to make LSPDFR recognise them as a cop - in other words, that you're unable to arrest cops you spawned. Is this possible already or will this be added in LSPDFR 0.3?

Thanks!

Share this post


Link to post
Share on other sites
52 minutes ago, Albo1125 said:

Hey LMS, I'm wondering if there's any way to make LSPDFR recognise them as a cop - in other words, that you're unable to arrest cops you spawned. Is this possible already or will this be added in LSPDFR 0.3?

Thanks!

The new Cop creation might achieve just that for 0.2 (tbh it's a long time, I can't recall completely anymore). For 0.3 though, we will provide an API function to set up a ped as a cop. That means that right after spawning the same stuff gets applied LSPDFR applies internally to a cop. This also makes the cop available for chases etc. as LSPDFR properly recognizes it.

Share this post


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

Please do not use the Cop class as it will be removed in the next update. You can spawn a ped using new Ped. As for the position, no need for Vector3.Add, simply pass the position as a Vector3.

Ah thank you so much!  I was up late last night and I actually had used that, but I also accidentally added the cop to the pursuit further down so it wasn't working!  Thank you so much!

Is there any way to randomize the peds?  I haven't looked into it yet and I will, so don't feel the need to answer right away, I'm just curious as I'm looking at the code.

Share this post


Link to post
Share on other sites
On 12/4/2015, 6:45:02, fiskey111 said:

Ah thank you so much!  I was up late last night and I actually had used that, but I also accidentally added the cop to the pursuit further down so it wasn't working!  Thank you so much!

Is there any way to randomize the peds?  I haven't looked into it yet and I will, so don't feel the need to answer right away, I'm just curious as I'm looking at the code.

I think that all you have to do is NOT define a certain model.. I'm pretty sure that it'll just pick random ses of ped models after that, but I am not completely sure..

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


×