Hello i want to make plugin that respawn just ct team and do not respawn terro team
the code sma compiled with done and there is no warning but the ct team doesn't respawn !
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "Auto Respawn CT"
#define AUTHOR "EaGle"
#define VERSION "1.0"
new RespawnTime
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Killed, "player", "Ham_Killed_player");
RespawnTime = register_cvar("autors_time", "2")
}
public Ham_Killed_player(id)
{
if(!is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T) {
set_hudmessage(0, 0, 255, -1.0, 0.28, 3, 6.0, 3.0);
show_hudmessage(id, "You will respawn in %i seconds.", get_pcvar_num(RespawnTime));
set_task(get_pcvar_float(RespawnTime), "respawn", id)
}
}
public client_putinserver(id)
{
set_task(get_pcvar_float(RespawnTime), "respawn", id)
}