Garry's Mod Wiki

NPC:GetKnownEnemies

  table NPC:GetKnownEnemies()

Description

Returns all known enemies this NPC has. The enemy table is updated with NPC:UpdateEnemyMemory and NPC:ClearEnemyMemory, meaning other entities may be in enemies list even though your NPC doesn't hate it.

See also NPC:GetKnownEnemyCount

Returns

1 table
Table of entities that this NPC knows as enemies.