Grave Digging

Grave Digging

This is a cemetery robbery script I created for my FiveM server. I wanted to make the experience more hostile for players and avoid relying solely on the police for punishment, so I decided to introduce cemetery defenders. The script works based on the time of day in the game. During the day, a priest with a shotgun will appear and defend the area, while at night or in the early morning, goths who gather nearby will search for glass bottles and knives. These two events have a low probability of triggering, but it’s configurable in the script.

The player who is stealing can obtain valuable items such as gold chains, rings, pearl necklaces, human bones, and other macabre parts, which can be sold to a PED (location in preview) in the north. Additionally, players need to be careful, as they must always wear gloves while digging to avoid leaving fingerprints. There’s also a higher chance of the police being alerted during the day.

One of the biggest challenges I faced was figuring out how to randomly spawn the graves, which took a lot of thinking. However, most aspects of the script are configurable, so feel free to customize it as you see fit.

For the script to work, you will need Ox_lib, Ox_target, Ox_Inventory, and QBOX.

Download: GitHub - YuriOliveira1/lonf_cemetery

Locs:
Priest
image
Store
image
image

preview:

Code is accessible Yes
Subscription-based No
Lines (approximately) 576
Requirements Ox_lib, Ox_target, Ox_Inventory,
Support Yes
7 Likes

You did not include a download link of your script.

Will This Be Comp for QB Inv???

Maybe if you change some functions and change them to fit qb-inv, but for now only ox_inventory

ok ima see what i can do! ill keep you posted

Thank you, I appreciate it

I would like to give you a suggestion:
It looks like there should be additional animation on the ped when it is in the process of digging the soil, and requires a tool such as a hoe to be able to dig the soil. Without these tools, digging can still be done, but the process is very long because logically it is possible for him to dig using both hands, but if there is a hoe, it will cut the time for the process of digging the soil.

Just like in the real world, the hoe can be damaged, you can repair it yourself.

If the grave guard is an NPC like in the video, you can set the aggressive level

then for grave guards you can further set the settings in config.lua whether it is activated or not, if it is activated then the grave guard is there, if it is not activated then players who have the police job or the grave guard worker job will be notified that there are indications of grave robbery

You can apply all of these suggestions and configure them in config.lua so that they can be activated or deactivated.

Thanks for the suggestion!
Regarding the animation, I ended up selecting this one due to the lack of options, I didn’t find one that was interesting, but having this option to dig with a shovel or with your hands is something interesting that I’m going to do.
Another thing I’m going to do that I thought would also be good would be to be able to leave the defenders configuration active or not.
I’ll try to do it this week

1 Like

any plans for qb-inventory and qb-target?

i cant seem to find the cemetary…