Hi
my general ida make plugin similar like this :
https://www.youtube.com/watch?v=XpFqwYJPz6o
in HL1 dos not has this event
ClCorpse
PHP Code:
register_event("ClCorpse", "event_cl_corpse", "a")
what i try :
PHP Code:
#include <amxmodx>
#include <engine>
#include <amxmisc>
#include <engine>
#include <fakemeta>
new graves[32]
new const MODEL_CORPSE[] = "models/player/red/red.mdl"
public plugin_init()
{
register_event("DeathMsg","make_corpse","a")
}
public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, MODEL_CORPSE)
}
public make_corpse(id)
{
new victim = read_data(2)
new origin[3]
new Float:fOrigin[3]
get_user_origin(victim,origin)
fOrigin[0]=float(origin[0])
fOrigin[1]=float(origin[1])
fOrigin[2]=float(origin[2])
graves[id] = create_entity("info_target")
//set_entity_visibility(victim, 0)
set_pev(graves[id], pev_deadflag, DEAD_DYING)
entity_set_string(graves[id], EV_SZ_classname, "corpse")
entity_set_model(graves[id],"models/player/red/red.mdl")
entity_set_origin(graves[id], fOrigin)
entity_set_int(graves[id], EV_INT_solid, SOLID_BBOX )
entity_set_int(graves[id], EV_INT_movetype, 4)
entity_set_edict(graves[id], EV_ENT_owner, victim)
set_entity_anim(graves[id], random_num(73, 76))//
return PLUGIN_HANDLED
}
stock set_entity_anim(ent, anim)
{
entity_set_float(ent, EV_FL_animtime, get_gametime())
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_float(ent, EV_FL_frame, 0.0)
entity_set_int(ent, EV_INT_sequence, anim)
}
I did not get the same results
I need some recommendations from you
THx !
__________________