No need to register/unregister Ham_Spawn.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
#define PLUGIN "Revive Ts"
#define VERSION "0.0.1"
const m_iTeam = 114
const m_iJoinedState = 121
const m_iMenu = 205
const TEAM_T = 1
const MENU_CHOOSEAPPEARANCE = 3
public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
register_concmd("amx_revive_T", "ConCmd_Revive", ADMIN_CFG, "Revive Ts with 999HP")
}
public ConCmd_Revive( id , lvl, cid )
{
if( cmd_access(id, lvl, cid, 0) )
{
new players[32], num, player
get_players(players, num, "h")
for(--num; num>=0; num--)
{
player = players[num]
if( !get_pdata_int(id, m_iJoinedState) && get_pdata_int(id, m_iTeam) == TEAM_T && get_pdata_int(id, m_iMenu) != MENU_CHOOSEAPPEARANCE )
{
ExecuteHamB(Ham_CS_RoundRespawn, player)
set_user_health(id, 999)
}
}
}
}
__________________