#documentation

This commit is contained in:
Applevangelist
2024-07-14 19:15:19 +02:00
parent e6aa341863
commit b5d1cee96b
2 changed files with 63 additions and 33 deletions

View File

@@ -1382,7 +1382,7 @@ function EVENT:onEvent( Event )
end
-- Weapon.
if Event.weapon then
if Event.weapon and type(Event.weapon) == "table" then
Event.Weapon = Event.weapon
Event.WeaponName = Event.weapon:isExist() and Event.weapon:getTypeName() or "Unknown Weapon"
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!