When doing a bit-operation, make sure to use the correct operator: && should be &. I highlighted the lines where this correction is needed.
Code:
public FwdCmdStart(id, uc_handle, seed)
{
if(!is_user_alive(id))
return FMRES_IGNORED
new button = get_user_button(id)
new oldbutton = get_user_oldbutton(id)
if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_smoker)
{
if ((button & IN_USE) && (oldbutton && IN_USE))
drag_start(id)
if ((!button & IN_USE) && (oldbutton & IN_USE))
drag_end(id)
}
if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_charger)
{
if ((button & IN_USE) && (oldbutton && IN_USE))
{
set_task(0.1, "charger_push", id)
}
}
new distance
get_user_aiming(id, aimed, body, distance);
if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_jockey)
{
if ((button & IN_USE) && (oldbutton && IN_USE))
{
if(distance < 25.0)
{
if (is_user_alive(aimed) && zp_get_user_zombie(aimed))
{
set_user_health(aimed, get_user_health(aimed) + 500)
}
}
}
}
}
__________________