Raised This Month: $ Target: $400
 0% 

Respawning player right after death


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Desikac
Senior Member
Join Date: Apr 2010
Location: Serbia
Old 06-16-2011 , 15:54   Re: Respawning player right after death
Reply With Quote #8

I've tried making a new corpse in the ClCorpse event but it still gets removed from the game. Guess it just edits the original model...
PHP Code:
public msgClCorpse()
{
    new 
model[33], corpse[33]
    
get_msg_arg_string(1model32)
    
get_corpse_model(modelcorpse32)
    
    new 
Float:modelOrigin[3]
    
modelOrigin[0] = float(get_msg_arg_int(2) / 128)
    
modelOrigin[1] = float(get_msg_arg_int(3) / 128)
    
modelOrigin[2] = float(get_msg_arg_int(4) / 128
    
    new 
Float:modelAngel[3]
    
modelAngel[0] = get_msg_arg_float(5)
    
modelAngel[1] = get_msg_arg_float(6)
    
modelAngel[2] = get_msg_arg_float(7)
    
    new 
entCorpse create_entity("info_target")
    if(
entCorpse 0)
    {
        
entity_set_string(entCorpseEV_SZ_classname"clcorpse")
        
entity_set_string(entCorpseEV_SZ_modelcorpse)
        
entity_set_int(entCorpseEV_INT_solidSOLID_TRIGGER)
        
entity_set_int(entCorpseEV_INT_movetypeMOVETYPE_TOSS)
        
entity_set_int(entCorpseEV_INT_sequenceget_msg_arg_int(9))
        
entity_set_vector(entCorpseEV_VEC_originmodelOrigin)
        
entity_set_vector(entCorpseEV_VEC_anglesmodelAngel)
    }
    return 
PLUGIN_HANDLED

Desikac is offline
Send a message via MSN to Desikac Send a message via Skype™ to Desikac
 



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 23:31.


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