Control Module - Reports - Adds a way to report players and store report messages.
-- import the module from the control modules
local Reports = require 'modules.control.reports' --- @dep modules.control.reports
-- This will place a report on "MrBiter" (must be a valid player) the report will have been made
-- by "Cooldude2606" (must be the player name) with the reason 'Liking biters too much' this can be
-- seen by using Reports.get_report.
Reports.report_player('MrBiter', 'Cooldude2606', 'Liking biters too much') -- true
-- The other get methods can be used to get all the reports on a player or to test if a player is reported.
Reports.get_report('MrBiter', 'Cooldude2606') -- 'Liking biters too much'
-- This will remove the warning on 'MrBiter' (must be a valid player) which was made by 'Cooldude2606'.
Reports.remove_report('MrBiter', 'Cooldude2606') -- true
-- This will remove all the report that have been made against 'MrBiter'. Note that the remove event will
-- be triggered once per report issused.
Reports.remove_all('MrBiter') -- true
utils.game |
utils.global |
on_player_reported | When a player is reported |
on_report_removed | When a report is removed from a player |
get_reports(player) | Gets a list of all reports that a player has against them |
get_report(player, by_player_name) | Gets a single report against a player given the name of the player who made the report |
is_reported(player[, by_player_name]) | Checks if a player is reported, option to get if reported by a certain player |
count_reports(player[, custom_count]) | Counts the number of reports that a player has aganist them |
report_player(player, by_player_name[, reason='Non given.']) | Adds a report to a player, each player can only report another player once |
remove_report(player, reported_by_name, removed_by_name) | Removes a report from a player |
remove_all(player, removed_by_name) | Removes all reports from a player |
When a player is reported
Event Parameters:When a report is removed from a player
Event Parameters:Gets a list of all reports that a player has against them
Parameters:Gets a single report against a player given the name of the player who made the report
Parameters:Checks if a player is reported, option to get if reported by a certain player
Parameters:Counts the number of reports that a player has aganist them
Parameters:Adds a report to a player, each player can only report another player once
Parameters:Removes a report from a player
Parameters: