Raised This Month: $12 Target: $400
 3% 

How To: Respawn a player


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

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
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-10-2018 , 18:29   Re: How To: Respawn a player
Reply With Quote #32

You should remove this task on client_disconnect.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Anurag Kumar
Junior Member
Join Date: Jan 2018
Location: India - Delhi
Old 01-11-2018 , 07:51   Re: How To: Respawn a player
Reply With Quote #33

Thanks
Its hard to here to post
Im New. i will add on my New Gameplay..

Last edited by Anurag Kumar; 01-11-2018 at 09:40. Reason: Grammar Mistake.
Anurag Kumar 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 22:00.


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