You mean Ham_Killed right? Well, no.. i am not blocking Ham_Killed.. only this:
Code:
public HookHamKilled(id)
{
if(!get_pcvar_num(p_Enable) )
return HAM_IGNORED;
if(get_pcvar_num(p_Respawn) && RespawnActive[id])
set_task(TASK_DORESPAWN, "DoRespawn", id);
return HAM_IGNORED;
}
...
public Respawn(id)
{
if(is_user_connected(id) && (cs_get_user_team(id) == CS_TEAM_T || cs_get_user_team(id) == CS_TEAM_CT) )
{
ExecuteHam(Ham_CS_RoundRespawn, id);
if(AutoGocheck[id] && gCheckpointCount[id])
ActiveOptions(id, 2);
set_task(TASK_GIVEITEMS, "GiveItems", id);
set_task(TASK_GIVEWEAPS, "GiveWeapons", id);
}
}
EDIT:
Well, i found it the problem, but not how to solve it ><
The problem is in another plugin, here:
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Auto Join & Block Menus"
#define AUTHOR "Exolent"
#define VERSION "0.0.1"
enum
{
TEAM_NONE = 0,
TEAM_T,
TEAM_CT,
TEAM_SPEC,
MAX_TEAMS
};
new const g_cTeamChars[MAX_TEAMS] =
{
'U',
'T',
'C',
'S'
};
new const FIRST_JOIN_MSG[] = "#Team_Select";
new const FIRST_JOIN_MSG_SPEC[] = "#Team_Select_Spect";
new const INGAME_JOIN_MSG[] = "#IG_Team_Select";
new const INGAME_JOIN_MSG_SPEC[] = "#IG_Team_Select_Spect";
new const VGUI_JOIN_TEAM_NUM = 2;
new g_iTeam[33];
new g_iPlayers[MAX_TEAMS];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("TeamInfo", "event_TeamInfo", "a");
register_message(get_user_msgid("VGUIMenu"), "message_VGUIMenu");
register_message(get_user_msgid("ShowMenu"), "message_ShowMenu");
}
public event_TeamInfo()
{
new id = read_data(1);
new sTeam[32], iTeam;
read_data(2, sTeam, sizeof(sTeam) - 1);
for(new i = 0; i < MAX_TEAMS; i++)
{
if(g_cTeamChars[i] == sTeam[0])
{
iTeam = i;
break;
}
}
if(g_iTeam[id] != iTeam)
{
g_iPlayers[g_iTeam[id]]--;
g_iTeam[id] = iTeam;
g_iPlayers[iTeam]++;
}
}
public message_ShowMenu(iMsgid, iDest, id)
{
static szMenuChannel[sizeof(FIRST_JOIN_MSG_SPEC)];
get_msg_arg_string(4, szMenuChannel, charsmax(szMenuChannel) );
if(equal(szMenuChannel, FIRST_JOIN_MSG) || equal(szMenuChannel, FIRST_JOIN_MSG_SPEC) )
{
if(ShouldAutojoin(id) )
{
set_autojoin_task(id, iMsgid)
return PLUGIN_HANDLED;
}
}
else if(equal(szMenuChannel, INGAME_JOIN_MSG) || equal(szMenuChannel, INGAME_JOIN_MSG_SPEC) )
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public message_VGUIMenu(iMsgid, iDest, id)
{
if(get_msg_arg_int(1) != VGUI_JOIN_TEAM_NUM)
return PLUGIN_CONTINUE;
if(ShouldAutojoin(id) )
{
set_autojoin_task(id, iMsgid);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public task_Autojoin(iParam[], id)
{
new iMsgBlock = get_msg_block(iParam[0]);
set_msg_block(iParam[0], BLOCK_SET);
new const SPEC[] = "3";
engclient_cmd(id, "jointeam", SPEC);
set_msg_block(iParam[0], iMsgBlock);
}
stock set_autojoin_task(id, iMsgid)
{
new iParam[2];
iParam[0] = iMsgid;
set_task(0.1, "task_Autojoin", id, iParam, sizeof(iParam) );
}
stock bool:ShouldAutojoin(id)
{
return (is_user_connected(id) && !(TEAM_NONE < g_iTeam[id] < TEAM_SPEC) && !task_exists(id) );
}
The code is from Exolent plugin Team Join Management...
__________________