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(PLUGIN, VERSION, AUTHOR)
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.