Code:
public forward_playerprethink(id)
{
if(is_user_alive(id))
{
if (entity_get_int(id, EV_INT_button) & IN_ATTACK2)
{
launch_nade(id)
return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED
}
I don't even know where avalanche got this, but replace launch_nade(id) with your nade-launching function name. This should already be in here, well the forward function.