forked from Tommy228/tttdamagelogs
-
Notifications
You must be signed in to change notification settings - Fork 23
Logging custom TTT equipment events
Michael Hawkins edited this page Aug 14, 2022
·
4 revisions
You can modify the code for TTT weapons and entities to provide more information for the damage logs.
This is done by calling the hook TTTEquipmentUse
.
-- In your weapon's code
SWEP.PrintName = "My Custom Weapon"
function SWEP:PrimaryAttack()
local playerUsingEquipment = self:GetOwner()
local equipment = self
local description = "Did something cool"
hook.Run("TTTEquipmentUse", playerUsingEquipment, equipment, description)
end
In-game, this looks like the following: