Raised This Month: $ Target: $400
 0% 

How To: Respawn a player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hey
Member
Join Date: Dec 2017
Old 01-10-2018 , 11:28   Re: How To: Respawn a player
Reply With Quote #32

please don't bump old posts unless you have a good reason to bump it, i understand that you are new here so it's fine.


the code is not completed so here is the fixed one:
PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Revive Test"
#define VERSION "1.0"
#define AUTHOR "Anurag Kumar"

new cvar_revivetime;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Killed"player""Killed"1);
    
cvar_revivetime register_cvar("Respawn_Time""6.0");
}
public 
client_putinserver(id)
{
    
set_task(get_pcvar_float(cvar_revivetime), "Revive"id);
}
public 
Killed(id)
{
    
set_task(get_pcvar_float(cvar_revivetime), "Revive"id);
}
public 
Revive(id){
    if(!
is_user_alive(id))
    
ExecuteHamB(Ham_CS_RoundRespawn,id)

And btw this code will keep respawning player when they die so yeah.

Last edited by Hey; 01-10-2018 at 11:55.
Hey is offline
 



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 06:13.


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