Skip to main content

DeathReportService

This item only works when running on the server. Server

Centralized death reporting service which can be used to track deaths.

Functions

Init

DeathReportService.Init(
serviceBagServiceBag
) → ()

Initializes the DeathReportService. Should be done via ServiceBag.

ObservePlayerKillerReports

DeathReportService.ObservePlayerKillerReports(
playerPlayer
) → Observable<DeathReport>

Observes killer reports for the given player

ObservePlayerDeathReports

DeathReportService.ObservePlayerDeathReports(
playerPlayer
) → Observable<DeathReport>

Observes death reports for the given player

ObserveHumanoidKillerReports

DeathReportService.ObserveHumanoidKillerReports(
humanoidHumanoid
) → Observable<DeathReport>

Observes killer reports for the given humanoid

ObserveHumanoidDeathReports

DeathReportService.ObserveHumanoidDeathReports(
humanoidHumanoid
) → Observable<DeathReport>

Observes death reports for the given humanoid

ObserveCharacterKillerReports

DeathReportService.ObserveCharacterKillerReports(
characterModel
) → Observable<DeathReport>

Observes killer reports for the given character

ObserveCharacterDeathReports

DeathReportService.ObserveCharacterDeathReports(
characterModel
) → Observable<DeathReport>

Observes killer reports for the given character

ReportHumanoidDeath

DeathReportService.ReportHumanoidDeath(
humanoidHumanoid,--

Humanoid that died

weaponDataWeaponData?--

Weapon data to report

) → ()

Reports the death of a humanoid. This is called automatically by DeathTrackedHumanoid.

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the DeathReportService. Should be done via [ServiceBag].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 43,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObservePlayerKillerReports",
            "desc": "Observes killer reports for the given player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 93,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObservePlayerDeathReports",
            "desc": "Observes death reports for the given player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 108,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObserveHumanoidKillerReports",
            "desc": "Observes killer reports for the given humanoid",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 123,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObserveHumanoidDeathReports",
            "desc": "Observes death reports for the given humanoid",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 138,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObserveCharacterKillerReports",
            "desc": "Observes killer reports for the given character",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 153,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ObserveCharacterDeathReports",
            "desc": "Observes killer reports for the given character",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<DeathReport>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 168,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        },
        {
            "name": "ReportHumanoidDeath",
            "desc": "Reports the death of a humanoid. This is called automatically\nby [DeathTrackedHumanoid].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportService"
                },
                {
                    "name": "humanoid",
                    "desc": "Humanoid that died",
                    "lua_type": "Humanoid"
                },
                {
                    "name": "weaponData",
                    "desc": "Weapon data to report",
                    "lua_type": "WeaponData?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 184,
                "path": "src/deathreport/src/Server/DeathReportService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "DeathReportService",
    "desc": "Centralized death reporting service which can be used to track\ndeaths.",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 9,
        "path": "src/deathreport/src/Server/DeathReportService.lua"
    }
}