Skip to content

Taser

Events

lwk_taser:used

A server event that fires on every use, for MDTs, logs or your own systems. The Discord audit log is built from the same data.

AddEventHandler('lwk_taser:used', function(d)
    print(('%s: %s on %s (%s)'):format(d.name, d.action, d.target, d.outcome))
end)
FieldTypeWhat it is
d.actionstringWhat happened, e.g. 'Probe deployed (bay 3)', 'Warning arc', 'Magazine loaded', 'Barbs removed', 'Barbs ripped out (distance)'
d.officernumberServer id of whoever used it
d.namestringTheir player name
d.devicestringWhich taser, or '?'
d.cartridgestringThe magazine involved, or 'n/a'
d.targetstring'Name [id]' for a player, 'NPC', or 'n/a'
d.outcomestring'hit', 'miss', 'lockout', or '-'
d.coordsvector3Where the officer was

Audit log

Set a Discord webhook in server.cfg (not the shared config, so players can't read it) and every use is posted:

set lwk_taser_webhook "https://discord.com/api/webhooks/..."