Raised This Month: $ Target: $400
 0% 

help with npc


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
djkaku
Senior Member
Join Date: Oct 2011
Old 09-27-2021 , 15:44   help with npc
Reply With Quote #1

hello, I am creating a mode and use this code to create an npc

PHP Code:
public create_zombie()
{   
    new 
ent engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
    
ent2 ent
   
    entity_set_origin
(entg_spawn_point)
   
    
entity_set_float(entEV_FL_takedamage,1.0)
    
entity_set_float(entEV_FL_health100.0)
   
    
set_pev(ent,pev_classname,"z1x")
    
entity_set_model(entzombie_model)
    
entity_set_int(entEV_INT_solid2)
   
    
entity_set_int(entEV_INT_movetypeMOVETYPE_PUSHSTEP)
   
    
set_pev(entpev_victim0)
   
    
entity_set_byte(entEV_BYTE_controller1125)
    
entity_set_byte(entEV_BYTE_controller2125)
    
entity_set_byte(entEV_BYTE_controller3125)
    
entity_set_byte(entEV_BYTE_controller4125)
   
    new 
Float:maxs[3] = {16.016.036.0}
    new 
Float:mins[3] = {-16.0, -16.0, -36.0}
    
entity_set_size(entminsmaxs)
   
    
play_anim(entANIM_IDLE1.0)
   
    
entity_set_float(ent,EV_FL_nextthinkhalflife_time() + 0.01)
    
drop_to_floor(ent)
   
    
//RegisterHamFromEntity(Ham_TakeDamage, ent, "fw_zb_takedmg")
    
RegisterHamFromEntity(Ham_Killedent"fw_zb_killed")
   
    return 
ent;

and I need the combo to detect me the npc, I change this

new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(Eng Func_AllocString,"info_target"))

by

new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(Eng Func_AllocString,"player"))

It detects me but the server throws me, if you could help me

I speak Spanish and I am using the translator
djkaku is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode