• Best way to find NPC's when they spawn
    2 replies, posted
I am trying to make an addon that automatically sets a zombies body group (for headcrabs) to 0 but im not sure how the best way to find all zombies on the map without doing a radius search from players every few seconds. (seems like alot of wasted processing power ) i cant seem to find a "on npc spawn" hook unless its a player spawned npc i don't want to make the headcrab texture invisible (headcrab hats from pointshop)
[url]http://wiki.garrysmod.com/page/GM/OnEntityCreated[/url]
for _, v in pairs( ents.GetAll() ) do Something along these lines. correct me if i am wrong please [editline]14th December 2014[/editline] oh right thanks so much. didnt think about "created" as apposed to spawned XD thanks
Sorry, you need to Log In to post a reply to this thread.