Garry's Mod Wiki

IsEnemyEntityName

boolean IsEnemyEntityName( string className )

Description

Returns if the given NPC class name is an enemy.

Returns true if the entity name is one of the following:

  • "npc_antlion"
  • "npc_antlionguard"
  • "npc_antlionguardian"
  • "npc_barnacle"
  • "npc_breen"
  • "npc_clawscanner"
  • "npc_combine_s"
  • "npc_cscanner"
  • "npc_fastzombie"
  • "npc_fastzombie_torso"
  • "npc_headcrab"
  • "npc_headcrab_fast"
  • "npc_headcrab_poison"
  • "npc_hunter"
  • "npc_metropolice"
  • "npc_manhack"
  • "npc_poisonzombie"
  • "npc_strider"
  • "npc_stalker"
  • "npc_zombie"
  • "npc_zombie_torso"
  • "npc_zombine"

Arguments

1 string className
Class name of the entity to check

Returns

1 boolean
Is an enemy

Page Links


Special Pages


Wikis

?

Render Time: 41ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 21
Render Body 0
Render Sidebar 12