Raised This Month: $ Target: $400
 0% 

Spawn = instant crash


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 12-02-2010 , 10:53   Re: Spawn = instant crash
Reply With Quote #11

I see. I did this:

PHP Code:
#include <superheromod>

public plugin_init()
{
    
register_plugin("Respawn""1.0""Jelle")
}

public 
sh_client_death(victim)
{
    if ( 
is_user_connected(victim) )
    {
        
//Make engine think the player is respawned:
        
set_pev(victimpev_deadflagDEAD_RESPAWNABLE)
        
set_pev(victimpev_iuser10)
        
dllfunc(DLLFunc_Thinkvictim)
        
        
//Move corpse out of map
        
engfunc(EngFunc_SetOriginvictimFloat:{-4800.0, -4800.0, -4800.0})
        
        
//now spawn
        
set_task(0.5"spawned"victim)
    }
}

public 
spawned(victim)
{
    
//did he disconnect during those 0.5 seconds?
    
if ( is_user_connected(victim) )
    {
        
ExecuteHam(Ham_CS_RoundRespawnvictim)
        
dllfunc(DLLFunc_Spawnvictim)
        
        
client_print(victimprint_chat"You have been respawned!")
    }

Not sure if it works thou. I can't test it before tomorrow.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
 



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:26.


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