Fires an action if a player reaches a kill threshold in a specific timespan.
Signature:
declare function RDM(action: (log: KillLog) => void, allowlist?: Allowlist, minKills?: number, timespan?: number): (log: KillLog) => void;#Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
action |
(log: KillLog) => void |
The callback to run if a match if found. |
|
allowlist |
(Optional) Users/Permissions that can RDM. | |
|
minKills |
number |
(Optional) The minimum number of kills in the threshold. |
|
timespan |
number |
(Optional) The timespan in which the number of kills must be reached in seconds. |
Returns:
(log: KillLog) => void
- Callback function to pass into client event.
#Example 1
client.on(ERLCEvents.Kill, RDM((log) => log.killer?.kick()));#Example 2
client.on(ERLCEvents.Kill, RDM((log) => log.killer?.kick(), [ PlayerPermission.Administrator, PlayerPermission.Owner ], 5, 30));