Raised This Month: $32 Target: $400
 8% 

create corpes when dead ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 11-23-2017 , 11:37   create corpes when dead ?
Reply With Quote #1

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_PrecacheModelMODEL_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_deadflagDEAD_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_solidSOLID_BBOX 
    
entity_set_int(graves[id], EV_INT_movetype4)
    
entity_set_edict(graves[id], EV_ENT_ownervictim
    
    
set_entity_anim(graves[id], random_num(7376))//
    
    
    
return PLUGIN_HANDLED 
}

stock set_entity_anim(entanim)
{
    
entity_set_float(entEV_FL_animtimeget_gametime())
    
entity_set_float(entEV_FL_framerate1.0)
    
entity_set_float(entEV_FL_frame0.0)
    
entity_set_int(entEV_INT_sequenceanim)   

I did not get the same results
I need some recommendations from you
THx !
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Reply


Thread Tools
Display Modes

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 08:33.


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