Raised This Month: $ Target: $400
 0% 

help with npc


Post New Thread Reply   
 
Thread Tools Display Modes
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
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-27-2021 , 16:40   Re: help with npc
Reply With Quote #2

https://www.amxmodx.org/api/engine_stocks/find_ent
__________________
DJEarthQuake is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-27-2021 , 22:21   Re: help with npc
Reply With Quote #3

Quote:
Originally Posted by djkaku View Post
and I need the combo to detect me the npc
What do you mean by this?
__________________
My plugin:
Celena Luna is offline
LiZou Mapper
Member
Join Date: Oct 2018
Location: The Red City !
Old 10-04-2021 , 17:35   Re: help with npc
Reply With Quote #4

what do you mean?
__________________

-------------
My Maps !
Zombie Escape Mod !
-------------

LiZou Mapper is offline
Reply



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 20:59.


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