View Single Post
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 12-20-2010 , 04:50   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #10

Yes. EV_SZ_classname/pev_classname is the name of our ent.
No. You have to pass "info_target" or you will run into this error.
Code:
[HAMSANDWICH] Failed to retrieve classtype for "npc_ent", hook for "npc_Think" not active.
I believe there is already an ent created named "info_target" at the start of every game. That's why we pass "info_target" into create_entity function.
Add this somewhere in your npc_Think method and you'll understand what we're talking about.
PHP Code:
    static className[32];
    
entity_get_string(iEntEV_SZ_classnameclassNamecharsmax(className))
    
    
client_print(0print_chat"Classname: %s"className); 
The actual classname for our NPC is "npc_ent".
__________________
It's a mystery.
Mini_Midget is offline