Jump to content

[API][WIP/REL] Callouts+ - Additional LCPDFR API Callouts


Recommended Posts

Oh it's really nice, however ambulance script works a bit randomly: I had a wounded streetracer and a pedestrian down, the ambo showed up and a message appeared "where's no wounded peds here"

Link to comment
Share on other sites

Oh it's really nice, however ambulance script works a bit randomly: I had a wounded streetracer and a pedestrian down, the ambo showed up and a message appeared "where's no wounded peds here"

It works on a radius system. So when you press the keybind it gets all of the peds in the area and looks for the first injured ped in that list. I aim to improve it but sometimes the ped isn't registered properly and so it will return "no ped here" to prevent it crashing :)

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

I love the idea man your doing great with it so far, this might be a little difficult but can you make callout to where a house or apartment is being broken in a "house robbery" callout? Let me know what you think.

Edited by chester790

"I'm a marked man, so I'm getting out of here"

 

Ray Machowski

Link to comment
Share on other sites

@lukeD , Can you implement be on the lookout ?

As I said before to you, I will look into it. Asking me twice wont make me more/less likely to look into it.

 

I love the idea man your doing great with it so far, this might be a little difficult but can you make callout to where a house or apartment is being broken in a "house robbery" callout? Let me know what you think.

Thanks, I'm glad you like it. That would be very difficult given that GTA IV has a very limited number of buildings you can enter. It would depend on how you would want the callout to play out.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

Hi there, I got a bug report for you.

I tried your mod yesterday and I pressed Shift+R without having any injured person around. I did it by mistake but anyway soon after the message that told me an ambulance is on it's way the whole game crashed. I write mods myself and so I guess that happened due to a NullReferenceException or a ped array with 0 size which causes an IndexOutOfRangeException. The weird thing is that usually just the mod crashes but not the whole game. However I never used the LCPDFR API. Maybe it's because of that but I don't know.

Also the game crashes generally very often without any notification with this mod installed. My general recommendation is: Check for existence each and every time you make any call to a ped or a vehicle. The game engine handles those very rigorously in order to keep memory consumption at a minimum and to optimize rendering time.

As I said I never used the LCPDFR API and so I don't know anything about it. However with the .net Scripthook you can lock any ped from being disposed by simply setting the IsRequiredForMission property to true. I would do it on injured peds when the player calls an ambulance but don't forget to set it to false again after the rescue.

Edited by Cyron43
Link to comment
Share on other sites

Hi there, I got a bug report for you.

I tried your mod yesterday and I pressed Shift+R without having any injured person around. I did it by mistake but anyway soon after the message that told me an ambulance is on it's way the whole game crashed. I write mods myself and so I guess that happened due to a NullReferenceException or a ped array with 0 size which causes an IndexOutOfRangeException. The weird thing is that usually just the mod crashes but not the whole game. However I never used the LCPDFR API. Maybe it's because of that but I don't know.

Also the game crashes generally very often without any notification with this mod installed. My general recommendation is: Check for existence each and every time you make any call to a ped or a vehicle. The game engine handles those very rigorously.

 

Do you have an actual error report for this to show? Because if you read up a few posts you will have seen a member comment about the ambulance turning up and it saying "there is no ped here"

 

I do in fact catch that very exception, if no ped exists in the list, it tells you there is no ped and the ambulance drives off again. I added that purely because I knew from testing the script that it crashed the plugin and not the game. But if you have an error code for me I can look into it.

 

As for the crashing that occurs often, I will take a look into how stable it runs for me, I'll do a full play of it rather than a testing one, both with and without the plugin to see. Thanks for reporting your findings.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

The only things I could offer at the moment is the binary crash dump and the LCPDFR.log which is way over 4MB currently.

That's not helpful so I emptied the LCPDFR.log now, install your mod again and test play later this day. I'll be back with the log then.

cya

Link to comment
Share on other sites

So here it is. The crash happened as soon as the paramedic left the ambulance vehicle.

[ERROR - 7:54:41 PM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.

[ERROR - 7:54:41 PM] [] System.InvalidOperationException: Sequence contains no elements

at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)

at CalloutsPlus.CalloutsPlusMain.<paramedic_Tick>b__11(Object[] param0)

at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()

at LCPD_First_Response.Engine.Main.fr2()

Should be a piece of cake to fix it. ;)

Edited by Cyron43
Link to comment
Share on other sites

So here it is. The crash happened as soon as the paramedic left the ambulance vehicle.

[ERROR - 7:54:41 PM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.

[ERROR - 7:54:41 PM] [] System.InvalidOperationException: Sequence contains no elements

at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)

at CalloutsPlus.CalloutsPlusMain.<paramedic_Tick>b__11(Object[] param0)

at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()

at LCPD_First_Response.Engine.Main.fr2()

Should be a piece of cake to fix it. ;)

Yep, will have that fixed by the weekend (I'm away from my desktop until then so can't do much)

 

Thanks for reporting it.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

  • Management Team

As I said before to you, I will look into it. Asking me twice wont make me more/less likely to look into it.

 

Thanks, I'm glad you like it. That would be very difficult given that GTA IV has a very limited number of buildings you can enter. It would depend on how you would want the callout to play out.

 

It's possible to use interiors, but will take a little bit more work than just setting up a callout inside a building. There's an unreleased (most likely never will be) mod that uses interiors similar to the way LCPDFR uses the lawyer's office. What you do is walk into a marker at a location which then teleports you to the interior of a building. Then, when you leave, you walk into another marker to bring you back out of the building where you entered.

 

So, for example you want to use the interior for the Bohan safehouse in GTA IV, but for a building somewhere in Algonquin. You would have a marker at the building in Algonquin which teleports you to the Bohan safehouse interior. Then, when you leave, you walk into a marker inside the interior to teleport you back to where you entered in Algonquin.

"Work and ideas get stolen, then you keep moving on doing your thing."

Link to comment
Share on other sites

It's possible to use interiors, but will take a little bit more work than just setting up a callout inside a building. There's an unreleased (most likely never will be) mod that uses interiors similar to the way LCPDFR uses the lawyer's office. What you do is walk into a marker at a location which then teleports you to the interior of a building. Then, when you leave, you walk into another marker to bring you back out of the building where you entered.

 

So, for example you want to use the interior for the Bohan safehouse in GTA IV, but for a building somewhere in Algonquin. You would have a marker at the building in Algonquin which teleports you to the Bohan safehouse interior. Then, when you leave, you walk into a marker inside the interior to teleport you back to where you entered in Algonquin.

Yes I know, the exact same method was used for San Andreas Multiplayer servers.

 

The issue though would still remain that GTA IV has a distinct lack of interiors. So you would get a callout to a house, and then 5 callouts of the same type later you would be back in that house. It would get tedious and pretty terrible in my opinion.

 

You then also have the issue of mapping each and every single house in the game to a position and an interior, too much hassle than is worth I feel. You could only map a few of the houses but then the callout isn't dynamic enough, so unless you spent ages working on that one callout, you would never get a good experience from it.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

Hey the whole house robbery callout is going to be very difficult to do so I understand if you can't do it, it's totally fine with me, can you see if you can make a "train robbery" where the suspect is robbing the citizens on the train or something like that?

"I'm a marked man, so I'm getting out of here"

 

Ray Machowski

Link to comment
Share on other sites

Could you do a burglary in progress and have a suspect outside the building?  We would have to do an area check and hopefully spot him.

Getting bored roleplaying?  Need ideas for calls to respond to?  Try out http://sandyshorespd.weebly.com/  Tons of role play dispatches to use your imagination on.

Link to comment
Share on other sites

I feel that you have the knack for requesting very hard to make callouts chester :P

Ineseri yeah I know I try not to request any callouts but I can't help myself I just request the first thing that comes to mind.

"I'm a marked man, so I'm getting out of here"

 

Ray Machowski

Link to comment
Share on other sites

Had a vehicle removal-related crash

2014-04-24 03:44:00 - Unhandled Exception: GTA.NonExistingObjectException: Invalid call to an object that doesn't exist anymore!
                         at GTA.value.Tasks.EnterVehicle(Vehicle Vehicle, VehicleSeat Seat)
                         at CalloutsPlus.CalloutsPlusMain.<removal_Tick>b__20(Object[] param0)
                         at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()
                         at LCPD_First_Response.Engine.Main.fr2()
                         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
                         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                         at System.Threading.ThreadHelper.ThreadStart()
2014-04-24 03:44:00 - CRASH!
2014-04-24 03:44:00 - Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'GTA.NonExistingObjectException' in Assembly 'ScriptHookDotNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
                         at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
                         at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
                         at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
                         at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
                         at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm)
                         at System.AppDomain.Serialize(Object o)
                         at System.AppDomain.MarshalObject(Object o)
                      
2014-04-24 03:44:00 - CRASH!

Link to comment
Share on other sites

Had a vehicle removal-related crash

2014-04-24 03:44:00 - Unhandled Exception: GTA.NonExistingObjectException: Invalid call to an object that doesn't exist anymore!						 at GTA.value.Tasks.EnterVehicle(Vehicle Vehicle, VehicleSeat Seat)						 at CalloutsPlus.CalloutsPlusMain.<removal_Tick>b__20(Object[] param0)						 at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()						 at LCPD_First_Response.Engine.Main.fr2()						 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)						 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)						 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)						 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)						 at System.Threading.ThreadHelper.ThreadStart()2014-04-24 03:44:00 - CRASH!2014-04-24 03:44:00 - Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'GTA.NonExistingObjectException' in Assembly 'ScriptHookDotNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.						 at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)						 at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)						 at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)						 at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)						 at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm)						 at System.AppDomain.Serialize(Object o)						 at System.AppDomain.MarshalObject(Object o)					  2014-04-24 03:44:00 - CRASH!

Thanks for reporting that. I'll try my best to see what I can do about that but that's a generic "we lost the vehicle" error.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

What a coincidence. I was about to report the same issue.

[] GTA.NonExistingObjectException: Invalid call to an object that doesn't exist anymore!

at GTA.value.Tasks.EnterVehicle(Vehicle Vehicle, VehicleSeat Seat)

at CalloutsPlus.CalloutsPlusMain.<removal_Tick>b__20(Object[] param0)

at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()

at LCPD_First_Response.Engine.Main.fr2()

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...