PHP Code:
new g_havetouch[33]
enum
{
TT = 1,
CT = 2
}
public hamUse(ent, id)
{
if( g_havetouch[id] )
return HAM_IGNORED
new iPlayers[32];
new iNum;
new szTarget[32]
pev(ent, pev_target, szTarget, 31)
if( is_user_alive(id) && ( equal(szTarget, "ct_target") || equal(szTarget, "t_target") ) )
{
new style = equal(szTarget, "ct_target") ? CT : TT
if( get_user_team(id) == style )
{
client_print(id, print_chat, "[Push the button] You can't push your own button!")
}
else
{
get_players( iPlayers , iNum ,"ae", style == CT ? "CT" : "TERRORIST");
for( new i = 0; i < iNum ; i++)
{
set_user_frags(iPlayers[i],get_user_frags(iPlayers[i])+1);
user_kill(iPlayers[i])
}
set_user_frags(id,get_user_frags(id)+1)
client_print(id, print_chat, "[Push the button] You pushed the button!")
g_havetouch[id] = true
}
}
return HAM_IGNORED
}
__________________