Skip to content
Documentation
R_Gravedigging

r_gravedigging Exports & Commands

r_gravedigging server exports, the crime event other scripts can listen to, and the admin command.

Server exports

ResetCemetery

Closes every dug grave in a cemetery and moves the stashes and finds. Pass a cemetery id or 'all'.

exports.r_gravedigging:ResetCemetery('hillvalley')
exports.r_gravedigging:ResetCemetery('all')

IsDirty

true while a player still has grave dirt on them. Handy for police checks or a shower script.

if exports.r_gravedigging:IsDirty(source) then
    -- covered in grave dirt
end

Events

EventWhen
r_scripts:crimeCompletedServer event after a finished grave dig: source, 'r_gravedigging', 'robbery', payout (cash + fence value of the items)
AddEventHandler('r_scripts:crimeCompleted', function(src, resource, kind, payout)
    if resource ~= 'r_gravedigging' then return end
    -- reputation, XP, gang stats...
end)

Detector finds and chests are treasure hunting, not a crime, so they don't fire it.

Admin command

/gravedigging <action> for R.Admin.group (admin and god by default).

ActionWhat it does
statusOne line per cemetery: dug graves, stashes, finds and the funeral
reset [cemetery|all]Close the graves and move the stashes and finds
stashes [cemetery]Show where the stashes are
finds [cemetery]Show where the lawn finds are
funeral [grave]Start a funeral now, at the grave next to you by default
ghost [grave]Raise a ghost, at the grave next to you by default
chestYour next detector find is a treasure chest
spotsShow every dig spot on the ground (white = stand, purple = hole, red = ground not flat)