I made this, it works perfect on real players but bots don't respawn,
why? how can i add bots to respawn to?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "T-AutoSpawn"
#define VERSION "1.0"
#define AUTHOR "Sky-High"
new Pcvar_RespawnTime;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Killed, "player", "Fwd_PlayerKilled");
Pcvar_RespawnTime = register_cvar( "osg_respawn_time", "5.0" );
}
public Fwd_PlayerKilled(victim, attacker, shouldgib)
{
new Float: Time;
static CsTeams:team;
team = cs_get_user_team(victim);
Time = get_pcvar_float( Pcvar_RespawnTime );
if (team == CS_TEAM_T)
{
set_task( Time, "Task_Respawn", victim);
}
}
public Task_Respawn(id)
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
}
__________________