BadgerCode / tttdamagelogs

Damagelogs and RDM Manager for Trouble in Terrorist Town (a Garry's Mod gamemode)
GNU General Public License v3.0
20 stars 23 forks source link

Add a hook 'RDMManagerStatusUpdated', called when report status is updated. #70

Closed callumok2004 closed 2 years ago

callumok2004 commented 2 years ago

Adding this can make it easier for people to add custom staff tracking without the need to modify the addon to track staff finishing reports etc.


hook.Add("RDMManagerStatusUpdated", "Example", function(
    ply, -- The player who updated the report status,
    index, -- The report index, can be used to track unique reports so staff can't keep setting to finished to add to activity
    status, -- The new report status
    previous -- The previous report status
)
-- Custom code to update database etc...
end)
BadgerCode commented 2 years ago

This looks really useful! I'll see about adding some documentation in the wiki around this.

BadgerCode commented 2 years ago

Hey! I've tested this and it looks good! I'll create a wiki page for it now and prepare it for the next release

BadgerCode commented 2 years ago

Wiki page added- https://github.com/BadgerCode/tttdamagelogs/wiki/Handle-report-status-change