NPC:GetEnemy
Example
Kill any npc that sets the first player as its enemy.
Output: Any npc that sets their enemy to Entity( 1 ) dies.
Example
Make every NPC that does not have an enemy (and preferably a D_HT relationship agains Players) start attacking a random Player. This code is copied from the gamemode My Base Defence:
Output: All NPCs on the SERVER will get their memory updated if they don't already have an enemy, and start moving to the last know position of the enemy and try to attack. This enemy will be a random Player. They will also try and shoot enemy cover.