Quote:
Originally Posted by Exolent[jNr]
Yes.
|
Quote:
Originally Posted by Mini_Midget
@Arkshine
Thanks for that! Didn't realize that function works with floats.
Do you mean I should not use RegisterHamFromEntity() at all or just once?
Something like this?
PHP Code:
public plugin_init()
{
register_plugin("NPC Plugin", "1.0", "Mazza");
register_clcmd("say /npc", "clcmd_npc");
RegisterHam(Ham_TakeDamage, "info_target", "npc_TakeDamage");
RegisterHam(Ham_Killed, "info_target", "npc_Killed");
RegisterHam(Ham_Think, "info_target", "npc_Think");
RegisterHam(Ham_TraceAttack, "info_target", "npc_TraceAttack");
}
Would I still need to filter out the classname for each of them inside the forwards?
@bibu
I'm quite sure there is a tutorial on how the touch forward works. That's why I didn't really bother with it. If there is much requests for this feature, I'll write it up.
As you said, giving a NPC a weapon is already in the other tutorial so I found no need to simply just copy and paste it in here.
@meTaLiCroSS
Mmm... I had problems last night with those pev values... But fixed now.
Silly me! Was working on this quite late last night and wasn't thinking straight.
|
Both ov you confused me
The class name of an entity is what we set through pev_classname, right ?
So in order for registering the ham_forwards we will use "npc_ent" as the classname ??
And if we use info_target as the class name then if we check the classname in the forward, it would return "info_target" instead of "npc_ent"
BTW what is the actuall class name of the NPC ?? is it "npc_ent" or "info_target" ??
__________________