Why use a switch when only checking for a single value of 0?
PHP Code:
public func_touch(id, other)
{
if(get_pcvar_num(p_enable) && is_on_team[id] == is_on_team[other])
{
entity_set_int(id, EV_INT_solid, SOLID_NOT)
entity_set_int(other, EV_INT_solid, SOLID_NOT)
if ( !task_is_running[id] )
{
set_task(0.2, "btn", id)
task_is_running[id] = 1
}
if ( !task_is_running[other] )
{
set_task(0.2, "btn", other)
task_is_running[other] = 1
}
}
}
__________________