Jump to content

Please exclude mission characters from pursuit involvement


Cyron43

Recommended Posts

Whenever I'm in a police car and I spawn a driver by using my Havoc! mod the driver "forgets" his job in order to participate in a pursuit if it's nearby.
I flag the driver as mission character (by calling the IsRequiredForMission() method in the .net ScriptHook) but that's useless as long as this flag isn't queried in the LCPDFR code.
Also setting BlockPermanentEvents to true doesn't help.

Link to comment
Share on other sites

  • Management Team

Moved to Development.

 

You can use our API to do just that. Make sure your class inherits from GameScript, then you can do something like this:

            if (Functions.IsKeyDown(Keys.B))
            {
                LPed ped = new LPed(LPlayer.LocalPlayer.Ped.Position, "M_Y_COP");
                if (ped.Exists())
                {
                    // This will block all other scripts from accessing this officer
                    Functions.SetPedIsOwnedByScript(ped, this, true);
                    ped.AttachBlip();
                }
            }

Also, explicitly stating the ped is not a cop might help when spawning:

LPed ped = new LPed(LPlayer.LocalPlayer.Ped.Position, "M_Y_COP", LPed.EPedGroup.MissionPed);

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

This would make my mod dependent on yours. So all users who want to use my mod must also install LCPDFR.
I guess I will use a static non-cop model instead.

Edited by Cyron43
Link to comment
Share on other sites

  • Management Team

This would make my mod dependent on yours. So all users who want to use my mod must also install LCPDFR.

I guess I will use a static non-cop model instead.

That's not so bad, almost everyone has LCPDFR installed, we are one of the biggest mods for GTA IV.

Plus you could use our API to do stuff which is currently not possible without the AdvancedHook.

Imitation is the sincerest form of flattery.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...