Raised This Month: $ Target: $400
 0% 

Most Efficient way to respawn player?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 11-17-2015 , 22:05   Most Efficient way to respawn player?
Reply With Quote #1

I'm looking for the most efficient way to respawn a player. I don't intend to use deathmatch as it has a lot more features than what I require.

Would entity_spawn method be my best bet, or there is something else?
__________________
Spirit_12 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-17-2015 , 22:11   Re: Most Efficient way to respawn player?
Reply With Quote #2

PHP Code:
 ExecuteHam 
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 11-17-2015 , 22:24   Re: Most Efficient way to respawn player?
Reply With Quote #3

You mean

Code:
Ham_Respawn
__________________
Spirit_12 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-17-2015 , 22:56   Re: Most Efficient way to respawn player?
Reply With Quote #4

No.
Code:
ExecuteHam(Ham_CS_RoundRespawn, this);
Edit:
PHP Code:
#include < amxmodx >
#include < hamsandwich >

public plugin_init()
{
    
register_event"DeathMsg""drop_dead""a" );
}    

public 
drop_dead( )
{
    new 
iVictim read_data)
    
    if( 
is_user_connectediVictim ) )
    {
        
set_task0.9"revive_you"iVictim )
    }
}

public 
revive_youid )
{
    
ExecuteHamHam_CS_RoundRespawnid )

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 11-17-2015 at 23:26.
wickedd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2015 , 20:46   Re: Most Efficient way to respawn player?
Reply With Quote #5

If other plugins need to know that the player respawned then you should use ExecuteHamB() (this triggers all associated hooks for the spawn event IIRC).
__________________
fysiks is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-20-2015 , 09:48   Re: Most Efficient way to respawn player?
Reply With Quote #6

PHP Code:
set_pev(idpev_deadflagDEAD_RESPAWNABLE)
ExecuteHamB(Ham_CS_RoundRespawnid
That is the most correct way to respawn a player.
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-20-2015 , 10:21   Re: Most Efficient way to respawn player?
Reply With Quote #7

Quote:
Originally Posted by Jhob94 View Post
PHP Code:
set_pev(idpev_deadflagDEAD_RESPAWNABLE)
ExecuteHamB(Ham_CS_RoundRespawnid
That is the most correct way to respawn a player.
Setting deadflag is not needed, game does this automatically.
__________________

Last edited by HamletEagle; 11-20-2015 at 10:22.
HamletEagle is offline
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 18:04.


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