#EVENT - small fix

This commit is contained in:
Applevangelist
2026-06-14 16:10:34 +02:00
parent 9326cfad1c
commit d1e4dd3fe9
+5 -1
View File
@@ -1453,7 +1453,11 @@ function EVENT:onEvent( Event )
-- Weapon.
if Event.weapon and type(Event.weapon) == "table" and Event.weapon.isExist and Event.weapon:isExist() then
Event.Weapon = Event.weapon
Event.WeaponName = Event.weapon:isExist() and Event.weapon.getTypeName and Event.weapon:getTypeName() or "Unknown Weapon"
if Event.weapon_name == "ZELL Booster" then
Event.WeaponName = "ZELL Booster"
else
Event.WeaponName = Event.weapon:isExist() and Event.weapon.getTypeName and Event.weapon:getTypeName() or "Unknown Weapon"
end
if Event.weapon_name == "ZELL Booster" then Event.WeaponName = "ZELL Booster" end
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()