Code:
function increase_WaffenSlot()
{
  if(player_alive)
  {
    waffenslot += 1;
  }
}

on_y = increase_WaffenSlot;