Undertaker service

by Cyron43
Please explain why you're reporting this file:

NOTE: I have retired from further developing and supporting this mod for the public.
NOTE FOR PEOPLE WITH PROBLEMS: Most likely there went something wrong with the installation. Please read the guide carefully.
Have fun and good bye. :-)

In case the undertaker gets stuck for more than 20 seconds he will teleport to the destination.

Increased stability and the undertaker is being released in case the vehicle gets destroyed.

V 3.4.1 is available.
Another attempt to increase the stability on ped spawning.

Undertaker Service 3.4.0 is available.
CHANGES: Modified the path to the configuration file. It's not Documents/GTA IV/ModSettings/UndertakerService anymore but Documents/GTA IV/ModSettings now. This has changed for all of my mods. So now you have all config files in a single folder now (ModSettings). Please read the guide for further installation instructions.

V3.3.0 is available

- Reduced the spawning radius of the undertaker.
- Changed how the undertaker stops. It's looks more natural now.


I decided to post the latest updates here because I think not many people bother to scroll the comments all the way down.


With this little mod you can call an undertaker.
Press u and he will drive to you and collect all dead bodies inside an adjustable perimeter.
8.87/10 - 15 votes
Downloads: 3,664
Added: June 2, 2013 5:23PM
Last Downloaded: May 23, 2017 1:23AM
File Size: 201.06 KB
» Author Website

Sorry, you must be registered and logged in to add a video to this file. Log in now!

Note: With this first version you should restrict the use for dead bodies which are not farther away from the next street than 100ft.

I will care for the rest with the next release - if you guys are interested anyway.
Posted on June 2, 2013 6:01PM by Cyron43
Also the undertaker currently obeys the traffic rules.

You will get that configurable with the next release.
Posted on June 2, 2013 6:58PM by Cyron43
I look forward to the next version
Posted on June 2, 2013 8:11PM by Will_I_Beard
very original
Posted on June 2, 2013 10:16PM by jpm1
lol, make a tow truck for abandoned vehicles, liberty traffic sucks
Posted on June 3, 2013 12:11AM by PoopSnapJack
haha very F U N Y...............
Posted on June 3, 2013 1:30AM by TimeOut
@PoopSnapJack: No need for me to do such a mod because it already exists: http://www.lcpdfr.com/files/file/857-vdh-towingservice/ :-)

I'm having much fun by combining LCPDFR and the tow service. Only the dead bodies bothered me but that gap is closed now.

@all: Thanks for the great comments and the rating. :-)
Posted on June 3, 2013 4:09AM by Cyron43
todella oma peräistä hyvä et uutta modia keksitään
Posted on June 3, 2013 7:31AM by jarpidelli
I put all files where they have to be ( I read the Readme file ) but the mod doesn't work
Posted on June 3, 2013 8:21AM by skendy
Can someone ban this "greatcunt" aka "DreamersCGM"? That guy keeps putting his same retarded video in every mod and it has nothing to do with any mods
Posted on June 3, 2013 9:01AM by MiG95
@skendy: Can you be more specific? What doesn't work? Doesn't it load, does it crash? In case it crashes, what's the error message?
Posted on June 3, 2013 9:14AM by Cyron43
UndertakerService now available.


- obey traffic laws and collection radius now configurable.

- improved arrival behavior. The undertaker has driven as he is on drugs. So I had to freeze the vehicle in the first version but that sudden stop didn't look good.

- Undertaker will complain about a prank call if there are no dead bodies in the perimeter.
Posted on June 3, 2013 10:07AM by Cyron43
does this work on patch ?
Posted on June 3, 2013 5:27PM by Tony Soprano
Hi Tony,

sorry but no. You should update your game to the latest patch.

On the other hand, Hazard recommends to install an older version of the C++ scripthook in your case. For further information pease read the troubleshooting section of his thread:

Posted on June 3, 2013 6:07PM by Cyron43
UndertakerService now available

Changes and bug fixes

- work message implemented. If there are many dead peds the undertaker needs a while for it (default is 2 seconds per body) and so the player might ask whether the mod crashed (it happened to me). Now there's a counter running that tells you the dead person he is actually collecting.

- Changed the drive speed from 30 to 20 Mph and removed that sudden drop to 5 Mph which caused a stuttering drive behavior.

- changed the arrival target for the undertaker. Now he only drives toward the player in case of a prank call. Otherwise he will choose the first dead ped in the list as target.

- collection time per dead ped is now configurable.

- Bug fix: Forgot to release the undertaker in case of a prank call

- Bug fix: The mod crashed when the game decided to remove a dead ped itself before the undertaker could take care of it.

- code improvement: surrounded the dead body collection method with a thread lock to prevent race conditions as this method is part of the tick event handling. You don't understand what I'm talking about? Well don't bother, this is for the developers among you. :-)
Posted on June 3, 2013 6:12PM by Cyron43
hey dude mmmm how about mod script mmm....player health like a Ped.

looks like a real if player easy die like a ped like a real human .

Posted on June 3, 2013 9:06PM by Aditya_Fauzi
Latest patch is not really practical for those with specific enb mods. I can never use timecyc and enb settings made for 1040 in 1070. Shaders are just too different. But enough crying, those who will never use 1070 for whatever reason, like me, lol, are just out of luck.

Excellent mod btw, i like every one of these ideas contributing for more alive environment.
Posted on June 3, 2013 10:33PM by tall70
Great idea, very original indeed.

But as soon as I load my game, I get a notification "error in script ..."

Do you have any idea why this happens?

Of course, I've put all files where they belong.

Thanks in advance ;)
Posted on June 4, 2013 4:03AM by HeadHacker
@Aditya: Sorry mate but I don't understand what you are saying.

@tall70: I don't understand you either. What's 1040 in 1070? My mod is written for the original game. I take no responsibility for any incompatibilities with other mods.

@HeadHacker: Please open the console window and give me more specific information: What kind of error happened? File not found, SerializationException, something else? And please also tell me the place where it happened (i.e. "UndertakerService.Core.EstablishConfigFromFile").

Is it possible to just copy&paste the console output? That would be the best.
Posted on June 4, 2013 5:19AM by Cyron43
Thanks for the quick answer!

Error in constructor of script "UndertakerService.core" :

System.ArgumentException: fullorRelativePath is invalid

at GTA.ScriptThread.LoadScriptNow ()
Posted on June 4, 2013 6:46AM by HeadHacker
Hi HeadHacker,

you have installed that GTA IV folder with the xml files at the wrong place. Are you among those people who have put it into the Rockstar Games folder? Forget about that!

Copy the GTA IV folder from the zip file to your Documents folder but nowhere else!

So you end up with the following path:

C:\Users\YourUserNameHere\Documents\GTA IV\ModSettings\UndertakerService
Posted on June 4, 2013 8:53AM by Cyron43
Awww *, just realised I have two "documents" folders. Don't know where the second one comes from.

Sorry! :D

And thank you!
Posted on June 4, 2013 9:25AM by HeadHacker
Glad I could help. :)
Posted on June 4, 2013 9:48AM by Cyron43
UndertakerService now available


- target now updates with every tick. Sometimes it happened that the undertaker passed by without doing anything and kept driving around town. It's a rare condition so I hope that's fixed now.

- undertaker vehicle is now indestructible while on duty.

- undertaker himself is now invincible while on duty.
Posted on June 4, 2013 11:53AM by Cyron43
Updated to V1.2.5.38971 because I just found another case where the game outruns the mod in disposing dead peds. Now I rummaged through all the code again in order to find any more but it seems that was it (keeps fingers crossed).
Posted on June 4, 2013 3:44PM by Cyron43
Found some bugs with heavy game load. Working on it...
Posted on June 4, 2013 7:22PM by Cyron43
lol sorry, another words u have it compatible with scripthook for, not older. While my ENB i'm improving for looong time is only compatible with
Posted on June 5, 2013 2:31AM by tall70
UndertakerService now available

In case of heavy work load the games refuses to create either the vehicle or the undertaker. I faced this with a LCPDFR gang mission under the Hickey bridge. I guess the game behaves that way in order to prevent hangs and/or crashes. So...


- In case of a heavy workload the dead bodies will be collected without the undertaker showing up.

I know this don't look good but hey, it's still better than a crash, isn't it?
Posted on June 5, 2013 9:34AM by Cyron43
Hey cyron43, i've read your PM and replied on it. Thought you had read it but because you yesterday replied on your thread i think of not?
Posted on June 5, 2013 1:17PM by VDH-SOFT
@VDH: Got it this time. We should restrict our PM negotiations to that thread.
Posted on June 5, 2013 1:29PM by Cyron43
Here is UndertakerService

Another (extremely rare) bug found. For some strange reasons the game can "think" the player character don't exists anymore even though you are alive and kicking. Tsk tsk

Added a picture to showcase what it's good for. That was the end of a high speed chase. >:)
Posted on June 5, 2013 6:46PM by Cyron43
nice release, maybe you could use 'IsCharAlive' native to help out with the exist error?
Posted on June 8, 2013 5:31AM by Hardsty1e
UndertakerService now available


- Implemented my own DistanceTo2D method because the one of the .net scripthook delivers unreliable results.

@Hardstyle: Thanks but I already did that. I just forgot to tell this bug is fixed. :)
Posted on June 8, 2013 11:48AM by Cyron43
UndertakerService now available


Mod crashed when the game decided to delete a ped in the same split-second when the mod queried all peds inside the perimeter. That's an extremely rare condition and that's why I encountered it just yesterday. I can't even tell whether I catched this bug to the fullest. Time will tell.


Dead bodies are registered at arrival now instead at the time the undertaker was called. The downside is that the undertaker's destination is now the position where the player stood when he made the call. So for the sake of your health you should step aside or the undertaker will probably run you over when he comes!
Posted on June 9, 2013 9:28AM by Cyron43
UndertakerService now available


- Default key is now u because that crouching animation began to annoy me - but you can change the key anyway.

- vehicle stops now

- default speed now further reduced to 20Mph in oder to improve the arrival part.

- dead bodies are now collected even if the game refuses to spawn either the undertaker or the vehicle.


- there were still some parts which (potentially) could make the mod crash.
Posted on June 10, 2013 7:02AM by Cyron43
UndertakerService is here

Soooooooooory but there was an error in the slowdown procedure at arrival. Now it's perfect.

I didn't want to upload this new version so soon but now this mod is also featured (YAY!) and I expect many people to drop by and download. So everything should be perfect. I owe it to you guys. You rock! :)
Posted on June 10, 2013 12:18PM by Cyron43
Version: Can you also say: 1.4.3 instead the other numbers at the end? Also what does that mean, the last numbers? A next version with big improvements will be: or 1.5? How actually works version numbers? Some people say version 1.0 and the next version 2.0 and other (like me) 1st version 1.0 next version 1.1?
Posted on June 10, 2013 3:36PM by VDH-SOFT


The first number is a breaking change, something big. For example I change the major number whenever the structure of the configuration file changes because files with the old structure are not compatible anymore.

The second number gets increased when a minor change (new feature, see feature branch ykwim) implemented (not breaking).

The third number is for hotfixes (no changes but just killing bugs).

The last number is an automatically generated build number. This is used in case you do just some refactoring to the code or doing any other changes in the architecture without changing the functionality.

Yes I could skip the last one in the comment (is it so annoying to you?). It's here because I just copied&pasted it from the rar filename. BUT I will not skip it on the file because it DOES happen that I refactorize.
Posted on June 10, 2013 7:05PM by Cyron43
@Cyron43: Thanks, i now understand.
Posted on June 12, 2013 12:59PM by VDH-SOFT
UndertakerService V2.2.0 is available


- Undertaker now chases the player in case of a prank call if the mod's configuration is being set accordingly (see below).

- new tag <FollowPlayer> in the configuration. If set to true the undertaker will chase you if you made a prank call. Read the guide for further information.

- new tag <ChaseSpeed> in the configuration. This is the speed (in Mph) at which he will chase you. Read the guide for further information.

- The undertaker will no longer ride across the whole town after he left. Now he will disappear when the vehicle's distance is farther away than the collection radius AND he is off screen.

- ReadMe converted to a PDF guide.

- Code has undergone several refactorings (improvement of code style).


Also overwrite the UndertakerServiceConfig.xml with the new version in this rar file because the old structure is not compatible anymore! Just drop the GTA IV folder into your documents folder and accept all overwrites.
Posted on June 13, 2013 8:50AM by Cyron43
I just found a small bug and already fixed it but I don't want to annoy the admin because he always has to unblock an update and he did it just a short time ago. I will upload the new version tomorrow.

If you don't like to wait you can already download it here:



- The list of registered dead peds wasn't cleared if the player dismissed the undertaker before he arrived. This is important because you may encounter a dead ped in an unreachable area. If you want to exclude that one from being collected it was useless to move away from there as this dead ped has being kept in the list.
Posted on June 13, 2013 11:03AM by Cyron43
So here is V2.2.1. Have fun. Bug fix see my post above.
Posted on June 13, 2013 12:06PM by Cyron43
Version 2.2.3 available


- dead persons got double registered. So it was nothing serious. You just may have wondered why the undertaker collects more dead bodies than really were there.

- Vehicle was not properly registered for Dispose after the undertaker's job was done.
Posted on June 17, 2013 12:08PM by Cyron43
Mod updated to V2.2.4


- dead persons were not marked for disposal if the undertaker was dismissed prematurely (before he started collecting). Now if you have installed the simple trainer and press Alt+6 (clear area) the dead peds disappear, but not if the undertaker is on it's way to the area or if he is currently busy with collecting the dead.
Posted on June 19, 2013 9:04AM by Cyron43
UndertakerService 2.2.5 available


- Undertaker vehicle could be disposed during arrival. This is a very rare condition and I'm not even able to reproduce this error. It seems the .net Scripthook is not thread safe and so it can happen that two or more mods call any method of the .net Scripthook at the same time (concurrency) which can lead to data corruption. I have endowed the arrival handler with additional verification and a thread lock. Let's hope that fixes the issue.
Posted on June 21, 2013 9:18AM by Cyron43
Hey, great job once again.

Is it possible to get an update that allows us to choose which vehicle the undertaker uses?

Basically a few friends and I create custom coop missions in free-roam. It would be nice to have a "cleaner" to call to get rid of certain dead bodies. Of course being gang warfare, the cleaner would likely come in a truck, not a hearse :D.

If you got the time, would be great. Thanks.
Posted on June 23, 2013 4:45PM by MarkC9
Sure Mark, that's no problem. Await it today. :)
Posted on June 24, 2013 4:07AM by Cyron43
UndertakerService V3 is available.


- Undertaker vehicle can be set in the UndertakerServiceConfig.xml now (default is romero).

- Guide has been updated to reflect the changes.

- Troubleshooting section of the guide has been updated and expanded.


This is a breaking change to the configuration file. It has been updated to hold the new VehicleName tag. So you MUST override the old configuration file with the new one which is provided in this new download!

As always just copy and paste the GTA IV folder from the rar file into your documents folder and accept all overwrites.

@Mark: Updating the guide was more work than the changes to the code. :)
Posted on June 24, 2013 5:29AM by Cyron43
UndertakerService 3.0.1 available for download


- the undertaker drove always twice as fast as set in the ChaseSpeed tag. Dude, can the .net scripthook do ANYTHING right??? >:(
Posted on June 25, 2013 8:24AM by Cyron43
New picture added: If the vehicle is just small enough the undertaker can now even reach areas which were unthinkable before. Here you see him on an airtug in the middle park. How he can dispose the dead bodies that way? Well, God moves in mysterious ways. ;D
Posted on June 25, 2013 4:13PM by Cyron43
UndertakerService V3.1.0 available


- Undertaker now don't leave the vehicle anymore if he is dismissed prematurely. This was changed because he sometimes forgot to re-enter his vehicle in this case.
Posted on June 27, 2013 1:02PM by Cyron43
UndertakerService 3.1.2 is available for download.


- undertaker still targeted the player if he was dismissed prematurely.

- Vehicle and undertaker were not disposed as expected.

- Reference to the ScripthookDotNet made relative now. The absolute path potentially led to installation issues.
Posted on July 3, 2013 9:53AM by Cyron43
Update to V3.1.3


- Undertaker always leaves with moderate speed and obeying traffic laws now. No more causing chaos due to reckless driving.
Posted on July 3, 2013 12:07PM by Cyron43
UndertakerService 3.1.4 available


- Undertaker still didn't always enter his vehicle and left on heavy game load. However, he also faces the bug where peds and vehicles may freeze if you excessively use the reloadscripts command. This is a game bug. There's a separate mod coming up which handles this general issue.
Posted on July 5, 2013 11:32AM by Cyron43
V3.1.5 available


- That nasty game bug annoys me. The undertaker still gets stuck sometimes when he finished his job. This can be seen after several uses of the reloadscripts command and by heavily using multiple calls for police support (LCPDFR) and calls for the tow service all at once. Now the mod starts a 3 seconds timeout after the undertaker has finished his job. If he is still not in his vehicle after that he and his vehicle will get deleted.

- You no longer need to wait 6 seconds for another call for the undertaker after you dismissed him.
Posted on July 14, 2013 9:35AM by Cyron43
UndertakerService 3.1.6 available for download


- Increased the timeout to 5 seconds because 3 were hardly enough for some vehicles.

- The dismiss part of the mod is no longer affected by the timeout as it's not necessary there anyway. That gives you the benefit of immediate availability of a new undertaker in case you dismiss him due to a spawning in an unroutable area. Just press U two times (one for dismiss and one for a new call) if you find him where he can't get away with his car.

- Overhauled software architecture
Posted on July 16, 2013 7:48AM by Cyron43
Expanded the installation section of the guide for dummies.
Posted on July 19, 2013 6:19AM by Cyron43
Corrected a stupid copy&paste error in the installation section of the guide. I'm sorry for this.
Posted on August 1, 2013 2:25PM by Cyron43
UndertakerService V3.1.7 is available


- The undertaker now stops on the next street if there are dead bodies in an area which are unavailable by vehicle. However this will only take effect if the <FollowPlayer> tag in the config is set to false.
Posted on September 6, 2013 9:50AM by Cyron43
UndertakerService V3.2.0 is available


- If the undertaker gets stuck during arrival and can't get free within 20 seconds he will do the job at his current location. NOTE: This has no effect if the <ObeyTrafficLaws> tag in the config is set to true.

- The undertaker and his vehicle get deleted if stuck after he has finished his work and can't get free within 20 seconds.
Posted on September 8, 2013 4:38PM by Cyron43
Aaaand here is V3.2.1

Sorry the new code also implemented a bug which is fixed now.

Also I forgot to remove some debug display.
Posted on September 8, 2013 5:20PM by Cyron43
Sorry, you must be registered and logged in to post a comment. Log in now!